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

pane.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2003, 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 clone
00022  //
00023  // pane.h
00024  //
00025  // Martin Fuchs, 23.07.2003
00026  //
00027 
00028 
00029 #define IDW_TREE_LEFT       3
00030 #define IDW_TREE_RIGHT      6
00031 #define IDW_HEADER_LEFT     2
00032 #define IDW_HEADER_RIGHT    5
00033 
00034 
00035 enum COLUMN_FLAGS {
00036     COL_TYPE        = 0x0001,
00037     COL_SIZE        = 0x0002,
00038     COL_DATE        = 0x0004,
00039     COL_TIME        = 0x0008,
00040     COL_ATTRIBUTES  = 0x0010,
00041     COL_DOSNAMES    = 0x0020,
00042     COL_INDEX       = 0x0040,
00043     COL_LINKS       = 0x0080,
00044     COL_CONTENT     = 0x0100,
00045     COL_ALL = COL_TYPE|COL_SIZE|COL_DATE|COL_TIME|COL_ATTRIBUTES|COL_DOSNAMES|COL_INDEX|COL_LINKS|COL_CONTENT
00046 };
00047 
00048 
00050 struct OutputWorker
00051 {
00052     OutputWorker();
00053 
00054     void    init_output(HWND hwnd);
00055     void    output_text(LPDRAWITEMSTRUCT dis, int* positions, int col, LPCTSTR str, DWORD flags);
00056     void    output_tabbed_text(LPDRAWITEMSTRUCT dis, int* positions, int col, LPCTSTR str);
00057     void    output_number(LPDRAWITEMSTRUCT dis, int* positions, int col, LPCTSTR str);
00058 
00059     SIZE    _spaceSize;
00060     TCHAR   _num_sep;
00061     HFONT   _hfont;
00062 };
00063 
00064 
00066 struct Pane : public SubclassedWindow
00067 {
00068     typedef SubclassedWindow super;
00069 
00070     Pane(HWND hparent, int id, int id_header, Entry* rool, bool treePane, int visible_cols);
00071     ~Pane();
00072 
00073 #define COLUMNS 12
00074     int     _widths[COLUMNS];
00075     int     _positions[COLUMNS+1];
00076 
00077     WindowHandle _hwndHeader;
00078 
00079     Entry*  _root;
00080     Entry*  _cur;
00081 
00082     COLORREF _clrCompressed;
00083 
00084     int     _visible_cols;
00085     bool    _treePane;
00086 
00087     void    init();
00088     void    set_header();
00089     bool    create_header(HWND parent, int id);
00090 
00091     bool    calc_widths(bool anyway);
00092     void    calc_single_width(int col);
00093     void    draw_item(LPDRAWITEMSTRUCT dis, Entry* entry, int calcWidthCol=-1);
00094 
00095     int     insert_entries(Entry* dir, int idx=-1);
00096     BOOL    command(UINT cmd);
00097     virtual int Notify(int id, NMHDR* pnmh);
00098 
00099 protected:
00100     virtual LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam);
00101 
00102     void    calc_width(LPDRAWITEMSTRUCT dis, int col, LPCTSTR str);
00103     void    calc_tabbed_width(LPDRAWITEMSTRUCT dis, int col, LPCTSTR str);
00104     struct MainFrameBase* get_frame();
00105 
00106 protected:
00107     HIMAGELIST  _himl;
00108     OutputWorker _out_wrkr;
00109 };
00110 

Generated on Thu May 24 2012 04:18:46 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.