]> git.saurik.com Git - wxWidgets.git/blob - src/common/dirctrlcmn.cpp
Make storing non-trivial data in wxThreadSpecificInfo possible.
[wxWidgets.git] / src / common / dirctrlcmn.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/dirctrlcmn.cpp
3 // Purpose: wxGenericDirCtrl common code
4 // Author: Harm van der Heijden, Robert Roebling, Julian Smart
5 // Modified by:
6 // Created: 12/12/98
7 // Copyright: (c) Harm van der Heijden, Robert Roebling and Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
13
14 #ifdef __BORLANDC__
15 #pragma hdrstop
16 #endif
17
18 #if wxUSE_DIRDLG || wxUSE_FILEDLG
19
20 #include "wx/generic/dirctrlg.h"
21
22 extern WXDLLEXPORT_DATA(const char) wxDirDialogNameStr[] = "wxDirCtrl";
23 extern WXDLLEXPORT_DATA(const char) wxDirDialogDefaultFolderStr[] = "/";
24 extern WXDLLEXPORT_DATA(const char) wxDirSelectorPromptStr[] = "Select a directory";
25
26 //-----------------------------------------------------------------------------
27 // XTI
28 //-----------------------------------------------------------------------------
29
30 wxDEFINE_FLAGS( wxGenericDirCtrlStyle )
31 wxBEGIN_FLAGS( wxGenericDirCtrlStyle )
32 // new style border flags, we put them first to
33 // use them for streaming out
34 wxFLAGS_MEMBER(wxBORDER_SIMPLE)
35 wxFLAGS_MEMBER(wxBORDER_SUNKEN)
36 wxFLAGS_MEMBER(wxBORDER_DOUBLE)
37 wxFLAGS_MEMBER(wxBORDER_RAISED)
38 wxFLAGS_MEMBER(wxBORDER_STATIC)
39 wxFLAGS_MEMBER(wxBORDER_NONE)
40
41 // old style border flags
42 wxFLAGS_MEMBER(wxSIMPLE_BORDER)
43 wxFLAGS_MEMBER(wxSUNKEN_BORDER)
44 wxFLAGS_MEMBER(wxDOUBLE_BORDER)
45 wxFLAGS_MEMBER(wxRAISED_BORDER)
46 wxFLAGS_MEMBER(wxSTATIC_BORDER)
47 wxFLAGS_MEMBER(wxBORDER)
48
49 // standard window styles
50 wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
51 wxFLAGS_MEMBER(wxCLIP_CHILDREN)
52 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
53 wxFLAGS_MEMBER(wxWANTS_CHARS)
54 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
55 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
56 wxFLAGS_MEMBER(wxVSCROLL)
57 wxFLAGS_MEMBER(wxHSCROLL)
58
59 wxFLAGS_MEMBER(wxDIRCTRL_DIR_ONLY)
60 wxFLAGS_MEMBER(wxDIRCTRL_3D_INTERNAL)
61 wxFLAGS_MEMBER(wxDIRCTRL_SELECT_FIRST)
62 wxFLAGS_MEMBER(wxDIRCTRL_SHOW_FILTERS)
63 wxEND_FLAGS( wxGenericDirCtrlStyle )
64
65 wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxGenericDirCtrl, wxControl, "wx/dirctrl.h")
66
67 wxBEGIN_PROPERTIES_TABLE(wxGenericDirCtrl)
68 wxHIDE_PROPERTY( Children )
69
70 wxPROPERTY( DefaultPath, wxString, SetDefaultPath, GetDefaultPath, \
71 wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), wxT("group"))
72 wxPROPERTY( Filter, wxString, SetFilter, GetFilter, wxEMPTY_PARAMETER_VALUE, \
73 0 /*flags*/, wxT("Helpstring"), wxT("group") )
74 wxPROPERTY( DefaultFilter, int, SetFilterIndex, GetFilterIndex, \
75 wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), wxT("group") )
76
77 wxPROPERTY_FLAGS( WindowStyle, wxGenericDirCtrlStyle, long, SetWindowStyleFlag, \
78 GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0, wxT("Helpstring"), \
79 wxT("group") )
80 wxEND_PROPERTIES_TABLE()
81
82 wxEMPTY_HANDLERS_TABLE(wxGenericDirCtrl)
83
84 wxCONSTRUCTOR_8( wxGenericDirCtrl, wxWindow*, Parent, wxWindowID, Id, \
85 wxString, DefaultPath, wxPoint, Position, wxSize, Size, \
86 long, WindowStyle, wxString, Filter, int, DefaultFilter )
87
88 #endif // wxUSE_DIRDLG || wxUSE_FILEDLG