implemented Get(Class)DefaultAttributes()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -350,8 +350,18 @@ public:
|
|||||||
// Necessary for drawing hrules and vrules, if specified
|
// Necessary for drawing hrules and vrules, if specified
|
||||||
void OnPaint(wxPaintEvent& event);
|
void OnPaint(wxPaintEvent& event);
|
||||||
|
|
||||||
|
|
||||||
virtual bool ShouldInheritColours() const { return false; }
|
virtual bool ShouldInheritColours() const { return false; }
|
||||||
|
|
||||||
|
virtual wxVisualAttributes GetDefaultAttributes() const
|
||||||
|
{
|
||||||
|
return GetClassDefaultAttributes(GetWindowVariant());
|
||||||
|
}
|
||||||
|
|
||||||
|
static wxVisualAttributes
|
||||||
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||||
|
|
||||||
|
|
||||||
// obsolete stuff, for compatibility only -- don't use
|
// obsolete stuff, for compatibility only -- don't use
|
||||||
wxDEPRECATED( int GetItemSpacing(bool isSmall) const);
|
wxDEPRECATED( int GetItemSpacing(bool isSmall) const);
|
||||||
|
|
||||||
|
@@ -408,11 +408,21 @@ public:
|
|||||||
long& cookie) const );
|
long& cookie) const );
|
||||||
#endif // WXWIN_COMPATIBILITY_2_4
|
#endif // WXWIN_COMPATIBILITY_2_4
|
||||||
|
|
||||||
virtual bool ShouldInheritColours() const { return false; }
|
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
// --------------
|
// --------------
|
||||||
|
|
||||||
|
virtual bool ShouldInheritColours() const { return false; }
|
||||||
|
|
||||||
|
virtual wxVisualAttributes GetDefaultAttributes() const
|
||||||
|
{
|
||||||
|
return GetClassDefaultAttributes(GetWindowVariant());
|
||||||
|
}
|
||||||
|
|
||||||
|
static wxVisualAttributes
|
||||||
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||||
|
|
||||||
|
|
||||||
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||||
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
||||||
|
@@ -363,11 +363,6 @@ bool wxListCtrl::Create(wxWindow *parent,
|
|||||||
0, LVS_EX_FULLROWSELECT);
|
0, LVS_EX_FULLROWSELECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// inherit foreground colour but our background should be the same as for
|
|
||||||
// listboxes and other such "container" windows and not inherited
|
|
||||||
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
|
||||||
SetForegroundColour(GetParent()->GetForegroundColour());
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -546,6 +541,17 @@ void wxListCtrl::SetWindowStyleFlag(long flag)
|
|||||||
// accessors
|
// accessors
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/* static */ wxVisualAttributes
|
||||||
|
wxListCtrl::GetClassDefaultAttributes(wxWindowVariant variant)
|
||||||
|
{
|
||||||
|
wxVisualAttributes attrs = GetCompositeControlsDefaultAttributes(variant);
|
||||||
|
|
||||||
|
// common controls have their own default font
|
||||||
|
attrs.font = wxGetCCDefaultFont();
|
||||||
|
|
||||||
|
return attrs;
|
||||||
|
}
|
||||||
|
|
||||||
// Sets the foreground, i.e. text, colour
|
// Sets the foreground, i.e. text, colour
|
||||||
bool wxListCtrl::SetForegroundColour(const wxColour& col)
|
bool wxListCtrl::SetForegroundColour(const wxColour& col)
|
||||||
{
|
{
|
||||||
|
@@ -787,6 +787,18 @@ wxTreeCtrl::~wxTreeCtrl()
|
|||||||
// accessors
|
// accessors
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/* static */ wxVisualAttributes
|
||||||
|
wxTreeCtrl::GetClassDefaultAttributes(wxWindowVariant variant)
|
||||||
|
{
|
||||||
|
wxVisualAttributes attrs = GetCompositeControlsDefaultAttributes(variant);
|
||||||
|
|
||||||
|
// common controls have their own default font
|
||||||
|
attrs.font = wxGetCCDefaultFont();
|
||||||
|
|
||||||
|
return attrs;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// simple wrappers which add error checking in debug mode
|
// simple wrappers which add error checking in debug mode
|
||||||
|
|
||||||
bool wxTreeCtrl::DoGetItem(wxTreeViewItem* tvItem) const
|
bool wxTreeCtrl::DoGetItem(wxTreeViewItem* tvItem) const
|
||||||
|
Reference in New Issue
Block a user