Added wxBORDER_THEME, wxWindow::GetDefaultBorderForControl(), wxWindow::CanApplyThemeBorder().
wxTextCtrl and wxSearchCtrl now get the correct border on wxMSW, and the wxRichTextCtrl sample also now demonstrates correct borders. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -58,6 +58,9 @@ public:
|
||||
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const { return false; }
|
||||
|
||||
private:
|
||||
void MakeOwnerDrawn();
|
||||
|
||||
|
@@ -47,6 +47,9 @@ public:
|
||||
virtual bool SetForegroundColour(const wxColour& colour);
|
||||
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const { return false; }
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
|
@@ -85,6 +85,9 @@ public:
|
||||
virtual bool MSWShouldPreProcessMessage(WXMSG *pMsg);
|
||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const { return false; }
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init() { m_lastAcceptedSelection = wxID_NONE; }
|
||||
|
@@ -57,6 +57,9 @@ public:
|
||||
|
||||
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const { return false; }
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
|
@@ -58,6 +58,9 @@ public:
|
||||
|
||||
WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const { return false; }
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
|
@@ -133,6 +133,9 @@ public:
|
||||
return GetCompositeControlsDefaultAttributes(variant);
|
||||
}
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const { return false; }
|
||||
|
||||
protected:
|
||||
virtual void DoSetSelection(int n, bool select);
|
||||
|
||||
|
@@ -115,6 +115,9 @@ public:
|
||||
// it to behave normally
|
||||
virtual bool AcceptsFocus() const { return wxControl::AcceptsFocus(); }
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const { return false; }
|
||||
|
||||
void SetLabelFont(const wxFont& WXUNUSED(font)) {}
|
||||
void SetButtonFont(const wxFont& font) { SetFont(font); }
|
||||
|
||||
|
@@ -58,6 +58,9 @@ public:
|
||||
|
||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const { return false; }
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
|
@@ -83,6 +83,8 @@ public:
|
||||
// we should let background show through the slider (and its labels)
|
||||
virtual bool HasTransparentBackground() { return true; }
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const { return false; }
|
||||
|
||||
void Command(wxCommandEvent& event);
|
||||
virtual bool MSWOnScroll(int orientation, WXWORD wParam,
|
||||
|
@@ -57,6 +57,9 @@ public:
|
||||
// a wxSpinButton can't do anything useful with focus, only wxSpinCtrl can
|
||||
virtual bool AcceptsFocus() const { return false; }
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const { return false; }
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
|
@@ -54,6 +54,9 @@ public:
|
||||
|
||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const { return false; }
|
||||
|
||||
protected:
|
||||
virtual wxBorder GetDefaultBorder() const;
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
@@ -40,6 +40,9 @@ public:
|
||||
|
||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const { return false; }
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
|
@@ -170,6 +170,9 @@ public:
|
||||
|
||||
virtual bool AcceptsFocus() const;
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const;
|
||||
|
||||
// callbacks
|
||||
void OnDropFiles(wxDropFilesEvent& event);
|
||||
void OnChar(wxKeyEvent& event); // Process 'enter' if required
|
||||
|
@@ -48,6 +48,9 @@ public:
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const { return false; }
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual wxBorder GetDefaultBorder() const;
|
||||
|
@@ -107,6 +107,9 @@ public:
|
||||
// window proc for the frames
|
||||
WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const { return false; }
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
@@ -210,6 +210,9 @@ public:
|
||||
void SetState(const wxTreeItemId& node, int state);
|
||||
int GetState(const wxTreeItemId& node);
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const { return false; }
|
||||
|
||||
protected:
|
||||
// SetImageList helper
|
||||
void SetAnyImageList(wxImageList *imageList, int which);
|
||||
|
@@ -433,6 +433,11 @@ public:
|
||||
// check if a native double-buffering applies for this window
|
||||
virtual bool IsDoubleBuffered() const;
|
||||
|
||||
// this allows you to implement standard control borders without
|
||||
// repeating the code in different classes that are not derived from
|
||||
// wxControl
|
||||
virtual wxBorder GetDefaultBorderForControl() const;
|
||||
|
||||
// synthesize a wxEVT_LEAVE_WINDOW event and set m_mouseInWindow to false
|
||||
void GenerateMouseLeave();
|
||||
|
||||
|
Reference in New Issue
Block a user