ReactOS  0.4.14-dev-57-g333b8f1
favorites.h
Go to the documentation of this file.
1 /*
2  * Copyright 2004 Martin Fuchs
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 
20  //
21  // Explorer and Desktop clone
22  //
23  // favorites.h
24  //
25  // Martin Fuchs, 04.04.2004
26  //
27 
28 
29 extern String DecodeURLString(const char* s);
30 
31 
32 struct Bookmark
33 {
34  Bookmark() : _icon_idx(0) {}
35 
40  int _icon_idx;
41 
42  bool read_url(LPCTSTR path);
43  bool read(const_XMLPos& pos);
44  void write(XMLPos& pos) const;
45 };
46 
47 struct BookmarkFolder;
48 
50 {
51  BookmarkNode();
52  BookmarkNode(const Bookmark& bm);
53  BookmarkNode(const BookmarkFolder& bmf);
55 
56  ~BookmarkNode();
57 
58  BookmarkNode& operator=(const Bookmark& bm);
61 
62  void clear();
63 
66  };
67 
69 
70  union {
73  };
74 };
75 
76 struct BookmarkList : public list<BookmarkNode>
77 {
79 
80  void read(const_XMLPos& pos);
81  void write(XMLPos& pos) const;
82 
83  void fill_tree(HWND hwnd, HTREEITEM parent, HIMAGELIST, HDC hdc_wnd) const;
84 };
85 
87 {
91 
92  void read(const_XMLPos& pos);
93  void write(XMLPos& pos) const;
94 };
95 
96 struct Favorites : public BookmarkList
97 {
99 
100  bool read(LPCTSTR path);
101  void write(LPCTSTR path) const;
102 
104 };
bool read(LPCTSTR path)
read XBEL bookmark file
Definition: favorites.cpp:425
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
void read(const_XMLPos &pos)
read bookmark folder from XBEL formated XML tree
Definition: favorites.cpp:160
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
BookmarkList _bookmarks
Definition: favorites.h:90
int other
Definition: msacm.c:1364
int _icon_idx
Definition: favorites.h:40
static HDC
Definition: imagelist.c:92
shell folder entry
Definition: shellfs.h:53
static WCHAR String[]
Definition: stringtable.c:55
void clear()
Definition: favorites.cpp:265
bool read_url(LPCTSTR path)
read .URL file
Definition: favorites.cpp:54
Bookmark * _pbookmark
Definition: favorites.h:71
void write(LPCTSTR path) const
write XBEL bookmark file
Definition: favorites.cpp:448
BookmarkFolder * _pfolder
Definition: favorites.h:72
String _name
Definition: favorites.h:88
void write(XMLPos &pos) const
write bookmark list into XBEL formated XML tree
Definition: favorites.cpp:305
unsigned int dir
Definition: maze.c:112
BookmarkNode & operator=(const Bookmark &bm)
Definition: favorites.cpp:233
r parent
Definition: btrfs.c:2897
bool read(const_XMLPos &pos)
convert XBEL bookmark node
Definition: favorites.cpp:86
String _url
Definition: favorites.h:38
String _description
Definition: favorites.h:89
void import_IE_favorites(struct ShellDirectory &dir, HWND hwnd)
import Internet Explorer bookmarks from Favorites folder into bookmark list
Definition: favorites.cpp:372
GLdouble s
Definition: gl.h:2039
Definition: _list.h:228
String _description
Definition: favorites.h:37
bool import_IE_favorites(HWND hwnd)
import Internet Explorer bookmarks from Favorites folder
Definition: favorites.cpp:465
void fill_tree(HWND hwnd, HTREEITEM parent, HIMAGELIST, HDC hdc_wnd) const
fill treeview control with bookmark tree content
Definition: favorites.cpp:327
String _name
Definition: favorites.h:36
BOOKMARKNODE_TYPE _type
Definition: favorites.h:68
Definition: services.c:325
void read(const_XMLPos &pos)
read bookmark list from XBEL formated XML tree
Definition: favorites.cpp:281
String DecodeURLString(const char *s)
Definition: favorites.cpp:34
BookmarkList super
Definition: favorites.h:98
Bookmark()
Definition: favorites.h:34
String _icon_path
Definition: favorites.h:39
void write(XMLPos &pos) const
write XBEL bookmark node
Definition: favorites.cpp:125
void write(XMLPos &pos) const
write bookmark folder content from XBEL formated XML tree
Definition: favorites.cpp:176