added wxStaticLine handler

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2000-09-17 19:18:02 +00:00
parent a07a98dbe5
commit 28c0bed36a
10 changed files with 120 additions and 11 deletions

View File

@ -41,4 +41,7 @@
#include "wx/xml/xh_tree.h"
#include "wx/xml/xh_cald.h"
#include "wx/xml/xh_listc.h"
#include "wx/xml/xh_stlin.h"
#include "wx/xml/xh_bmp.h"
#include "wx/xml/xh_unkwn.h"
#endif // _WX_XMLRES_H_

View File

@ -0,0 +1,32 @@
/////////////////////////////////////////////////////////////////////////////
// Name: xh_stlin.h
// Purpose: XML resource handler for wxStaticLine
// Author: Vaclav Slavik
// Created: 2000/09/00
// RCS-ID: $Id$
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_STLIN_H_
#define _WX_XH_STLIN_H_
#ifdef __GNUG__
#pragma interface "xh_stlin.h"
#endif
#include "wx/xml/xmlres.h"
#if wxUSE_STATLINE
class WXDLLEXPORT wxStaticLineXmlHandler : public wxXmlResourceHandler
{
public:
wxStaticLineXmlHandler();
virtual wxObject *DoCreateResource();
virtual bool CanHandle(wxXmlNode *node);
};
#endif
#endif // _WX_XH_STLIN_H_

View File

@ -17,14 +17,15 @@ HEADERS=xh_all.h xh_bttn.h xh_chckb.h xh_chckl.h xh_choic.h xh_combo.h \
xh_dlg.h xh_gauge.h xh_html.h xh_menu.h xh_notbk.h xh_panel.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_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
OBJECTS=xml.o xmlbin.o xmlbinz.o xmlpars.o xmlres.o xmlrsall.o \
xh_bttn.o xh_chckb.o xh_chckl.o xh_choic.o xh_combo.o xh_dlg.o \
xh_gauge.o xh_html.o xh_menu.o xh_notbk.o xh_panel.o xh_radbt.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_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
APPEXTRADEFS=-I$(top_srcdir)/contrib/include

View File

@ -17,8 +17,9 @@ OBJECTS=xml.obj xmlbin.obj xmlbinz.obj xmlpars.obj xmlres.obj xmlrsall.obj \
xh_bttn.obj xh_chckb.obj xh_chckl.obj xh_choic.obj xh_combo.obj xh_dlg.obj \
xh_gauge.obj xh_html.obj xh_menu.obj xh_notbk.obj xh_panel.obj xh_radbt.obj \
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_bmpbt.obj xh_cald.obj xh_listc.obj xh_scrol.obj xh_stbox.obj xh_tree.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
!include $(WXDIR)\src\makelib.b32

View File

@ -16,7 +16,7 @@ OBJECTS=xml.o xmlbin.o xmlbinz.o xmlpars.o xmlres.o xmlrsall.o \
xh_bttn.o xh_chckb.o xh_chckl.o xh_choic.o xh_combo.o xh_dlg.o \
xh_gauge.o xh_html.o xh_menu.o xh_notbk.o xh_panel.o xh_radbt.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_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
include $(WXDIR)/src/makelib.g95

View File

@ -39,7 +39,8 @@ OBJECTS=$(D)\xml.obj $(D)\xmlbin.obj $(D)\xmlbinz.obj $(D)\xmlpars.obj $(D)\xmlr
$(D)\xh_radbx.obj $(D)\xh_sizer.obj $(D)\xh_slidr.obj $(D)\xh_spin.obj $(D)\xh_stbmp.obj $(D)\xh_sttxt.obj \
$(D)\xh_text.obj $(D)\xh_listb.obj $(D)\xh_toolb.obj \
$(D)\xh_bmpbt.obj $(D)\xh_cald.obj $(D)\xh_listc.obj $(D)\xh_scrol.obj \
$(D)\xh_stbox.obj $(D)\xh_tree.obj
$(D)\xh_stbox.obj $(D)\xh_tree.obj $(D)\xh_stlin.obj $(D)\xh_bmp.obj \
$(D)\xh_unkwn.obj
!include $(WXDIR)\src\makelib.vc

View File

@ -16,8 +16,9 @@ OBJECTS=xml.obj xmlbin.obj xmlbinz.obj xmlpars.obj xmlres.obj xmlrsall.obj &
xh_bttn.obj xh_chckb.obj xh_chckl.obj xh_choic.obj xh_combo.obj xh_dlg.obj &
xh_gauge.obj xh_html.obj xh_menu.obj xh_notbk.obj xh_panel.obj xh_radbt.obj &
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_bmpbt.obj xh_cald.obj xh_listc.obj xh_scrol.obj xh_stbox.obj xh_tree.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
all: $(WXXMLLIB)

View File

@ -212,6 +212,18 @@ SOURCE=.\xh_tree.cpp
# End Source File
# Begin Source File
SOURCE=.\xh_stlin.cpp
# End Source File
# Begin Source File
SOURCE=.\xh_bmp.cpp
# End Source File
# Begin Source File
SOURCE=.\xh_unkwn.cpp
# End Source File
# Begin Source File
SOURCE=.\xmlrsall.cpp
# End Source File
# End Target

View File

@ -0,0 +1,55 @@
/////////////////////////////////////////////////////////////////////////////
// Name: xh_stbox.cpp
// Purpose: XML resource for wxStaticLine
// Author: Brian Gavin
// Created: 2000/09/09
// RCS-ID: $Id$
// Copyright: (c) 2000 Brian Gavin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_stlin.h"
#endif
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/xml/xh_stlin.h"
#include "wx/statline.h"
#if wxUSE_STATLINE
wxStaticLineXmlHandler::wxStaticLineXmlHandler()
: wxXmlResourceHandler()
{
ADD_STYLE(wxLI_HORIZONTAL);
ADD_STYLE(wxLI_VERTICAL);
AddWindowStyles();
}
wxObject *wxStaticLineXmlHandler::DoCreateResource()
{
wxStaticLine *line = new wxStaticLine(m_ParentAsWindow,
GetID(),
GetPosition(), GetSize(),
GetStyle(_T("style"), wxLI_HORIZONTAL),
GetName()
);
SetupWindow(line);
return line;
}
bool wxStaticLineXmlHandler::CanHandle(wxXmlNode *node)
{
return node->GetName() == _T("staticline");
}
#endif

View File

@ -25,6 +25,8 @@
void wxXmlResource::InitAllHandlers()
{
AddHandler(new wxBitmapXmlHandler);
AddHandler(new wxIconXmlHandler);
AddHandler(new wxMenuXmlHandler);
AddHandler(new wxMenuBarXmlHandler);
@ -86,7 +88,8 @@ void wxXmlResource::InitAllHandlers()
#if wxUSE_TOOLBAR
AddHandler(new wxToolBarXmlHandler);
#endif
#if wxUSE_STATLINE
AddHandler(new wxStaticLineXmlHandler);
#endif
AddHandler(new wxUnknownWidgetXmlHandler);
}