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