1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/dirctrlcmn.cpp
3 // Purpose: wxGenericDirCtrl common code
4 // Author: Harm van der Heijden, Robert Roebling, Julian Smart
7 // Copyright: (c) Harm van der Heijden, Robert Roebling and Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
18 #if wxUSE_DIRDLG || wxUSE_FILEDLG
20 #include "wx/generic/dirctrlg.h"
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";
26 //-----------------------------------------------------------------------------
28 //-----------------------------------------------------------------------------
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
)
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
)
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
)
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
)
65 wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxGenericDirCtrl
, wxControl
, "wx/dirctrl.h")
67 wxBEGIN_PROPERTIES_TABLE(wxGenericDirCtrl
)
68 wxHIDE_PROPERTY( Children
)
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") )
77 wxPROPERTY_FLAGS( WindowStyle
, wxGenericDirCtrlStyle
, long, SetWindowStyleFlag
, \
78 GetWindowStyleFlag
, wxEMPTY_PARAMETER_VALUE
, 0, wxT("Helpstring"), \
80 wxEND_PROPERTIES_TABLE()
82 wxEMPTY_HANDLERS_TABLE(wxGenericDirCtrl
)
84 wxCONSTRUCTOR_8( wxGenericDirCtrl
, wxWindow
*, Parent
, wxWindowID
, Id
, \
85 wxString
, DefaultPath
, wxPoint
, Position
, wxSize
, Size
, \
86 long, WindowStyle
, wxString
, Filter
, int, DefaultFilter
)
88 #endif // wxUSE_DIRDLG || wxUSE_FILEDLG