ReactOS  0.4.14-dev-608-gd495a4f
pane.h
Go to the documentation of this file.
1 /*
2  * Copyright 2003, 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 clone
22  //
23  // pane.h
24  //
25  // Martin Fuchs, 23.07.2003
26  //
27 
28 
29 #define IDW_TREE_LEFT 3
30 #define IDW_TREE_RIGHT 6
31 #define IDW_HEADER_LEFT 2
32 #define IDW_HEADER_RIGHT 5
33 
34 
36  COL_TYPE = 0x0001,
37  COL_SIZE = 0x0002,
38  COL_DATE = 0x0004,
39  COL_TIME = 0x0008,
40  COL_ATTRIBUTES = 0x0010,
41  COL_DOSNAMES = 0x0020,
42  COL_INDEX = 0x0040,
43  COL_LINKS = 0x0080,
44  COL_CONTENT = 0x0100,
46 };
47 
48 
51 {
52  OutputWorker();
53 
54  void init_output(HWND hwnd);
55  void output_text(LPDRAWITEMSTRUCT dis, int* positions, int col, LPCTSTR str, DWORD flags);
56  void output_tabbed_text(LPDRAWITEMSTRUCT dis, int* positions, int col, LPCTSTR str);
57  void output_number(LPDRAWITEMSTRUCT dis, int* positions, int col, LPCTSTR str);
58 
62 };
63 
64 
66 struct Pane : public SubclassedWindow
67 {
69 
70  Pane(HWND hparent, int id, int id_header, Entry* rool, bool treePane, int visible_cols);
71  ~Pane();
72 
73 #define COLUMNS 12
76 
77  WindowHandle _hwndHeader;
78 
81 
83 
85  bool _treePane;
86 
87  void init();
88  void set_header();
89  bool create_header(HWND parent, int id);
90 
91  bool calc_widths(bool anyway);
92  void calc_single_width(int col);
93  void draw_item(LPDRAWITEMSTRUCT dis, Entry* entry, int calcWidthCol=-1);
94 
95  int insert_entries(Entry* dir, int idx=-1);
97  virtual int Notify(int id, NMHDR* pnmh);
98 
99 protected:
100  virtual LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam);
101 
102  void calc_width(LPDRAWITEMSTRUCT dis, int col, LPCTSTR str);
103  void calc_tabbed_width(LPDRAWITEMSTRUCT dis, int col, LPCTSTR str);
104  struct MainFrameBase* get_frame();
105 
106 protected:
109 };
110 
Entry * _root
Definition: pane.h:79
virtual int Notify(int id, NMHDR *pnmh)
Definition: pane.cpp:786
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
Definition: pane.h:36
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
Pane(HWND hparent, int id, int id_header, Entry *rool, bool treePane, int visible_cols)
Definition: pane.cpp:73
void calc_tabbed_width(LPDRAWITEMSTRUCT dis, int col, LPCTSTR str)
Definition: pane.cpp:642
Definition: pane.h:45
int _visible_cols
Definition: pane.h:84
Definition: ftp_var.h:139
BOOL command(UINT cmd)
Definition: pane.cpp:942
Definition: pane.h:39
int insert_entries(Entry *dir, int idx=-1)
Definition: pane.cpp:658
UINT_PTR WPARAM
Definition: windef.h:207
void output_tabbed_text(LPDRAWITEMSTRUCT dis, int *positions, int col, LPCTSTR str)
Definition: pane.cpp:894
bool calc_widths(bool anyway)
Definition: pane.cpp:178
void init()
Definition: pane.cpp:153
Definition: pane.h:38
Definition: pane.h:37
unsigned int BOOL
Definition: ntddk_ex.h:94
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
unsigned int idx
Definition: utils.c:41
HIMAGELIST _himl
Definition: pane.h:107
const WCHAR * str
HFONT _hfont
Definition: pane.h:61
~Pane()
Definition: pane.cpp:92
LONG_PTR LPARAM
Definition: windef.h:208
bool _treePane
Definition: pane.h:85
Definition: pane.h:42
Worker for drawing contents of file lists in child pane.
Definition: pane.h:50
unsigned int dir
Definition: maze.c:112
void output_number(LPDRAWITEMSTRUCT dis, int *positions, int col, LPCTSTR str)
Definition: pane.cpp:910
void calc_width(LPDRAWITEMSTRUCT dis, int col, LPCTSTR str)
Definition: pane.cpp:632
void set_header()
Definition: pane.cpp:693
Explorer frame window base class.
Definition: mainframe.h:41
void output_text(LPDRAWITEMSTRUCT dis, int *positions, int col, LPCTSTR str, DWORD flags)
Definition: pane.cpp:881
char TCHAR
Definition: xmlstorage.h:189
r parent
Definition: btrfs.c:2869
DWORD COLORREF
Definition: windef.h:300
child window pane for displaying file lists
Definition: pane.h:66
Definition: pane.h:43
void draw_item(LPDRAWITEMSTRUCT dis, Entry *entry, int calcWidthCol=-1)
Definition: pane.cpp:298
unsigned long DWORD
Definition: ntddk_ex.h:95
virtual LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: pane.cpp:98
GLbitfield flags
Definition: glext.h:7161
int visible_cols
Definition: winefile.c:124
uint32_t entry
Definition: isohybrid.c:63
WindowHandle _hwndHeader
Definition: pane.h:77
SIZE _spaceSize
Definition: pane.h:59
int _widths[COLUMNS]
Definition: pane.h:74
COLUMN_FLAGS
Definition: pane.h:35
struct MainFrameBase * get_frame()
Definition: pane.cpp:990
void init_output(HWND hwnd)
Definition: pane.cpp:865
bool create_header(HWND parent, int id)
Definition: pane.cpp:127
unsigned int UINT
Definition: ndis.h:50
OutputWorker _out_wrkr
Definition: pane.h:108
void calc_single_width(int col)
Definition: pane.cpp:726
SubclassedWindow super
Definition: pane.h:68
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
Entry * _cur
Definition: pane.h:80
COLORREF _clrCompressed
Definition: pane.h:82
#define COLUMNS
Definition: pane.h:73
int _positions[COLUMNS+1]
Definition: pane.h:75
TCHAR _num_sep
Definition: pane.h:60
BOOL treePane
Definition: winefile.c:123
LONG_PTR LRESULT
Definition: windef.h:209
OutputWorker()
Definition: pane.cpp:860
base of all file and directory entries
Definition: entries.h:82
static UINT WPARAM wparam
Definition: combo.c:716