X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/16e93305f2bae16652b6750dffe3bcf05c20d839..e63fdcd600e2eb717a19f9fa2895e9256e83c890:/include/wx/stubs/window.h?ds=sidebyside diff --git a/include/wx/stubs/window.h b/include/wx/stubs/window.h index b34c6be619..b94c1afe41 100644 --- a/include/wx/stubs/window.h +++ b/include/wx/stubs/window.h @@ -27,6 +27,7 @@ #include "wx/list.h" #include "wx/region.h" #include "wx/accel.h" +#include "wx/intl.h" #define wxKEY_SHIFT 1 #define wxKEY_CTRL 2 @@ -81,6 +82,33 @@ WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr; WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize; WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition; +//----------------------------------------------------------------------------- +// wxClientData +//----------------------------------------------------------------------------- + +class wxClientData +{ +public: + wxClientData() { } + virtual ~wxClientData() { } +}; + +//----------------------------------------------------------------------------- +// wxStringClientData +//----------------------------------------------------------------------------- + +class wxStringClientData: public wxClientData +{ +public: + wxStringClientData() { } + wxStringClientData( wxString &data ) { m_data = data; } + void SetData( wxString &data ) { m_data = data; } + wxString GetData() const { return m_data; } + +private: + wxString m_data; +}; + class WXDLLEXPORT wxWindow: public wxEvtHandler { DECLARE_ABSTRACT_CLASS(wxWindow) @@ -203,6 +231,18 @@ public: // Accept files for dragging virtual void DragAcceptFiles(bool accept); + // tooltips + // create a tooltip with this text + void SetToolTip(const wxString& tip); + + // TODO +#if 0 + // pointer may be NULL to remove the tooltip + void SetToolTip(wxToolTip *tooltip); + // get the current tooltip (may return NULL if none) + wxToolTip* GetToolTip() const { return m_tooltip; } +#endif + // Update region access virtual wxRegion GetUpdateRegion() const; virtual bool IsExposed(int x, int y, int w, int h) const; @@ -269,11 +309,11 @@ public: inline wxWindow *GetParent() const; inline void SetParent(wxWindow *p) ; inline wxWindow *GetGrandParent() const; - inline wxList *GetChildren() const; + inline wxList& GetChildren() const; // Set/get the window's font virtual void SetFont(const wxFont& f); - inline virtual wxFont *GetFont() const; + inline virtual wxFont& GetFont() const; // Set/get the window's validator void SetValidator(const wxValidator& validator); @@ -363,6 +403,8 @@ public: void OnEraseBackground(wxEraseEvent& event); void OnChar(wxKeyEvent& event); + void OnKeyDown(wxKeyEvent& event); + void OnKeyUp(wxKeyEvent& event); void OnPaint(wxPaintEvent& event); void OnIdle(wxIdleEvent& event); @@ -505,8 +547,8 @@ inline void wxWindow::SetId(int id) { m_windowId = id; } inline wxWindow *wxWindow::GetParent() const { return m_windowParent; } inline void wxWindow::SetParent(wxWindow *p) { m_windowParent = p; } inline wxWindow *wxWindow::GetGrandParent() const { return (m_windowParent ? m_windowParent->m_windowParent : (wxWindow*) NULL); } -inline wxList *wxWindow::GetChildren() const { return m_children; } -inline wxFont *wxWindow::GetFont() const { return (wxFont *) & m_windowFont; } +inline wxList& wxWindow::GetChildren() const { return (wxList&) * m_children; } +inline wxFont& wxWindow::GetFont() const { return (wxFont&) m_windowFont; } inline wxString wxWindow::GetName() const { return m_windowName; } inline void wxWindow::SetName(const wxString& name) { m_windowName = name; } inline long wxWindow::GetWindowStyleFlag() const { return m_windowStyle; }