Add wxUxThemeHandle::DrawBackground() wrapper and use it
This is sightly shorter/more convenient to use than providing all the
parameters to ::DrawThemeBackground() every time.
Similarly to ca5f244f15 (Add wxUxThemeHandle::GetColour() replacing
MSWGetThemeColour(), 2022-12-09), this is just a refactoring which
shouldn't result in any changes in behaviour.
This commit is contained in:
parent
259a487475
commit
ef93da3160
10 changed files with 127 additions and 205 deletions
|
|
@ -166,7 +166,7 @@ WXDLLIMPEXP_CORE bool wxUxThemeIsActive();
|
|||
// wxUxThemeHandle: encapsulates ::Open/CloseThemeData()
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxUxThemeHandle
|
||||
class WXDLLIMPEXP_CORE wxUxThemeHandle
|
||||
{
|
||||
public:
|
||||
// For all factory functions, HWND doesn't need to be valid and may be
|
||||
|
|
@ -218,6 +218,11 @@ public:
|
|||
// GetThemeColor() because we want to default the state.
|
||||
wxColour GetColour(int part, int prop, int state = 0) const;
|
||||
|
||||
// Draw theme background: if the caller already has a RECT, it can be
|
||||
// provided directly, otherwise wxRect is converted to it.
|
||||
void DrawBackground(HDC hdc, const RECT& rc, int part, int state = 0);
|
||||
void DrawBackground(HDC hdc, const wxRect& rect, int part, int state = 0);
|
||||
|
||||
private:
|
||||
static const int STD_DPI = 96;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue