added AddWindowStyles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
fcec64291d
commit
09dc1241b7
@ -20,7 +20,7 @@
|
||||
class WXDLLEXPORT wxButtonXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxButtonXmlHandler() : wxXmlResourceHandler() {}
|
||||
wxButtonXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
@ -225,6 +225,9 @@ class WXDLLEXPORT wxXmlResourceHandler : public wxObject
|
||||
// Add style flag (e.g. wxMB_DOCKABLE) to list of flags
|
||||
// understood by this handler
|
||||
void AddStyle(const wxString& name, int value);
|
||||
|
||||
// Add styles common to all wxWindow-derived classes
|
||||
void AddWindowStyles();
|
||||
|
||||
// Gets style flags from text in form "flag | flag2| flag3 |..."
|
||||
// Only understads flags added with AddStyle
|
||||
|
@ -23,6 +23,13 @@
|
||||
#include "wx/button.h"
|
||||
|
||||
|
||||
wxButtonXmlHandler::wxButtonXmlHandler()
|
||||
: wxXmlResourceHandler()
|
||||
{
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
|
||||
wxObject *wxButtonXmlHandler::DoCreateResource()
|
||||
{
|
||||
wxButton *button = new wxButton(m_ParentAsWindow,
|
||||
|
@ -27,6 +27,7 @@
|
||||
wxCheckBoxXmlHandler::wxCheckBoxXmlHandler()
|
||||
: wxXmlResourceHandler()
|
||||
{
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
wxObject *wxCheckBoxXmlHandler::DoCreateResource()
|
||||
|
@ -26,6 +26,7 @@ wxCheckListXmlHandler::wxCheckListXmlHandler()
|
||||
: wxXmlResourceHandler(), m_InsideBox(FALSE)
|
||||
{
|
||||
// no styles
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
wxObject *wxCheckListXmlHandler::DoCreateResource()
|
||||
|
@ -26,6 +26,7 @@ wxChoiceXmlHandler::wxChoiceXmlHandler()
|
||||
: wxXmlResourceHandler() , m_InsideBox(FALSE)
|
||||
{
|
||||
ADD_STYLE(wxCB_SORT);
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
wxObject *wxChoiceXmlHandler::DoCreateResource()
|
||||
|
@ -31,6 +31,7 @@ wxComboBoxXmlHandler::wxComboBoxXmlHandler()
|
||||
ADD_STYLE(wxCB_SORT);
|
||||
ADD_STYLE(wxCB_READONLY);
|
||||
ADD_STYLE(wxCB_DROPDOWN);
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
wxObject *wxComboBoxXmlHandler::DoCreateResource()
|
||||
|
@ -40,6 +40,8 @@ wxDialogXmlHandler::wxDialogXmlHandler() : wxXmlResourceHandler()
|
||||
ADD_STYLE(wxNO_3D);
|
||||
ADD_STYLE(wxTAB_TRAVERSAL);
|
||||
ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY);
|
||||
ADD_STYLE(wxCLIP_CHILDREN);
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
|
||||
|
@ -31,6 +31,7 @@ wxGaugeXmlHandler::wxGaugeXmlHandler()
|
||||
ADD_STYLE( wxGA_VERTICAL );
|
||||
ADD_STYLE( wxGA_PROGRESSBAR );
|
||||
ADD_STYLE( wxGA_SMOOTH ); // windows only
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
wxObject *wxGaugeXmlHandler::DoCreateResource()
|
||||
|
@ -31,6 +31,7 @@ wxHtmlWindowXmlHandler::wxHtmlWindowXmlHandler()
|
||||
{
|
||||
ADD_STYLE( wxHW_SCROLLBAR_NEVER );
|
||||
ADD_STYLE( wxHW_SCROLLBAR_AUTO );
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
wxObject *wxHtmlWindowXmlHandler::DoCreateResource()
|
||||
|
@ -32,6 +32,7 @@ wxListBoxXmlHandler::wxListBoxXmlHandler()
|
||||
ADD_STYLE(wxLB_ALWAYS_SB);
|
||||
ADD_STYLE(wxLB_NEEDED_SB);
|
||||
ADD_STYLE(wxLB_SORT);
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
wxObject *wxListBoxXmlHandler::DoCreateResource()
|
||||
|
@ -34,6 +34,7 @@ wxNotebookXmlHandler::wxNotebookXmlHandler()
|
||||
ADD_STYLE(wxNB_LEFT);
|
||||
ADD_STYLE(wxNB_RIGHT);
|
||||
ADD_STYLE(wxNB_BOTTOM);
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
|
||||
|
@ -28,6 +28,8 @@ wxPanelXmlHandler::wxPanelXmlHandler() : wxXmlResourceHandler()
|
||||
ADD_STYLE(wxNO_3D);
|
||||
ADD_STYLE(wxTAB_TRAVERSAL);
|
||||
ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY);
|
||||
ADD_STYLE(wxCLIP_CHILDREN);
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
|
||||
|
@ -28,6 +28,7 @@ wxRadioButtonXmlHandler::wxRadioButtonXmlHandler()
|
||||
: wxXmlResourceHandler()
|
||||
{
|
||||
ADD_STYLE( wxRB_GROUP );
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
wxObject *wxRadioButtonXmlHandler::DoCreateResource()
|
||||
|
@ -31,6 +31,7 @@ wxRadioBoxXmlHandler::wxRadioBoxXmlHandler()
|
||||
ADD_STYLE(wxRA_HORIZONTAL);
|
||||
ADD_STYLE(wxRA_SPECIFY_ROWS);
|
||||
ADD_STYLE(wxRA_VERTICAL);
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
wxObject *wxRadioBoxXmlHandler::DoCreateResource()
|
||||
|
@ -37,6 +37,7 @@ wxSliderXmlHandler::wxSliderXmlHandler()
|
||||
ADD_STYLE( wxSL_BOTTOM );
|
||||
ADD_STYLE( wxSL_BOTH );
|
||||
ADD_STYLE( wxSL_SELRANGE );
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
wxObject *wxSliderXmlHandler::DoCreateResource()
|
||||
|
@ -31,6 +31,7 @@ wxSpinButtonXmlHandler::wxSpinButtonXmlHandler()
|
||||
ADD_STYLE( wxSP_VERTICAL );
|
||||
ADD_STYLE( wxSP_ARROW_KEYS );
|
||||
ADD_STYLE( wxSP_WRAP );
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
wxObject *wxSpinButtonXmlHandler::DoCreateResource()
|
||||
|
@ -25,6 +25,7 @@
|
||||
wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler()
|
||||
: wxXmlResourceHandler()
|
||||
{
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
wxObject *wxStaticBitmapXmlHandler::DoCreateResource()
|
||||
|
@ -26,6 +26,7 @@ wxStaticTextXmlHandler::wxStaticTextXmlHandler()
|
||||
: wxXmlResourceHandler()
|
||||
{
|
||||
ADD_STYLE( wxST_NO_AUTORESIZE );
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
wxObject *wxStaticTextXmlHandler::DoCreateResource()
|
||||
|
@ -30,6 +30,7 @@ wxTextCtrlXmlHandler::wxTextCtrlXmlHandler() : wxXmlResourceHandler()
|
||||
ADD_STYLE(wxTE_PASSWORD);
|
||||
ADD_STYLE(wxTE_READONLY);
|
||||
ADD_STYLE(wxHSCROLL);
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
wxObject *wxTextCtrlXmlHandler::DoCreateResource()
|
||||
|
@ -386,6 +386,21 @@ void wxXmlResourceHandler::AddStyle(const wxString& name, int value)
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxXmlResourceHandler::AddWindowStyles()
|
||||
{
|
||||
ADD_STYLE(wxSIMPLE_BORDER);
|
||||
ADD_STYLE(wxSUNKEN_BORDER);
|
||||
ADD_STYLE(wxDOUBLE_BORDER);
|
||||
ADD_STYLE(wxRAISED_BORDER);
|
||||
ADD_STYLE(wxSTATIC_BORDER);
|
||||
ADD_STYLE(wxTRANSPARENT_WINDOW);
|
||||
ADD_STYLE(wxWANTS_CHARS);
|
||||
ADD_STYLE(wxNO_FULL_REPAINT_ON_RESIZE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool wxXmlResourceHandler::HasParam(const wxString& param)
|
||||
{
|
||||
return (GetParamNode(param) != NULL);
|
||||
|
@ -4,6 +4,6 @@ type panel
|
||||
icon 1
|
||||
childtype panel_item
|
||||
abstract
|
||||
var style of flags wxNO_3D,wxTAB_TRAVERSAL
|
||||
var style of flags wxNO_3D,wxTAB_TRAVERSAL,wxCLIP_CHILDREN
|
||||
var exstyle of flags wxWS_EX_VALIDATE_RECURSIVELY
|
||||
derived from window
|
||||
|
@ -3,6 +3,7 @@ type normal
|
||||
abstract
|
||||
var pos of coord
|
||||
var size of coord
|
||||
var style of flags wxSIMPLE_BORDER,wxSUNKEN_BORDER,wxDOUBLE_BORDER,wxRAISED_BORDER,wxSTATIC_BORDER,wxTRANSPARENT_WINDOW,wxWANTS_CHARS,wxNO_FULL_REPAINT_ON_RESIZE
|
||||
var tooltip of text
|
||||
var fg of color
|
||||
var bg of color
|
||||
|
Loading…
Reference in New Issue
Block a user