ReactOS 0.4.15-dev-8241-g63935f8
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,
41 COL_DOSNAMES = 0x0020,
42 COL_INDEX = 0x0040,
43 COL_LINKS = 0x0080,
44 COL_CONTENT = 0x0100,
46};
47
48
51{
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
66struct 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
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
99protected:
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
106protected:
109};
110
@ lparam
Definition: SystemMenu.c:31
@ wparam
Definition: SystemMenu.c:30
unsigned int dir
Definition: maze.c:112
unsigned int idx
Definition: utils.c:41
r parent
Definition: btrfs.c:3010
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
uint32_t entry
Definition: isohybrid.c:63
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
unsigned int UINT
Definition: ndis.h:50
#define COLUMNS
Definition: pane.h:73
COLUMN_FLAGS
Definition: pane.h:35
@ COL_DATE
Definition: pane.h:38
@ COL_ALL
Definition: pane.h:45
@ COL_CONTENT
Definition: pane.h:44
@ COL_LINKS
Definition: pane.h:43
@ COL_ATTRIBUTES
Definition: pane.h:40
@ COL_INDEX
Definition: pane.h:42
@ COL_DOSNAMES
Definition: pane.h:41
@ COL_TIME
Definition: pane.h:39
@ COL_TYPE
Definition: pane.h:36
@ COL_SIZE
Definition: pane.h:37
const WCHAR * str
base of all file and directory entries
Definition: entries.h:83
Explorer frame window base class.
Definition: mainframe.h:42
Worker for drawing contents of file lists in child pane.
Definition: pane.h:51
void output_number(LPDRAWITEMSTRUCT dis, int *positions, int col, LPCTSTR str)
Definition: pane.cpp:910
void output_text(LPDRAWITEMSTRUCT dis, int *positions, int col, LPCTSTR str, DWORD flags)
Definition: pane.cpp:881
void init_output(HWND hwnd)
Definition: pane.cpp:865
OutputWorker()
Definition: pane.cpp:860
SIZE _spaceSize
Definition: pane.h:59
TCHAR _num_sep
Definition: pane.h:60
HFONT _hfont
Definition: pane.h:61
void output_tabbed_text(LPDRAWITEMSTRUCT dis, int *positions, int col, LPCTSTR str)
Definition: pane.cpp:894
child window pane for displaying file lists
Definition: pane.h:67
void calc_width(LPDRAWITEMSTRUCT dis, int col, LPCTSTR str)
Definition: pane.cpp:632
virtual int Notify(int id, NMHDR *pnmh)
Definition: pane.cpp:786
bool create_header(HWND parent, int id)
Definition: pane.cpp:127
int _visible_cols
Definition: pane.h:84
Entry * _cur
Definition: pane.h:80
int insert_entries(Entry *dir, int idx=-1)
Definition: pane.cpp:658
bool calc_widths(bool anyway)
Definition: pane.cpp:178
int _widths[COLUMNS]
Definition: pane.h:74
WindowHandle _hwndHeader
Definition: pane.h:77
Entry * _root
Definition: pane.h:79
~Pane()
Definition: pane.cpp:92
int _positions[COLUMNS+1]
Definition: pane.h:75
SubclassedWindow super
Definition: pane.h:68
void draw_item(LPDRAWITEMSTRUCT dis, Entry *entry, int calcWidthCol=-1)
Definition: pane.cpp:298
virtual LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: pane.cpp:98
bool _treePane
Definition: pane.h:85
OutputWorker _out_wrkr
Definition: pane.h:108
struct MainFrameBase * get_frame()
Definition: pane.cpp:990
void set_header()
Definition: pane.cpp:693
COLORREF _clrCompressed
Definition: pane.h:82
void calc_single_width(int col)
Definition: pane.cpp:726
void init()
Definition: pane.cpp:153
HIMAGELIST _himl
Definition: pane.h:107
void calc_tabbed_width(LPDRAWITEMSTRUCT dis, int col, LPCTSTR str)
Definition: pane.cpp:642
Definition: ftp_var.h:139
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
DWORD COLORREF
Definition: windef.h:300
char TCHAR
Definition: xmlstorage.h:189
const CHAR * LPCTSTR
Definition: xmlstorage.h:193