Add GetClassDefaultAttribute. Since it is static we need to put the

definition in all window classes so the right one will be called on
the C++ side of the fence.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2004-05-06 17:35:43 +00:00
parent 6dc779e818
commit 880715c9a9
22 changed files with 83 additions and 2 deletions

View File

@ -99,6 +99,9 @@ public:
DocDeclStr(
static wxSize , GetDefaultSize(),
"Returns the default button size for this platform.");
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};

View File

@ -150,6 +150,8 @@ state to wx.CHK_UNDETERMINED.");
"Returns whether or not the user can set the CheckBox to the third
state.");
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
//---------------------------------------------------------------------------

View File

@ -94,6 +94,9 @@ public:
%pythoncode { Select = SetSelection }
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
//---------------------------------------------------------------------------

View File

@ -166,6 +166,8 @@ public:
virtual void , Remove(long from, long to),
"Removes the text between the two positions in the combobox text field.");
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
//---------------------------------------------------------------------------

View File

@ -65,6 +65,10 @@ public:
virtual int GetShadowWidth() const;
virtual void SetBezelFace(int w);
virtual int GetBezelFace() const;
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
//---------------------------------------------------------------------------

View File

@ -115,6 +115,9 @@ public:
// cycle thru the pages
void AdvanceSelection(bool forward = True);
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
@ -202,6 +205,9 @@ public:
// Windows only: attempts to apply the UX theme page background to this page
void ApplyThemeBackground(wxWindow* window, const wxColour& colour);
#endif
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};

View File

@ -45,6 +45,8 @@ public:
void InitDialog();
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
//---------------------------------------------------------------------------
@ -156,6 +158,9 @@ public:
void SetTargetRect(const wxRect& rect);
wxRect GetTargetRect() const;
#endif
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};

View File

@ -86,6 +86,8 @@ public:
}
#endif
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
@ -117,6 +119,9 @@ public:
bool GetValue();
void SetValue(bool value);
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
//---------------------------------------------------------------------------

View File

@ -52,6 +52,9 @@ public:
virtual void SetScrollbar(int position, int thumbSize,
int range, int pageSize,
bool refresh = True);
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
//---------------------------------------------------------------------------

View File

@ -83,6 +83,9 @@ public:
virtual int GetSelStart() const;
virtual void SetSelection(int min, int max);
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
//---------------------------------------------------------------------------

View File

@ -68,6 +68,9 @@ public:
// is this spin button vertically oriented?
bool IsVertical() const;
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
@ -110,6 +113,9 @@ public:
virtual int GetMin() const;
virtual int GetMax() const;
void SetSelection(long from, long to);
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};

View File

@ -334,6 +334,9 @@ unsplit even if minimum size is non-zero.");
void SetNeedUpdating(bool needUpdating);
bool GetNeedUpdating() const;
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};

View File

@ -40,6 +40,9 @@ public:
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyStaticBoxNameStr);
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
@ -71,6 +74,8 @@ public:
// get the default size for the "lesser" dimension of the static line
static int GetDefaultSize();
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
@ -94,6 +99,9 @@ public:
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyStaticTextNameStr);
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
//---------------------------------------------------------------------------
@ -122,6 +130,9 @@ public:
wxBitmap GetBitmap();
void SetBitmap(const wxBitmap& bitmap);
void SetIcon(const wxIcon& icon);
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
//---------------------------------------------------------------------------

View File

@ -74,6 +74,9 @@ public:
// get the dimensions of the horizontal and vertical borders
virtual int GetBorderX() const;
virtual int GetBorderY() const;
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};

View File

@ -309,6 +309,8 @@ public:
}
}
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
//---------------------------------------------------------------------------

View File

@ -78,6 +78,9 @@ public:
void SetValue(bool value);
bool GetValue() const ;
void SetLabel(const wxString& label);
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
//---------------------------------------------------------------------------

View File

@ -405,6 +405,9 @@ public:
const wxString& name = wxPyToolBarNameStr);
wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y);
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
//---------------------------------------------------------------------------

View File

@ -247,6 +247,9 @@ public:
// send wxUpdateUIEvents for all menu items in the menubar,
// or just for menu if non-NULL
void DoMenuUpdates(wxMenu* menu = NULL);
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
//---------------------------------------------------------------------------
@ -299,6 +302,9 @@ public:
// may be called to terminate the dialog with the given return code
virtual void EndModal(int retCode);
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};
//---------------------------------------------------------------------------

View File

@ -31,7 +31,7 @@ struct wxVisualAttributes
{
%extend {
wxVisualAttributes() { return new wxVisualAttributes; }
~wxVisualAttributes() {}
~wxVisualAttributes() { delete self; }
}
// the font used for control label/text inside it
@ -1190,7 +1190,7 @@ exposed.");
DocDeclStr(
wxVisualAttributes , GetDefaultAttributes() const,
virtual wxVisualAttributes , GetDefaultAttributes() const,
"Get the default attributes for an instance of this class. This
is useful if you want to use the same font or colour in your own
control as in a standard control -- which is a much better idea

View File

@ -399,6 +399,9 @@ are:
DocDeclStr(
wxControl*, GetYearControl() const,
"Get the currently shown control for year.");
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};

View File

@ -1938,6 +1938,8 @@ public:
wxWindow* GetGridCornerLabelWindow();
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};

View File

@ -903,6 +903,9 @@ public:
void base_OnCellClicked(wxHtmlCell *cell,
wxCoord x, wxCoord y,
const wxMouseEvent& event);
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};