ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

favorites.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2004 Martin Fuchs
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00017  */
00018 
00019 
00020  //
00021  // Explorer and Desktop clone
00022  //
00023  // favorites.h
00024  //
00025  // Martin Fuchs, 04.04.2004
00026  //
00027 
00028 
00029 extern String DecodeURLString(const char* s);
00030 
00031 
00032 struct Bookmark
00033 {
00034     Bookmark() : _icon_idx(0) {}
00035 
00036     String  _name;
00037     String  _description;
00038     String  _url;
00039     String  _icon_path;
00040     int     _icon_idx;
00041 
00042     bool    read_url(LPCTSTR path);
00043     bool    read(const_XMLPos& pos);
00044     void    write(XMLPos& pos) const;
00045 };
00046 
00047 struct BookmarkFolder;
00048 
00049 struct BookmarkNode
00050 {
00051     BookmarkNode();
00052     BookmarkNode(const Bookmark& bm);
00053     BookmarkNode(const BookmarkFolder& bmf);
00054     BookmarkNode(const BookmarkNode& other);
00055 
00056     ~BookmarkNode();
00057 
00058     BookmarkNode& operator=(const Bookmark& bm);
00059     BookmarkNode& operator=(const BookmarkFolder& bmf);
00060     BookmarkNode& operator=(const BookmarkNode& other);
00061 
00062     void    clear();
00063 
00064     enum BOOKMARKNODE_TYPE {
00065         BMNT_NONE, BMNT_BOOKMARK, BMNT_FOLDER
00066     };
00067 
00068     BOOKMARKNODE_TYPE   _type;
00069 
00070     union {
00071         Bookmark*       _pbookmark;
00072         BookmarkFolder* _pfolder;
00073     };
00074 };
00075 
00076 struct BookmarkList : public list<BookmarkNode>
00077 {
00078     void    import_IE_favorites(struct ShellDirectory& dir, HWND hwnd);
00079 
00080     void    read(const_XMLPos& pos);
00081     void    write(XMLPos& pos) const;
00082 
00083     void    fill_tree(HWND hwnd, HTREEITEM parent, HIMAGELIST, HDC hdc_wnd) const;
00084 };
00085 
00086 struct BookmarkFolder
00087 {
00088     String  _name;
00089     String  _description;
00090     BookmarkList _bookmarks;
00091 
00092     void    read(const_XMLPos& pos);
00093     void    write(XMLPos& pos) const;
00094 };
00095 
00096 struct Favorites : public BookmarkList
00097 {
00098     typedef BookmarkList super;
00099 
00100     bool    read(LPCTSTR path);
00101     void    write(LPCTSTR path) const;
00102 
00103     bool    import_IE_favorites(HWND hwnd);
00104 };

Generated on Thu May 24 2012 04:18:48 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.