#include "wx/xrc/xh_stlin.h"
#include "wx/xrc/xh_bmp.h"
#include "wx/xrc/xh_unkwn.h"
+#include "wx/xrc/xh_gdctl.h"
#include "wx/xrc/xh_frame.h"
#endif // _WX_XMLRES_H_
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: xh_gdctl.h
+// Purpose: XML resource handler for wxGenericDirCtrl
+// Author: Markus Greither
+// Created: 2002/01/20
+// RCS-ID: $Id$
+// Copyright: (c) 2002 Markus Greither
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_XH_GDCTL_H_
+#define _WX_XH_GDCTL_H_
+
+#ifdef __GNUG__
+#pragma interface "xh_gdctl.h"
+#endif
+
+#include "wx/xrc/xmlres.h"
+
+#if wxUSE_DIRDLG
+
+class WXXMLDLLEXPORT wxGenericDirCtrlXmlHandler : public wxXmlResourceHandler
+{
+public:
+ wxGenericDirCtrlXmlHandler();
+ virtual wxObject *DoCreateResource();
+ virtual bool CanHandle(wxXmlNode *node);
+};
+
+#endif
+
+#endif // _WX_XH_GDCTL_H_
xh_radbt.h xh_radbx.h xh_sizer.h xh_slidr.h xh_spin.h xh_stbmp.h \
xh_sttxt.h xh_text.h xh_listb.h xml.h xmlio.h xmlres.h xh_toolb.h \
xh_bmpbt.h xh_cald.h xh_listc.h xh_scrol.h xh_stbox.h xh_tree.h \
- xh_stlin.h xh_bmp.h xh_unkwn.h xh_frame.h
+ xh_stlin.h xh_bmp.h xh_unkwn.h xh_frame.h xh_gdctl.h
OBJECTS=$(EXPAT_OBJECTS) \
xml.o xmlbin.o xmlbinz.o xmlexpat.o xmlwrite.o xmlres.o xmlrsall.o \
xh_radbx.o xh_sizer.o xh_slidr.o xh_spin.o xh_stbmp.o xh_sttxt.o \
xh_text.o xh_listb.o xh_toolb.o xh_stlin.o xh_bmp.o xh_unkwn.o \
xh_bmpbt.o xh_cald.o xh_listc.o xh_scrol.o xh_stbox.o xh_tree.o \
- xh_frame.o
+ xh_frame.o xh_gdctl.o
DEPFILES=$(OBJECTS:.o=.d)
APPEXTRADEFS=-I$(top_srcdir)/contrib/include $(EXPAT_DEFS)
xh_radbx.obj xh_sizer.obj xh_slidr.obj xh_spin.obj xh_stbmp.obj xh_sttxt.obj \
xh_text.obj xh_listb.obj xh_toolb.obj xh_stlin.obj xh_bmp.obj \
xh_bmpbt.obj xh_cald.obj xh_listc.obj xh_scrol.obj xh_stbox.obj \
- xh_tree.obj xh_unkwn.obj xh_frame.obj
+ xh_tree.obj xh_unkwn.obj xh_frame.obj xh_gdctl.obj
!include $(WXDIR)\src\makelib.b32
xh_radbx.o xh_sizer.o xh_slidr.o xh_spin.o xh_stbmp.o xh_sttxt.o \
xh_text.o xh_listb.o xh_toolb.o xh_stlin.o xh_bmp.o xh_unkwn.o \
xh_bmpbt.o xh_cald.o xh_listc.o xh_scrol.o xh_stbox.o xh_tree.o \
- xh_frame.o
+ xh_frame.o xh_gdctl.o
include $(WXDIR)/src/makelib.g95
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: xh_gdctl.cpp
+// Purpose: XRC resource for wxGenericDirCtrl
+// Author: Markus Greither
+// Created: 2002/01/20
+// RCS-ID:
+// Copyright: (c) 2002 Markus Greither
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation "xh_gdctl.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
+#include "wx/defs.h"
+#if wxUSE_DIRDLG
+
+#include "wx/textctrl.h"
+#include "wx/xrc/xh_gdctl.h"
+#include "wx/dirctrl.h"
+
+wxGenericDirCtrlXmlHandler::wxGenericDirCtrlXmlHandler()
+: wxXmlResourceHandler()
+{
+ ADD_STYLE(wxDIRCTRL_DIR_ONLY);
+ ADD_STYLE(wxDIRCTRL_3D_INTERNAL);
+ ADD_STYLE(wxDIRCTRL_SELECT_FIRST);
+ ADD_STYLE(wxDIRCTRL_SHOW_FILTERS);
+ AddWindowStyles();
+}
+
+wxObject *wxGenericDirCtrlXmlHandler::DoCreateResource()
+{
+ XRC_MAKE_INSTANCE(ctrl, wxGenericDirCtrl)
+
+ ctrl->Create(m_parentAsWindow,
+ GetID(),
+ GetText(wxT("defaultfolder")),
+ GetPosition(), GetSize(),
+ GetStyle(),
+ GetText(wxT("filter")),
+ (int)GetLong(wxT("defaultfilter")),
+ GetName());
+
+ SetupWindow(ctrl);
+
+ return ctrl;
+}
+
+bool wxGenericDirCtrlXmlHandler::CanHandle(wxXmlNode *node)
+{
+ return IsOfClass(node, wxT("wxGenericDirCtrl"));
+}
+
+#endif
AddHandler(new wxIconXmlHandler);
AddHandler(new wxMenuXmlHandler);
AddHandler(new wxMenuBarXmlHandler);
-
AddHandler(new wxDialogXmlHandler);
AddHandler(new wxPanelXmlHandler);
-
AddHandler(new wxSizerXmlHandler);
-//Controls
AddHandler(new wxButtonXmlHandler);
AddHandler(new wxBitmapButtonXmlHandler);
AddHandler(new wxStaticTextXmlHandler);
#if wxUSE_SCROLLBAR
AddHandler(new wxScrollBarXmlHandler);
#endif
-
#if wxUSE_RADIOBOX
AddHandler(new wxRadioBoxXmlHandler);
AddHandler(new wxRadioButtonXmlHandler);
AddHandler(new wxStaticLineXmlHandler);
#endif
AddHandler(new wxUnknownWidgetXmlHandler);
-
+#if wxUSE_DIRDLG
+ AddHandler(new wxGenericDirCtrlXmlHandler);
+#endif
AddHandler(new wxFrameXmlHandler);
}
--- /dev/null
+node wxGenericDirCtrl
+var defaultfolder of text
+var filter of text
+var defaultfilter of integer
+var style of flags wxDIRCTRL_DIR_ONLY,wxDIRCTRL_3D_INTERNAL,wxDIRCTRL_SELECT_FIRST,wxDIRCTRL_SHOW_FILTERS
+derived from control
#include "wx/xrc/xh_stlin.h"
#include "wx/xrc/xh_bmp.h"
#include "wx/xrc/xh_unkwn.h"
+#include "wx/xrc/xh_gdctl.h"
#include "wx/xrc/xh_frame.h"
#endif // _WX_XMLRES_H_
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: xh_gdctl.h
+// Purpose: XML resource handler for wxGenericDirCtrl
+// Author: Markus Greither
+// Created: 2002/01/20
+// RCS-ID: $Id$
+// Copyright: (c) 2002 Markus Greither
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_XH_GDCTL_H_
+#define _WX_XH_GDCTL_H_
+
+#ifdef __GNUG__
+#pragma interface "xh_gdctl.h"
+#endif
+
+#include "wx/xrc/xmlres.h"
+
+#if wxUSE_DIRDLG
+
+class WXXMLDLLEXPORT wxGenericDirCtrlXmlHandler : public wxXmlResourceHandler
+{
+public:
+ wxGenericDirCtrlXmlHandler();
+ virtual wxObject *DoCreateResource();
+ virtual bool CanHandle(wxXmlNode *node);
+};
+
+#endif
+
+#endif // _WX_XH_GDCTL_H_
xh_radbt.h xh_radbx.h xh_sizer.h xh_slidr.h xh_spin.h xh_stbmp.h \
xh_sttxt.h xh_text.h xh_listb.h xml.h xmlio.h xmlres.h xh_toolb.h \
xh_bmpbt.h xh_cald.h xh_listc.h xh_scrol.h xh_stbox.h xh_tree.h \
- xh_stlin.h xh_bmp.h xh_unkwn.h xh_frame.h
+ xh_stlin.h xh_bmp.h xh_unkwn.h xh_frame.h xh_gdctl.h
OBJECTS=$(EXPAT_OBJECTS) \
xml.o xmlbin.o xmlbinz.o xmlexpat.o xmlwrite.o xmlres.o xmlrsall.o \
xh_radbx.o xh_sizer.o xh_slidr.o xh_spin.o xh_stbmp.o xh_sttxt.o \
xh_text.o xh_listb.o xh_toolb.o xh_stlin.o xh_bmp.o xh_unkwn.o \
xh_bmpbt.o xh_cald.o xh_listc.o xh_scrol.o xh_stbox.o xh_tree.o \
- xh_frame.o
+ xh_frame.o xh_gdctl.o
DEPFILES=$(OBJECTS:.o=.d)
APPEXTRADEFS=-I$(top_srcdir)/contrib/include $(EXPAT_DEFS)
xh_radbx.obj xh_sizer.obj xh_slidr.obj xh_spin.obj xh_stbmp.obj xh_sttxt.obj \
xh_text.obj xh_listb.obj xh_toolb.obj xh_stlin.obj xh_bmp.obj \
xh_bmpbt.obj xh_cald.obj xh_listc.obj xh_scrol.obj xh_stbox.obj \
- xh_tree.obj xh_unkwn.obj xh_frame.obj
+ xh_tree.obj xh_unkwn.obj xh_frame.obj xh_gdctl.obj
!include $(WXDIR)\src\makelib.b32
xh_radbx.o xh_sizer.o xh_slidr.o xh_spin.o xh_stbmp.o xh_sttxt.o \
xh_text.o xh_listb.o xh_toolb.o xh_stlin.o xh_bmp.o xh_unkwn.o \
xh_bmpbt.o xh_cald.o xh_listc.o xh_scrol.o xh_stbox.o xh_tree.o \
- xh_frame.o
+ xh_frame.o xh_gdctl.o
include $(WXDIR)/src/makelib.g95
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: xh_gdctl.cpp
+// Purpose: XRC resource for wxGenericDirCtrl
+// Author: Markus Greither
+// Created: 2002/01/20
+// RCS-ID:
+// Copyright: (c) 2002 Markus Greither
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation "xh_gdctl.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
+#include "wx/defs.h"
+#if wxUSE_DIRDLG
+
+#include "wx/textctrl.h"
+#include "wx/xrc/xh_gdctl.h"
+#include "wx/dirctrl.h"
+
+wxGenericDirCtrlXmlHandler::wxGenericDirCtrlXmlHandler()
+: wxXmlResourceHandler()
+{
+ ADD_STYLE(wxDIRCTRL_DIR_ONLY);
+ ADD_STYLE(wxDIRCTRL_3D_INTERNAL);
+ ADD_STYLE(wxDIRCTRL_SELECT_FIRST);
+ ADD_STYLE(wxDIRCTRL_SHOW_FILTERS);
+ AddWindowStyles();
+}
+
+wxObject *wxGenericDirCtrlXmlHandler::DoCreateResource()
+{
+ XRC_MAKE_INSTANCE(ctrl, wxGenericDirCtrl)
+
+ ctrl->Create(m_parentAsWindow,
+ GetID(),
+ GetText(wxT("defaultfolder")),
+ GetPosition(), GetSize(),
+ GetStyle(),
+ GetText(wxT("filter")),
+ (int)GetLong(wxT("defaultfilter")),
+ GetName());
+
+ SetupWindow(ctrl);
+
+ return ctrl;
+}
+
+bool wxGenericDirCtrlXmlHandler::CanHandle(wxXmlNode *node)
+{
+ return IsOfClass(node, wxT("wxGenericDirCtrl"));
+}
+
+#endif
AddHandler(new wxIconXmlHandler);
AddHandler(new wxMenuXmlHandler);
AddHandler(new wxMenuBarXmlHandler);
-
AddHandler(new wxDialogXmlHandler);
AddHandler(new wxPanelXmlHandler);
-
AddHandler(new wxSizerXmlHandler);
-//Controls
AddHandler(new wxButtonXmlHandler);
AddHandler(new wxBitmapButtonXmlHandler);
AddHandler(new wxStaticTextXmlHandler);
#if wxUSE_SCROLLBAR
AddHandler(new wxScrollBarXmlHandler);
#endif
-
#if wxUSE_RADIOBOX
AddHandler(new wxRadioBoxXmlHandler);
AddHandler(new wxRadioButtonXmlHandler);
AddHandler(new wxStaticLineXmlHandler);
#endif
AddHandler(new wxUnknownWidgetXmlHandler);
-
+#if wxUSE_DIRDLG
+ AddHandler(new wxGenericDirCtrlXmlHandler);
+#endif
AddHandler(new wxFrameXmlHandler);
}