wxStaticBitmap, wxStaticBox and wxPanel don't accept keyboard focus now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -28,7 +28,7 @@ public:
|
|||||||
|
|
||||||
// Old-style constructor (no default values for coordinates to avoid ambiguity
|
// Old-style constructor (no default values for coordinates to avoid ambiguity
|
||||||
// with the new one)
|
// with the new one)
|
||||||
inline wxPanel(wxWindow *parent,
|
wxPanel(wxWindow *parent,
|
||||||
int x, int y, int width, int height,
|
int x, int y, int width, int height,
|
||||||
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
||||||
const wxString& name = wxPanelNameStr)
|
const wxString& name = wxPanelNameStr)
|
||||||
@@ -37,7 +37,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
inline wxPanel(wxWindow *parent, wxWindowID id = -1,
|
wxPanel(wxWindow *parent,
|
||||||
|
wxWindowID id = -1,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
||||||
@@ -62,7 +63,11 @@ public:
|
|||||||
// Process a keyboard navigation message (Tab traversal)
|
// Process a keyboard navigation message (Tab traversal)
|
||||||
void OnNavigationKey(wxNavigationKeyEvent& event);
|
void OnNavigationKey(wxNavigationKeyEvent& event);
|
||||||
|
|
||||||
|
// override base class virtuals
|
||||||
|
// we don't want focus for ourselves
|
||||||
|
virtual bool AcceptsFocus() const { return FALSE; }
|
||||||
|
|
||||||
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS(wxPanel)
|
DECLARE_DYNAMIC_CLASS(wxPanel)
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
@@ -23,10 +23,11 @@ WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr;
|
|||||||
class WXDLLEXPORT wxStaticBitmap : public wxControl
|
class WXDLLEXPORT wxStaticBitmap : public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
|
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
|
||||||
public:
|
|
||||||
inline wxStaticBitmap(void) { }
|
|
||||||
|
|
||||||
inline wxStaticBitmap(wxWindow *parent, wxWindowID id,
|
public:
|
||||||
|
wxStaticBitmap() { }
|
||||||
|
|
||||||
|
wxStaticBitmap(wxWindow *parent, wxWindowID id,
|
||||||
const wxBitmap& label,
|
const wxBitmap& label,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
@@ -45,15 +46,16 @@ class WXDLLEXPORT wxStaticBitmap: public wxControl
|
|||||||
|
|
||||||
virtual void SetBitmap(const wxBitmap& bitmap);
|
virtual void SetBitmap(const wxBitmap& bitmap);
|
||||||
|
|
||||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
|
virtual void Command(wxCommandEvent& WXUNUSED(event)) { }
|
||||||
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) { }
|
||||||
|
|
||||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||||
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
void SetSize(const wxSize& size)
|
||||||
|
{ wxWindow::SetSize(size); }
|
||||||
|
|
||||||
inline wxBitmap& GetBitmap(void) const { return (wxBitmap&) m_messageBitmap; }
|
wxBitmap& GetBitmap(void) const { return (wxBitmap&) m_messageBitmap; }
|
||||||
|
|
||||||
// overriden base class virtuals
|
// overriden base class virtuals
|
||||||
virtual bool AcceptsFocus() const { return FALSE; }
|
virtual bool AcceptsFocus() const { return FALSE; }
|
||||||
@@ -61,6 +63,7 @@ class WXDLLEXPORT wxStaticBitmap: public wxControl
|
|||||||
// Implementation
|
// Implementation
|
||||||
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
||||||
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxBitmap m_messageBitmap;
|
wxBitmap m_messageBitmap;
|
||||||
|
|
||||||
|
@@ -26,8 +26,9 @@ class WXDLLEXPORT wxStaticBox: public wxControl
|
|||||||
DECLARE_DYNAMIC_CLASS(wxStaticBox)
|
DECLARE_DYNAMIC_CLASS(wxStaticBox)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
inline wxStaticBox(void) {}
|
wxStaticBox() {}
|
||||||
inline wxStaticBox(wxWindow *parent, wxWindowID id,
|
|
||||||
|
wxStaticBox(wxWindow *parent, wxWindowID id,
|
||||||
const wxString& label,
|
const wxString& label,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
@@ -44,8 +45,8 @@ class WXDLLEXPORT wxStaticBox: public wxControl
|
|||||||
long style = 0,
|
long style = 0,
|
||||||
const wxString& name = wxStaticBoxNameStr);
|
const wxString& name = wxStaticBoxNameStr);
|
||||||
|
|
||||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
|
virtual void Command(wxCommandEvent& WXUNUSED(event)) { }
|
||||||
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) { }
|
||||||
|
|
||||||
void OnEraseBackground(wxEraseEvent& event);
|
void OnEraseBackground(wxEraseEvent& event);
|
||||||
|
|
||||||
@@ -54,11 +55,17 @@ class WXDLLEXPORT wxStaticBox: public wxControl
|
|||||||
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||||
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
|
||||||
{ wxWindow::SetSize(rect, sizeFlags); }
|
{ wxWindow::SetSize(rect, sizeFlags); }
|
||||||
void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
|
void SetSize(const wxSize& size)
|
||||||
|
{ wxWindow::SetSize(size); }
|
||||||
void SetLabel(const wxString& label);
|
void SetLabel(const wxString& label);
|
||||||
|
|
||||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
|
||||||
|
// overriden base class virtuals
|
||||||
|
virtual bool AcceptsFocus() const { return FALSE; }
|
||||||
|
|
||||||
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user