First step in background erase optimization
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
50a8b42c51
commit
50c538600e
@ -700,6 +700,23 @@ Returns the background colour of the window.
|
||||
\helpref{wxWindow::SetForegroundColour}{wxwindowsetforegroundcolour},\rtfsp
|
||||
\helpref{wxWindow::GetForegroundColour}{wxwindowgetforegroundcolour}
|
||||
|
||||
\membersection{wxWindow::GetBackgroundStyle}\label{wxwindowgetbackgroundstyle}
|
||||
|
||||
\constfunc{virtual wxBackgroundStyle}{GetBackgroundStyle}{\void}
|
||||
|
||||
Returns the background style of the window. The background style indicates
|
||||
whether background colour should be determined by the system (wxBG\_STYLE\_SYSTEM),
|
||||
be set to a specific colour (wxBG\_STYLE\_COLOUR), or should be left to the
|
||||
application to implement (wxBG\_STYLE\_CUSTOM).
|
||||
|
||||
On GTK+, use of wxBG\_STYLE\_CUSTOM allows the flicker-free drawing of a custom
|
||||
background, such as a tiled bitmap. Currently the style has no effect on other platforms.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxWindow::SetBackgroundColour}{wxwindowsetbackgroundcolour},\rtfsp
|
||||
\helpref{wxWindow::GetForegroundColour}{wxwindowgetforegroundcolour},\rtfsp
|
||||
\helpref{wxWindow::SetBackgroundStyle}{wxwindowsetbackgroundstyle}
|
||||
|
||||
\membersection{wxWindow::GetBestFittingSize}\label{wxwindowgetbestfittingsize}
|
||||
|
||||
@ -2431,6 +2448,24 @@ applications on the system.
|
||||
\helpref{wxWindow::Refresh}{wxwindowrefresh},\rtfsp
|
||||
\helpref{wxEraseEvent}{wxeraseevent}
|
||||
|
||||
\membersection{wxWindow::SetBackgroundStyle}\label{wxwindowsetbackgroundstyle}
|
||||
|
||||
\func{virtual void}{SetBackgroundStyle}{\param{wxBackgroundStyle}{ style}}
|
||||
|
||||
Sets the background style of the window. The background style indicates
|
||||
whether background colour should be determined by the system (wxBG\_STYLE\_SYSTEM),
|
||||
be set to a specific colour (wxBG\_STYLE\_COLOUR), or should be left to the
|
||||
application to implement (wxBG\_STYLE\_CUSTOM).
|
||||
|
||||
On GTK+, use of wxBG\_STYLE\_CUSTOM allows the flicker-free drawing of a custom
|
||||
background, such as a tiled bitmap. Currently the style has no effect on other platforms.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxWindow::SetBackgroundColour}{wxwindowsetbackgroundcolour},\rtfsp
|
||||
\helpref{wxWindow::GetForegroundColour}{wxwindowgetforegroundcolour},\rtfsp
|
||||
\helpref{wxWindow::GetBackgroundStyle}{wxwindowgetbackgroundstyle}
|
||||
|
||||
|
||||
\membersection{wxWindow::SetBestFittingSize}\label{wxwindowsetbestfittingsize}
|
||||
|
||||
|
@ -1405,6 +1405,17 @@ enum wxBorder
|
||||
#define wxMORE 0x00010000
|
||||
#define wxSETUP 0x00020000
|
||||
|
||||
/*
|
||||
* Background styles. See wxWindow::SetBackgroundStyle
|
||||
*/
|
||||
|
||||
enum wxBackgroundStyle
|
||||
{
|
||||
wxBG_STYLE_SYSTEM,
|
||||
wxBG_STYLE_COLOUR,
|
||||
wxBG_STYLE_CUSTOM
|
||||
};
|
||||
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
/* standard IDs */
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
|
@ -751,6 +751,11 @@ public:
|
||||
}
|
||||
wxColour GetForegroundColour() const;
|
||||
|
||||
// Set/get the background style.
|
||||
// Pass one of wxBG_STYLE_SYSTEM, wxBG_STYLE_COLOUR, wxBG_STYLE_CUSTOM
|
||||
virtual bool SetBackgroundStyle(wxBackgroundStyle style) { m_backgroundStyle = style; return true; }
|
||||
virtual wxBackgroundStyle GetBackgroundStyle() const { return m_backgroundStyle; }
|
||||
|
||||
// set/retrieve the font for the window (SetFont() returns true if the
|
||||
// font really changed)
|
||||
virtual bool SetFont(const wxFont& font) = 0;
|
||||
@ -1150,7 +1155,7 @@ protected:
|
||||
m_exStyle;
|
||||
wxString m_windowName;
|
||||
bool m_themeEnabled;
|
||||
|
||||
wxBackgroundStyle m_backgroundStyle;
|
||||
#if wxUSE_PALETTE
|
||||
wxPalette m_palette;
|
||||
bool m_hasCustomPalette;
|
||||
|
@ -152,6 +152,8 @@ wxWindowBase::wxWindowBase()
|
||||
// no style bits
|
||||
m_exStyle =
|
||||
m_windowStyle = 0;
|
||||
|
||||
m_backgroundStyle = wxBG_STYLE_SYSTEM;
|
||||
|
||||
#if wxUSE_CONSTRAINTS
|
||||
// no constraints whatsoever
|
||||
|
Loading…
Reference in New Issue
Block a user