virtual size_t GetDataSize(const wxDataFormat& format) const;
virtual bool GetDataHere(const wxDataFormat& format, void *buf) const;
virtual bool SetData(const wxDataFormat& format, size_t len, const void *buf);
-
-protected:
- // returns the pointer to the object which supports this format or NULL
- wxDataObjectSimple *GetObject(const wxDataFormat& format) const;
#if defined(__WXMSW__)
virtual const void* GetSizeFromBuffer( const void* buffer, size_t* size,
const wxDataFormat& format );
virtual size_t GetBufferOffset( const wxDataFormat& format );
#endif
+protected:
+ // returns the pointer to the object which supports this format or NULL
+ wxDataObjectSimple *GetObject(const wxDataFormat& format) const;
+
private:
// the list of all (simple) data objects whose formats we support
wxSimpleDataObjectList m_dataObjects;
virtual size_t GetDataSize() const;
virtual bool GetDataHere(void *buf) const;
virtual bool SetData(size_t len, const void *buf);
-
- size_t GetDataSize(const wxDataFormat& format) const
- { return(wxDataObjectSimple::GetDataSize(format)); }
- bool GetDataHere(const wxDataFormat& format, void *pBuf) const
- { return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
- bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
- { return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
+ // Must provide overloads to avoid hiding them (and warnings about it)
+ virtual size_t GetDataSize(const wxDataFormat&) const
+ {
+ return GetDataSize();
+ }
+ virtual bool GetDataHere(const wxDataFormat&, void *buf) const
+ {
+ return GetDataHere(buf);
+ }
+ virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
+ {
+ return SetData(len, buf);
+ }
#endif
private:
// get a reference to our array
const wxArrayString& GetFilenames() const { return m_filenames; }
- // the Get() functions do nothing for us
- virtual size_t GetDataSize() const { return 0; }
- virtual bool GetDataHere(void *WXUNUSED(buf)) const { return false; }
-
protected:
wxArrayString m_filenames;
-private:
- // Virtual function hiding supression
- size_t GetDataSize(const wxDataFormat& format) const
- { return(wxDataObjectSimple::GetDataSize(format)); }
- bool GetDataHere(const wxDataFormat& format, void* pBuf) const
- { return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
-
DECLARE_NO_COPY_CLASS(wxFileDataObjectBase)
};
virtual size_t GetDataSize() const;
virtual bool GetDataHere(void *buf) const;
virtual bool SetData(size_t size, const void *buf);
+ // Must provide overloads to avoid hiding them (and warnings about it)
+ virtual size_t GetDataSize(const wxDataFormat&) const
+ {
+ return GetDataSize();
+ }
+ virtual bool GetDataHere(const wxDataFormat&, void *buf) const
+ {
+ return GetDataHere(buf);
+ }
+ virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
+ {
+ return SetData(len, buf);
+ }
private:
size_t m_size;
void *m_data;
- // virtual function hiding supression
- size_t GetDataSize(const wxDataFormat& format) const
- { return(wxDataObjectSimple::GetDataSize(format)); }
- bool GetDataHere(const wxDataFormat& format, void* pBuf) const
- { return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
- bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
- { return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
-
DECLARE_NO_COPY_CLASS(wxCustomDataObject)
};
void OnSysColourChanged(wxSysColourChangedEvent& event);
+protected:
+ // override some base class virtuals
+ virtual wxSize DoGetBestSize() const;
+ virtual void DoGetPosition(int *x, int *y) const;
+ virtual void DoGetSize(int *width, int *height) const;
+ virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags);
+ virtual void DoMoveWindow(int x, int y, int width, int height);
+
private:
// common part of all ctors
void Init();
void OnYearChange(wxCommandEvent& event);
void OnYearTextChange(wxCommandEvent& event);
- // override some base class virtuals
- virtual wxSize DoGetBestSize() const;
- virtual void DoGetPosition(int *x, int *y) const;
- virtual void DoGetSize(int *width, int *height) const;
- virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags);
- virtual void DoMoveWindow(int x, int y, int width, int height);
-
// (re)calc m_widthCol and m_heightRow
void RecalcGeometry();
virtual bool Ok() const;
- bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, int style=wxFLOOD_SURFACE );
- bool DoGetPixel(wxCoord x1, wxCoord y1, wxColour *col) const;
-
- void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
- void DoCrossHair(wxCoord x, wxCoord y) ;
- void DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoord xc,wxCoord yc);
- void DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea);
- void DoDrawPoint(wxCoord x, wxCoord y);
- void DoDrawLines(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0);
- void DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, int fillStyle=wxODDEVEN_RULE);
- void DoDrawPolyPolygon(int n, int count[], wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, int fillStyle=wxODDEVEN_RULE);
- void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
- void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20);
- void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
-
-#if wxUSE_SPLINES
- void DoDrawSpline(wxList *points);
-#endif // wxUSE_SPLINES
- bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
- wxDC *source, wxCoord xsrc, wxCoord ysrc, int rop = wxCOPY, bool useMask = false,
- wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
bool CanDrawBitmap() const { return true; }
- void DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y );
- void DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask = false );
-
- void DoDrawText(const wxString& text, wxCoord x, wxCoord y );
- void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
-
void Clear();
void SetFont( const wxFont& font );
void SetPen( const wxPen& pen );
void SetLogicalFunction( int function );
void SetBackground( const wxBrush& brush );
- void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DestroyClippingRegion();
- void DoSetClippingRegionAsRegion( const wxRegion &WXUNUSED(clip) ) { }
-
bool StartDoc(const wxString& message);
void EndDoc();
void StartPage();
wxCoord GetCharHeight() const;
wxCoord GetCharWidth() const;
bool CanGetTextExtent() const { return true; }
- void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
- wxCoord *descent = (wxCoord *) NULL,
- wxCoord *externalLeading = (wxCoord *) NULL,
- wxFont *theFont = (wxFont *) NULL ) const;
-
- void DoGetSize(int* width, int* height) const;
- void DoGetSizeMM(int *width, int *height) const;
// Resolution in pixels per logical inch
wxSize GetPPI() const;
static float ms_PSScaleFactor;
protected:
+ bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, int style = wxFLOOD_SURFACE);
+ bool DoGetPixel(wxCoord x1, wxCoord y1, wxColour *col) const;
+ void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
+ void DoCrossHair(wxCoord x, wxCoord y) ;
+ void DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoord xc,wxCoord yc);
+ void DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea);
+ void DoDrawPoint(wxCoord x, wxCoord y);
+ void DoDrawLines(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0);
+ void DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, int fillStyle = wxODDEVEN_RULE);
+ void DoDrawPolyPolygon(int n, int count[], wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, int fillStyle = wxODDEVEN_RULE);
+ void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
+ void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20);
+ void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
+#if wxUSE_SPLINES
+ void DoDrawSpline(wxList *points);
+#endif // wxUSE_SPLINES
+ bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
+ wxDC *source, wxCoord xsrc, wxCoord ysrc, int rop = wxCOPY, bool useMask = false,
+ wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
+ void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
+ void DoDrawBitmap(const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask = false);
+ void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
+ void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
+ void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
+ void DoSetClippingRegionAsRegion( const wxRegion &WXUNUSED(clip)) { }
+ void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
+ wxCoord *descent = NULL,
+ wxCoord *externalLeading = NULL,
+ wxFont *theFont = NULL) const;
+ void DoGetSize(int* width, int* height) const;
+ void DoGetSizeMM(int *width, int *height) const;
FILE* m_pstream; // PostScript output stream
wxString m_title;
bool ScrollList( int dx, int dy );
bool SortItems( wxListCtrlCompare fn, long data );
bool Update( long item );
+ // Must provide overload to avoid hiding it (and warnings about it)
+ virtual void Update() { wxControl::Update(); }
// are we in report mode?
bool InReportView() const { return HasFlag(wxLC_REPORT); }
virtual wxDropTarget *GetDropTarget() const;
#endif
- virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
-
virtual bool ShouldInheritColours() const { return false; }
virtual void SetFocus();
- virtual wxSize DoGetBestSize() const;
-
// implementation
// --------------
wxCoord m_headerHeight;
protected:
+ virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
+
+ virtual wxSize DoGetBestSize() const;
+
// return the text for the given column of the given item
virtual wxString OnGetItemText(long item, long column) const;
friend class WXDLLEXPORT wxListMainWindow;
private:
- // Virtual function hiding supression
- virtual void Update() { wxWindow::Update(); }
-
// create the header window
void CreateHeaderWindow();
public:
wxLogTextCtrl(wxTextCtrl *pTextCtrl);
-private:
+protected:
// implement sink function
virtual void DoLogString(const wxChar *szString, time_t t);
+private:
// the control we use
wxTextCtrl *m_pTextCtrl;
@returns true if ABORT button has not been pressed
*/
virtual bool Update(int value, const wxString& newmsg = wxEmptyString, bool *skip = NULL);
+ // Must provide overload to avoid hiding it (and warnings about it)
+ virtual void Update() { wxDialog::Update(); }
/* Can be called to continue after the cancel button has been pressed, but
the program decided to continue the operation (e.g., user didn't
class WXDLLEXPORT wxWindowDisabler *m_winDisabler;
DECLARE_EVENT_TABLE()
-private:
- // Virtual function hiding supression
- virtual void Update() { wxDialog::Update(); }
-
DECLARE_NO_COPY_CLASS(wxProgressDialog)
};
void NotFocus();
void StartSelect();
void EndSelect();
- void DoApplyWidgetStyle(GtkRcStyle *style);
bool m_hasFocus:1;
bool m_isSelected:1;
protected:
virtual void OnSetBitmap();
virtual wxSize DoGetBestSize() const;
+ void DoApplyWidgetStyle(GtkRcStyle *style);
void Init();
void SetStyle( int style );
void SetStipple( const wxBitmap& stipple );
-private:
+protected:
// ref counting code
virtual wxObjectRefData *CreateRefData() const;
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
// implementation
// --------------
- void DoApplyWidgetStyle(GtkRcStyle *style);
bool IsOwnGtkWindow( GdkWindow *window );
// Since this wxButton doesn't derive from wxButtonBase (why?) we need
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
+ // helper to allow access to protected member from GTK callback
+ void MoveWindow(int x, int y, int width, int height) { DoMoveWindow(x, y, width, height); }
+
protected:
virtual wxSize DoGetBestSize() const;
+ void DoApplyWidgetStyle(GtkRcStyle *style);
private:
DECLARE_DYNAMIC_CLASS(wxButton)
// implementation
// --------------
- void DoApplyWidgetStyle(GtkRcStyle *style);
bool IsOwnGtkWindow( GdkWindow *window );
void OnInternalIdle();
protected:
virtual wxSize DoGetBestSize() const;
+ void DoApplyWidgetStyle(GtkRcStyle *style);
void DoSet3StateValue(wxCheckBoxState state);
wxCheckBoxState DoGet3StateValue() const;
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
+ virtual bool IsOwnGtkWindow( GdkWindow *window );
+
protected:
wxList m_clientList; // contains the client data for the items
virtual wxSize DoGetBestSize() const;
- virtual bool IsOwnGtkWindow( GdkWindow *window );
-
private:
// common part of Create() and DoAppend()
int GtkAddHelper(GtkWidget *menu, int pos, const wxString& item);
void EnableEvents();
GtkWidget* GetConnectWidget();
bool IsOwnGtkWindow( GdkWindow *window );
- void DoApplyWidgetStyle(GtkRcStyle *style);
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
protected:
+ void DoApplyWidgetStyle(GtkRcStyle *style);
virtual int DoAppend(const wxString& item);
virtual int DoInsert(const wxString& item, int pos);
virtual size_t GetDataSize() const { return m_pngSize; }
virtual bool GetDataHere(void *buf) const;
virtual bool SetData(size_t len, const void *buf);
+ // Must provide overloads to avoid hiding them (and warnings about it)
+ virtual size_t GetDataSize(const wxDataFormat&) const
+ {
+ return GetDataSize();
+ }
+ virtual bool GetDataHere(const wxDataFormat&, void *buf) const
+ {
+ return GetDataHere(buf);
+ }
+ virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
+ {
+ return SetData(len, buf);
+ }
protected:
void Init() { m_pngData = (void *)NULL; m_pngSize = 0; }
void *m_pngData;
void DoConvertToPng();
-
-private:
- // virtual function hiding supression
- size_t GetDataSize(const wxDataFormat& format) const
- { return(wxDataObjectSimple::GetDataSize(format)); }
- bool GetDataHere(const wxDataFormat& format, void* pBuf) const
- { return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
- bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
- { return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
};
// ----------------------------------------------------------------------------
virtual size_t GetDataSize() const;
virtual bool GetDataHere(void *buf) const;
virtual bool SetData(size_t len, const void *buf);
-
-private:
- // virtual function hiding supression
- size_t GetDataSize(const wxDataFormat& format) const
- { return(wxDataObjectSimple::GetDataSize(format)); }
- bool GetDataHere(const wxDataFormat& format, void* pBuf) const
- { return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
- bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
- { return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
+ // Must provide overloads to avoid hiding them (and warnings about it)
+ virtual size_t GetDataSize(const wxDataFormat&) const
+ {
+ return GetDataSize();
+ }
+ virtual bool GetDataHere(const wxDataFormat&, void *buf) const
+ {
+ return GetDataHere(buf);
+ }
+ virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
+ {
+ return SetData(len, buf);
+ }
};
#endif // _WX_GTK_DATAOBJ2_H_
wxCoord *descent = (wxCoord *) NULL,
wxCoord *externalLeading = (wxCoord *) NULL,
wxFont *theFont = (wxFont *) NULL) const;
+ virtual void DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height );
+ virtual void DoSetClippingRegionAsRegion( const wxRegion ®ion );
public:
virtual wxCoord GetCharWidth() const;
virtual void SetBackgroundMode( int mode );
virtual void SetPalette( const wxPalette& palette );
- virtual void DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height );
virtual void DestroyClippingRegion();
- virtual void DoSetClippingRegionAsRegion( const wxRegion ®ion );
// Resolution in pixels per logical inch
virtual wxSize GetPPI() const;
wxMemoryDC( wxDC *dc ); // Create compatible DC
~wxMemoryDC();
virtual void SelectObject( const wxBitmap& bitmap );
- void DoGetSize( int *width, int *height ) const;
// these get reimplemented for mono-bitmaps to behave
// more like their Win32 couterparts. They now interpret
// implementation
wxBitmap m_selected;
-private:
+protected:
+ void DoGetSize( int *width, int *height ) const;
+
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
};
//private:
bool m_destroyed_by_delete;
+protected:
// override this from wxTLW since the native
// form doesn't have any m_wxwindow
virtual void DoSetSize(int x, int y,
virtual ~wxFrame();
#if wxUSE_STATUSBAR
- virtual void PositionStatusBar();
-
virtual wxStatusBar* CreateStatusBar(int number = 1,
long style = wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE,
wxWindowID id = 0,
// common part of all ctors
void Init();
+#if wxUSE_STATUSBAR
+ virtual void PositionStatusBar();
+#endif // wxUSE_STATUSBAR
+
// override wxWindow methods to take into account tool/menu/statusbars
virtual void DoSetClientSize(int width, int height);
virtual void DoGetClientSize( int *width, int *height ) const;
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
+
+ virtual wxVisualAttributes GetDefaultAttributes() const;
// implementation
// -------------
virtual wxSize DoGetBestSize() const;
- virtual wxVisualAttributes GetDefaultAttributes() const;
-
private:
DECLARE_DYNAMIC_CLASS(wxGauge)
};
virtual int FindString(const wxString& s, bool bCase = false) const;
virtual bool IsSelected(int n) const;
- virtual void DoSetSelection(int n, bool select);
virtual int GetSelection() const;
virtual int GetSelections(wxArrayInt& aSelections) const;
- virtual int DoAppend(const wxString& item);
- virtual void DoInsertItems(const wxArrayString& items, int pos);
- virtual void DoSetItems(const wxArrayString& items, void **clientData);
-
- virtual void DoSetFirstItem(int n);
-
- virtual void DoSetItemClientData(int n, void* clientData);
- virtual void* DoGetItemClientData(int n) const;
- virtual void DoSetItemClientObject(int n, wxClientData* clientData);
- virtual wxClientData* DoGetItemClientObject(int n) const;
-
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
int GtkGetIndex( GtkWidget *item ) const;
GtkWidget *GetConnectWidget();
bool IsOwnGtkWindow( GdkWindow *window );
- void DoApplyWidgetStyle(GtkRcStyle *style);
void OnInternalIdle();
#if wxUSE_TOOLTIPS
protected:
virtual wxSize DoGetBestSize() const;
+ virtual void DoSetSelection(int n, bool select);
+ virtual int DoAppend(const wxString& item);
+ virtual void DoInsertItems(const wxArrayString& items, int pos);
+ virtual void DoSetItems(const wxArrayString& items, void **clientData);
+ virtual void DoSetFirstItem(int n);
+ virtual void DoSetItemClientData(int n, void* clientData);
+ virtual void* DoGetItemClientData(int n) const;
+ virtual void DoSetItemClientObject(int n, wxClientData* clientData);
+ virtual wxClientData* DoGetItemClientObject(int n) const;
+ void DoApplyWidgetStyle(GtkRcStyle *style);
// return the string label for the given item
wxString GetRealLabel(struct _GList *item) const;
virtual ~wxMenu();
- // implement base class virtuals
- virtual wxMenuItem* DoAppend(wxMenuItem *item);
- virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
- virtual wxMenuItem* DoRemove(wxMenuItem *item);
-
// TODO: virtual void SetTitle(const wxString& title);
// implementation
GtkWidget *m_owner;
GtkAccelGroup *m_accel;
+protected:
+ virtual wxMenuItem* DoAppend(wxMenuItem *item);
+ virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
+ virtual wxMenuItem* DoRemove(wxMenuItem *item);
+
private:
// common code for all constructors:
void Init();
void SetConstraintSizes(bool recurse);
bool DoPhase(int phase);
#endif
-
- // set all page's attributes
- void DoApplyWidgetStyle(GtkRcStyle *style);
-
// report if window belongs to notebook
bool IsOwnGtkWindow( GdkWindow *window );
bool m_inSwitchPage;
protected:
+ // set all page's attributes
+ void DoApplyWidgetStyle(GtkRcStyle *style);
+
// remove one page from the notebook but do not destroy it
virtual wxNotebookPage *DoRemovePage(size_t nPage);
int GetDashCount() const;
wxDash* GetDash() const;
-private:
+protected:
// ref counting code
virtual wxObjectRefData *CreateRefData() const;
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
// implementation
// --------------
- virtual void DoMoveWindow(int x, int y, int width, int height);
-
virtual void OnInternalIdle();
int width, int height,
int sizeFlags = wxSIZE_AUTO);
+ virtual void DoMoveWindow(int x, int y, int width, int height);
+
private:
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxPopupWindow)
void GtkDisableEvents();
void GtkEnableEvents();
bool IsOwnGtkWindow( GdkWindow *window );
- void DoApplyWidgetStyle(GtkRcStyle *style);
#if wxUSE_TOOLTIPS
void ApplyToolTip( GtkTooltips *tips, const wxChar *tip );
#endif // wxUSE_TOOLTIPS
wxList m_boxes;
protected:
+ void DoApplyWidgetStyle(GtkRcStyle *style);
+
// common part of all ctors
void Init();
virtual bool IsRadioButton() const { return TRUE; }
- void DoApplyWidgetStyle(GtkRcStyle *style);
bool IsOwnGtkWindow( GdkWindow *window );
void OnInternalIdle();
bool m_blockEvent;
protected:
+ void DoApplyWidgetStyle(GtkRcStyle *style);
virtual wxSize DoGetBestSize() const;
private:
bool IsProtocolSupported();
wxEvtHandler *m_invokingWindow;
-
+
+protected:
#if wxUSE_MENUS_NATIVE
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
#endif // wxUSE_MENUS_NATIVE
GtkWidget* GetConnectWidget();
bool IsOwnGtkWindow( GdkWindow *window );
- void DoApplyWidgetStyle(GtkRcStyle *style);
void CalculateScrollbar();
void OnInternalIdle();
protected:
virtual wxSize DoGetBestSize() const;
+ void DoApplyWidgetStyle(GtkRcStyle *style);
// common part of all ctors
void Init();
wxBitmap m_bitmap;
void OnSetBitmap();
- void DoApplyWidgetStyle(GtkRcStyle *style);
bool IsOwnGtkWindow(GdkWindow *window);
virtual void OnInternalIdle();
+
+protected:
+ void DoApplyWidgetStyle(GtkRcStyle *style);
virtual wxSize DoGetBestSize() const;
private:
// implementation
bool m_blockEvent;
- void DoApplyWidgetStyle(GtkRcStyle *style);
bool IsOwnGtkWindow(GdkWindow *window);
virtual void OnInternalIdle();
+
+protected:
+ void DoApplyWidgetStyle(GtkRcStyle *style);
virtual wxSize DoGetBestSize() const;
private:
// implementation from now on
// --------------------------
- // move the window to the specified location and resize it: this is called
- // from both DoSetSize() and DoSetClientSize()
- virtual void DoMoveWindow(int x, int y, int width, int height);
-
// GTK callbacks
virtual void GtkOnSize( int x, int y, int width, int height );
virtual void OnInternalIdle();
// common part of all ctors
void Init();
+ // move the window to the specified location and resize it: this is called
+ // from both DoSetSize() and DoSetClientSize()
+ virtual void DoMoveWindow(int x, int y, int width, int height);
+
// override wxWindow methods to take into account tool/menu/statusbars
virtual void DoSetSize(int x, int y,
int width, int height,
const wxFont *theFont = (const wxFont *) NULL)
const;
-#if wxUSE_MENUS_NATIVE
- virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
-#endif // wxUSE_MENUS_NATIVE
-
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = true );
virtual void SetScrollPos( int orient, int pos, bool refresh = true );
// wxMDIFrame, wxNotebook etc. this is the callback that will get used.
wxInsertChildFunction m_insertCallback;
+protected:
// implement the base class pure virtuals
virtual void DoClientToScreen( int *x, int *y ) const;
virtual void DoScreenToClient( int *x, int *y ) const;
virtual void DoSetClientSize(int width, int height);
virtual void DoMoveWindow(int x, int y, int width, int height);
+#if wxUSE_MENUS_NATIVE
+ virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
+#endif // wxUSE_MENUS_NATIVE
+
virtual void DoCaptureMouse();
virtual void DoReleaseMouse();
virtual void DoSetToolTip( wxToolTip *tip );
#endif // wxUSE_TOOLTIPS
-protected:
// common part of all ctors (not virtual because called from ctor)
void Init();
size_t GetCount() const { return wxHashTableBase::GetCount(); }
protected:
- virtual void DoDeleteContents( wxHashTableBase_Node* node );
-
// copy helper
void DoCopy( const wxHashTable& copy );
// m_curr to it and m_currBucket to its bucket
void GetNextNode( size_t bucketStart );
private:
+ virtual void DoDeleteContents( wxHashTableBase_Node* node );
+
// current node
Node* m_curr;
eltype *Delete(long key) { return (eltype*)DoDelete(key, key); } \
eltype *Delete(long lhash, long key) \
{ return (eltype*)DoDelete(key, lhash); } \
- protected: \
+ private: \
virtual void DoDeleteContents( wxHashTableBase_Node* node ) \
{ delete (eltype*)node->GetData(); } \
\
wxString ToText();
#endif // wxUSE_CLIPBOARD
+ virtual void OnInternalIdle();
+
protected:
void Init();
void OnMouseLeave(wxMouseEvent& event);
#endif // wxUSE_CLIPBOARD
- virtual void OnInternalIdle();
-
// Returns new filter (will be stored into m_DefaultFilter variable)
virtual wxHtmlFilter *GetDefaultFilter() {return new wxHtmlFilterPlainText;}
#if wxUSE_STREAMS
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
- virtual bool DoCanRead( wxInputStream& stream );
protected:
+ virtual bool DoCanRead( wxInputStream& stream );
bool SaveDib(wxImage *image, wxOutputStream& stream, bool verbose,
bool IsBmp, bool IsMask);
bool DoLoadDib(wxImage *image, int width, int height, int bpp, int ncolors,
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool DoLoadFile( wxImage *image, wxInputStream& stream, bool verbose, int index );
- virtual bool DoCanRead( wxInputStream& stream );
virtual int GetImageCount( wxInputStream& stream );
+protected:
+ virtual bool DoCanRead( wxInputStream& stream );
#endif // wxUSE_STREAMS
private:
// formats are almost identical), but we hide this fact at
// the API level, since it is a mere implementation detail.
+protected:
#if wxUSE_STREAMS
virtual bool DoCanRead( wxInputStream& stream );
#endif // wxUSE_STREAMS
#if wxUSE_STREAMS
virtual bool SaveFile( wxImage *WXUNUSED(image), wxOutputStream& WXUNUSED(stream), bool WXUNUSED(verbose=true) ){return false ;};
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
- virtual bool DoCanRead( wxInputStream& stream );
virtual int GetImageCount( wxInputStream& stream );
+protected:
+ virtual bool DoCanRead( wxInputStream& stream );
#endif // wxUSE_STREAMS
private:
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
+protected:
virtual bool DoCanRead( wxInputStream& stream );
#endif
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
+protected:
virtual bool DoCanRead( wxInputStream& stream );
#endif
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
+protected:
virtual bool DoCanRead( wxInputStream& stream );
#endif // wxUSE_STREAMS
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
+protected:
virtual bool DoCanRead( wxInputStream& stream );
#endif
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
+protected:
virtual bool DoCanRead( wxInputStream& stream );
#endif
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
- virtual bool DoCanRead( wxInputStream& stream );
virtual int GetImageCount( wxInputStream& stream );
+protected:
+ virtual bool DoCanRead( wxInputStream& stream );
#endif
private:
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
+protected:
virtual bool DoCanRead( wxInputStream& stream );
#endif
virtual void SetValue(bool);
virtual bool GetValue() const;
- void DoSet3StateValue(wxCheckBoxState val);
- virtual wxCheckBoxState DoGet3StateValue() const;
-
virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
virtual void Command(wxCommandEvent& event);
+protected:
+ void DoSet3StateValue(wxCheckBoxState val);
+ virtual wxCheckBoxState DoGet3StateValue() const;
+
DECLARE_DYNAMIC_CLASS(wxCheckBox)
};
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr);
- // implement base class pure virtuals
- virtual int DoAppend(const wxString& item);
- virtual int DoInsert(const wxString& item, int pos);
virtual void Delete(int n);
virtual void Clear();
protected:
virtual wxSize DoGetBestSize() const ;
+ virtual int DoAppend(const wxString& item);
+ virtual int DoInsert(const wxString& item, int pos);
-public: // for wxComboBox only
virtual void DoSetItemClientData( int n, void* clientData );
virtual void* DoGetItemClientData( int n ) const;
virtual void DoSetItemClientObject( int n, wxClientData* clientData );
virtual wxClientData* DoGetItemClientObject( int n ) const;
-protected:
// free all memory we have (used by Clear() and dtor)
// prevent collision with some BSD definitions of macro Free()
void FreeData();
public:
inline wxComboBox() {}
virtual ~wxComboBox();
- // override the base class virtuals involved in geometry calculations
- virtual wxSize DoGetBestSize() const;
- virtual void DoMoveWindow(int x, int y, int width, int height);
// forward these functions to all subcontrols
virtual bool Enable(bool enable = true);
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
protected:
+ // override the base class virtuals involved in geometry calculations
+ virtual wxSize DoGetBestSize() const;
+ virtual void DoMoveWindow(int x, int y, int width, int height);
+
virtual int DoAppend(const wxString& item) ;
virtual int DoInsert(const wxString& item, int pos) ;
virtual size_t GetDataSize() const ;
virtual bool GetDataHere(void *buf) const ;
virtual bool SetData(size_t len, const void *buf);
+ // Must provide overloads to avoid hiding them (and warnings about it)
+ virtual size_t GetDataSize(const wxDataFormat&) const
+ {
+ return GetDataSize();
+ }
+ virtual bool GetDataHere(const wxDataFormat&, void *buf) const
+ {
+ return GetDataHere(buf);
+ }
+ virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
+ {
+ return SetData(len, buf);
+ }
protected :
void Init() ;
void* m_pictHandle ;
bool m_pictCreated ;
-private:
- // Virtual function hiding supression
- size_t GetDataSize(const wxDataFormat& rFormat) const
- { return(wxDataObjectSimple::GetDataSize(rFormat)); }
- bool GetDataHere(const wxDataFormat& rFormat, void* pBuf) const
- { return(wxDataObjectSimple::GetDataHere(rFormat, pBuf)); }
- bool SetData(const wxDataFormat& rFormat, size_t nLen, const void* pBuf)
- { return(wxDataObjectSimple::SetData(rFormat, nLen, pBuf)); }
};
// ----------------------------------------------------------------------------
virtual size_t GetDataSize() const;
virtual bool GetDataHere(void *buf) const;
virtual bool SetData(size_t len, const void *buf);
-
-private:
- // Virtual function hiding supression
- size_t GetDataSize(const wxDataFormat& rFormat) const
- { return(wxDataObjectSimple::GetDataSize(rFormat)); }
- bool GetDataHere(const wxDataFormat& rFormat, void* pBuf) const
- { return(wxDataObjectSimple::GetDataHere(rFormat, pBuf)); }
- bool SetData(const wxDataFormat& rFormat, size_t nLen, const void* pBuf)
- { return(wxDataObjectSimple::SetData(rFormat, nLen, pBuf)); }
+ // Must provide overloads to avoid hiding them (and warnings about it)
+ virtual size_t GetDataSize(const wxDataFormat&) const
+ {
+ return GetDataSize();
+ }
+ virtual bool GetDataHere(const wxDataFormat&, void *buf) const
+ {
+ return GetDataHere(buf);
+ }
+ virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
+ {
+ return SetData(len, buf);
+ }
};
#endif // _WX_GTK_DATAOBJ2_H_
virtual wxCoord GetCharHeight() const;
virtual wxCoord GetCharWidth() const;
- virtual void DoGetTextExtent(const wxString& string,
- wxCoord *x, wxCoord *y,
- wxCoord *descent = NULL,
- wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const;
- virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
virtual bool CanDrawBitmap() const;
virtual bool CanGetTextExtent() const;
#endif
protected:
+ virtual void DoGetTextExtent(const wxString& string,
+ wxCoord *x, wxCoord *y,
+ wxCoord *descent = NULL,
+ wxCoord *externalLeading = NULL,
+ wxFont *theFont = NULL) const;
+ virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
+
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
int style = wxFLOOD_SURFACE);
wxWindowDC(wxWindow *win);
~wxWindowDC(void);
- virtual void DoGetSize( int *width, int *height ) const;
protected :
+ virtual void DoGetSize( int *width, int *height ) const;
wxWindow *m_window;
};
wxClientDC(wxWindow *win);
~wxClientDC(void);
+
+protected:
virtual void DoGetSize( int *width, int *height ) const;
};
wxPaintDC(wxWindow *win);
~wxPaintDC(void);
+
+protected:
virtual void DoGetSize( int *width, int *height ) const;
};
wxMemoryDC( wxDC *dc ); // Create compatible DC
~wxMemoryDC(void);
virtual void SelectObject( const wxBitmap& bitmap );
- virtual void DoGetSize( int *width, int *height ) const;
wxBitmap GetSelectedObject() { return m_selected ; }
+
+protected:
+ virtual void DoGetSize( int *width, int *height ) const;
+
private:
wxBitmap m_selected;
};
virtual void StartPage(void) ;
virtual void EndPage(void) ;
wxPrintData& GetPrintData() { return m_printData; }
- virtual void DoGetSize( int *width, int *height ) const;
#if wxMAC_USE_CORE_GRAPHICS
void MacSetCGContext( void * cg ) ;
#endif
protected:
+ virtual void DoGetSize( int *width, int *height ) const;
wxPrintData m_printData ;
wxNativePrinterDC* m_nativePrinterDC ;
#endif // wxUSE_PRINTING_ARCHITECTURE
virtual void GetFilenames(wxArrayString& files) const { files = m_fileNames ; }
virtual int ShowModal();
-
+
+protected:
// not supported for file dialog, RR
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
int WXUNUSED(width), int WXUNUSED(height),
wxWindowID id = -1,
const wxString& name = wxToolBarNameStr);
- virtual void PositionToolBar();
virtual void SetToolBar(wxToolBar *toolbar);
#endif // wxUSE_TOOLBAR
long style = wxST_SIZEGRIP,
wxWindowID id = 0,
const wxString& name = wxStatusLineNameStr);
-
- virtual void PositionStatusBar();
#endif // wxUSE_STATUSBAR
// tooltip management
void SetLastFocus(wxWindow *win) { m_winLastFocused = win; }
wxWindow *GetLastFocus() const { return m_winLastFocused; }
+ void PositionBars();
+
protected:
// common part of all ctors
void Init();
+#if wxUSE_TOOLBAR
+ virtual void PositionToolBar();
+#endif
+#if wxUSE_STATUSBAR
+ virtual void PositionStatusBar();
+#endif
+
// override base class virtuals
virtual void DoGetClientSize(int *width, int *height) const;
virtual void DoSetClientSize(int width, int height);
virtual int FindString(const wxString& s, bool bCase = false) const;
virtual bool IsSelected(int n) const;
- virtual void DoSetSelection(int n, bool select);
virtual int GetSelection() const;
virtual int GetSelections(wxArrayInt& aSelections) const;
- virtual int DoAppend(const wxString& item);
- virtual void DoInsertItems(const wxArrayString& items, int pos);
- virtual void DoSetItems(const wxArrayString& items, void **clientData);
-
- virtual void DoSetFirstItem(int n);
-
- virtual void DoSetItemClientData(int n, void* clientData);
- virtual void* DoGetItemClientData(int n) const;
- virtual void DoSetItemClientObject(int n, wxClientData* clientData);
- virtual wxClientData* DoGetItemClientObject(int n) const;
- virtual void DoSetSize(int x, int y,int width, int height,int sizeFlags = wxSIZE_AUTO ) ;
-
// wxCheckListBox support
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
// events in the latter case
bool MacIsSelectionSuppressed() const { return m_suppressSelection ; }
protected:
+ virtual void DoSetSelection(int n, bool select);
+ virtual int DoAppend(const wxString& item);
+ virtual void DoInsertItems(const wxArrayString& items, int pos);
+ virtual void DoSetItems(const wxArrayString& items, void **clientData);
+ virtual void DoSetFirstItem(int n);
+ virtual void DoSetItemClientData(int n, void* clientData);
+ virtual void* DoGetItemClientData(int n) const;
+ virtual void DoSetItemClientObject(int n, wxClientData* clientData);
+ virtual wxClientData* DoGetItemClientObject(int n) const;
+ virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+
void MacDelete( int n ) ;
void MacInsert( int n , const wxString& item) ;
void MacAppend( const wxString& item) ;
// Note: this is virtual, to allow overridden behaviour.
virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL);
- // Gets the size available for subwindows after menu size, toolbar size
- // and status bar size have been subtracted. If you want to manage your own
- // toolbar(s), don't call SetToolBar.
- void DoGetClientSize(int *width, int *height) const;
-
// Explicitly call default scroll behaviour
void OnScroll(wxScrollEvent& event);
protected:
+ // Gets the size available for subwindows after menu size, toolbar size
+ // and status bar size have been subtracted. If you want to manage your own
+ // toolbar(s), don't call SetToolBar.
+ void DoGetClientSize(int *width, int *height) const;
DECLARE_EVENT_TABLE()
};
virtual ~wxMenu();
- // implement base class virtuals
- virtual wxMenuItem* DoAppend(wxMenuItem *item);
- virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
- virtual wxMenuItem* DoRemove(wxMenuItem *item);
virtual void Attach(wxMenuBarBase *menubar) ;
virtual void Break();
short MacGetMenuId() { return m_macMenuId ; }
+protected:
+ virtual wxMenuItem* DoAppend(wxMenuItem *item);
+ virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
+ virtual wxMenuItem* DoRemove(wxMenuItem *item);
+
private:
// common part of all ctors
void Init();
// Should be called at end of drawing
virtual wxMetafile *Close(void);
- virtual void DoGetSize(int *width, int *height) const ;
// Implementation
inline wxMetafile *GetMetaFile(void) const { return m_metaFile; }
inline void SetMetaFile(wxMetafile *mf) { m_metaFile = mf; }
protected:
+ virtual void DoGetSize(int *width, int *height) const;
+
wxMetafile* m_metaFile;
};
int ShowModal();
+protected:
// not supported for message dialog, RR
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
int WXUNUSED(width), int WXUNUSED(height),
// base class virtuals
// -------------------
virtual void Command(wxCommandEvent& event);
+ virtual wxInt32 MacControlHit(WXEVENTHANDLERREF handler, WXEVENTREF event);
+
protected:
virtual wxNotebookPage *DoRemovePage(size_t page) ;
- virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
// common part of all ctors
void Init();
int maxW = -1, int maxH = -1,
int incW = -1, int incH = -1 );
+ void Command(wxCommandEvent& event);
+ virtual wxInt32 MacControlHit(WXEVENTHANDLERREF handler, WXEVENTREF event);
+ void MacHandleControlClick(WXWidget control, wxInt16 controlpart, bool mouseStillDown);
+
protected:
virtual wxSize DoGetBestSize() const;
virtual void DoSetSize(int x, int y, int w, int h, int sizeFlags);
virtual void DoMoveWindow(int x, int y, int w, int h);
- void Command(wxCommandEvent& event);
- virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
- void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ;
-
// Common processing to invert slider values based on wxSL_INVERSE
virtual int ValueInvertOrNot(int value) const;
// overriden base class virtuals
virtual bool AcceptsFocus() const { return FALSE; }
- virtual wxSize DoGetBestSize() const ;
protected:
+ virtual wxSize DoGetBestSize() const;
+
wxBitmap m_bitmap;
DECLARE_EVENT_TABLE()
};
void SetLabel( const wxString &str ) ;
bool SetFont( const wxFont &font );
+ virtual bool AcceptsFocus() const { return FALSE; }
+
protected :
virtual wxSize DoGetBestSize() const ;
- virtual bool AcceptsFocus() const { return FALSE; }
DECLARE_DYNAMIC_CLASS_NO_COPY(wxStaticText)
};
virtual bool Show(bool show = true);
virtual bool IsShown() const;
- virtual void DoGetSize(int *width, int *height) const;
- virtual wxSize DoGetBestSize() const ;
virtual bool Realize();
virtual void SetToolBitmapSize(const wxSize& size);
// common part of all ctors
void Init();
- // implement base class pure virtuals
+ virtual void DoGetSize(int *width, int *height) const;
+ virtual wxSize DoGetBestSize() const;
virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
int *externalLeading = NULL,
const wxFont *theFont = NULL )
const;
-
+protected:
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
-
+public:
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = true );
virtual void SetScrollPos( int orient, int pos, bool refresh = true );
virtual bool SetForegroundColour(const wxColour &colour);
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
+ virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
private:
void MakeOwnerDrawn();
// usually overridden base class virtuals
virtual wxSize DoGetBestSize() const;
- virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const ;
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxButton)
virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual void Command(wxCommandEvent& event);
virtual bool SetForegroundColour(const wxColour& colour);
+ virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
protected:
virtual wxSize DoGetBestSize() const;
- virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
virtual void DoSet3StateValue(wxCheckBoxState value);
virtual wxCheckBoxState DoGet3StateValue() const;
// accessors
size_t GetItemHeight() const { return m_nItemHeight; }
-protected:
// we create our items ourselves and they have non-standard size,
// so we need to override these functions
virtual wxOwnerDrawn *CreateLboxItem(size_t n);
virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item);
+protected:
// this can't be called DoHitTest() because wxWindow already has this method
int DoHitTestItem(wxCoord x, wxCoord y) const;
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr);
- // implement base class pure virtuals
- virtual int DoAppend(const wxString& item);
- virtual int DoInsert(const wxString& item, int pos);
virtual void Delete(int n);
virtual void Clear();
virtual bool MSWCommand(WXUINT param, WXWORD id);
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
virtual WXHBRUSH MSWControlColor(WXHDC hDC, WXHWND hWnd);
+ virtual bool MSWShouldPreProcessMessage(WXMSG *pMsg);
+ virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
protected:
// common part of all ctors
void Init() { m_lastAcceptedSelection = wxID_NONE; }
+ virtual int DoAppend(const wxString& item);
+ virtual int DoInsert(const wxString& item, int pos);
virtual void DoMoveWindow(int x, int y, int width, int height);
virtual void DoSetItemClientData( int n, void* clientData );
virtual void* DoGetItemClientData( int n ) const;
int width, int height,
int sizeFlags = wxSIZE_AUTO);
- virtual bool MSWShouldPreProcessMessage(WXMSG *pMsg);
-
- virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
-
// update the height of the drop down list to fit the number of items we
// have (without changing the visible height)
void UpdateVisibleHeight();
virtual int ShowModal();
- virtual void DoGetPosition( int *x, int *y ) const;
-
protected:
+ virtual void DoGetPosition( int *x, int *y ) const;
virtual void DoGetSize(int *width, int *height) const;
virtual void DoGetClientSize(int *width, int *height) const;
virtual void DoSetSize(int x, int y,
void OnUpdateDelete(wxUpdateUIEvent& event);
void OnUpdateSelectAll(wxUpdateUIEvent& event);
-protected:
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
+protected:
// common part of all ctors
void Init() { m_selectionOld = -1; }
// could call it
virtual WXHBRUSH MSWControlColor(WXHDC pDC, WXHWND hWnd);
+ // default style for the control include WS_TABSTOP if it AcceptsFocus()
+ virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
+
protected:
// choose the default border for this window
virtual wxBorder GetDefaultBorder() const;
const wxString& label = wxEmptyString,
WXDWORD exstyle = (WXDWORD)-1);
- // default style for the control include WS_TABSTOP if it AcceptsFocus()
- virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
-
// call this from the derived class MSWControlColor() if you want to show
// the control greyed out (and opaque)
WXHBRUSH MSWControlColorDisabled(WXHDC pDC);
virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2);
virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const;
-protected:
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
+protected:
virtual wxSize DoGetBestSize() const;
virtual wxCoord GetCharHeight() const;
virtual wxCoord GetCharWidth() const;
- virtual void DoGetTextExtent(const wxString& string,
- wxCoord *x, wxCoord *y,
- wxCoord *descent = NULL,
- wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const;
- virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
virtual bool CanDrawBitmap() const;
virtual bool CanGetTextExtent() const;
// classes
wxDC() { Init(); }
+ virtual void DoGetTextExtent(const wxString& string,
+ wxCoord *x, wxCoord *y,
+ wxCoord *descent = NULL,
+ wxCoord *externalLeading = NULL,
+ wxFont *theFont = NULL) const;
+ virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
+
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
int style = wxFLOOD_SURFACE);
SetHDC((WXHDC)NULL);
}
+protected:
virtual void DoGetSize(int *w, int *h) const
{
wxFAIL_MSG( _T("no way to retrieve the size of generic DC") );
// use IsModal()
wxDEPRECATED( bool IsModalShowing() const );
+ // handle Escape here
+ virtual bool MSWProcessMessage(WXMSG* pMsg);
+
protected:
// find the window to use as parent for this dialog if none has been
// specified explicitly by the user
// return true if button was "clicked" or false if we don't have it
bool EmulateButtonClickIfPresent(int id);
- // handle Escape here
- virtual bool MSWProcessMessage(WXMSG* pMsg);
-
private:
wxWindow* m_oldFocus;
bool m_endModalCalled; // allow for closing within InitDialog
// obtain a pointer to the new metafile (caller should delete it)
wxEnhMetaFile *Close();
-private:
+protected:
virtual void DoGetSize(int *width, int *height) const;
+private:
// size passed to ctor and returned by DoGetSize()
int m_width,
m_height;
virtual bool SetForegroundColour(const wxColour& col);
virtual bool SetBackgroundColour(const wxColour& col);
-protected:
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
+
+protected:
virtual wxSize DoGetBestSize() const;
virtual int FindString(const wxString& s, bool bCase = false) const;
virtual bool IsSelected(int n) const;
- virtual void DoSetSelection(int n, bool select);
virtual int GetSelection() const;
virtual int GetSelections(wxArrayInt& aSelections) const;
- virtual int DoAppend(const wxString& item);
- virtual void DoInsertItems(const wxArrayString& items, int pos);
- virtual void DoSetItems(const wxArrayString& items, void **clientData);
-
- virtual void DoSetFirstItem(int n);
-
- virtual void DoSetItemClientData(int n, void* clientData);
- virtual void* DoGetItemClientData(int n) const;
- virtual void DoSetItemClientObject(int n, wxClientData* clientData);
- virtual wxClientData* DoGetItemClientObject(int n) const;
-
// wxCheckListBox support
#if wxUSE_OWNER_DRAWN
bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item);
// Windows callbacks
bool MSWCommand(WXUINT param, WXWORD id);
+ WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
+
+ // under XP when using "transition effect for menus and tooltips" if we
+ // return true for WM_PRINTCLIENT here then it causes noticable slowdown
+ virtual bool MSWShouldPropagatePrintChild()
+ {
+ return false;
+ }
virtual wxVisualAttributes GetDefaultAttributes() const
{
}
protected:
- WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
+ virtual void DoSetSelection(int n, bool select);
+ virtual int DoAppend(const wxString& item);
+ virtual void DoInsertItems(const wxArrayString& items, int pos);
+ virtual void DoSetItems(const wxArrayString& items, void **clientData);
+ virtual void DoSetFirstItem(int n);
+ virtual void DoSetItemClientData(int n, void* clientData);
+ virtual void* DoGetItemClientData(int n) const;
+ virtual void DoSetItemClientObject(int n, wxClientData* clientData);
+ virtual wxClientData* DoGetItemClientObject(int n) const;
// free memory (common part of Clear() and dtor)
void Free();
virtual wxSize DoGetBestSize() const;
- // under XP when using "transition effect for menus and tooltips" if we
- // return true for WM_PRINTCLIENT here then it causes noticable slowdown
- virtual bool MSWShouldPropagatePrintChild()
- {
- return false;
- }
-
#if wxUSE_OWNER_DRAWN
// control items
wxListBoxItemsArray m_aItems;
// obsolete stuff, for compatibility only -- don't use
wxDEPRECATED( int GetItemSpacing(bool isSmall) const);
-protected:
- // common part of all ctors
- void Init();
-
- // free memory taken by all internal data
- void FreeAllInternalData();
-
// convert our styles to Windows
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
WXWPARAM wParam,
WXLPARAM lParam);
+protected:
+ // common part of all ctors
+ void Init();
+
+ // free memory taken by all internal data
+ void FreeAllInternalData();
wxTextCtrl* m_textCtrl; // The control used for editing a label
wxImageList * m_imageListNormal; // The image list for normal icons
virtual void DoSetClientSize(int width, int height);
virtual void InternalSetMenuBar();
virtual bool IsMDIChild() const { return true; }
+ virtual void DetachMenuBar();
virtual WXHICON GetDefaultIcon() const;
private:
bool m_needsInitialShow; // Show must be called in idle time after Creation
bool m_needsResize; // flag which tells us to artificially resize the frame
- virtual void DetachMenuBar() ;
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMDIChildFrame)
// Explicitly call default scroll behaviour
void OnScroll(wxScrollEvent& event);
+protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
-protected:
+
void Init() { m_scrollX = m_scrollY = 0; }
int m_scrollX, m_scrollY;
virtual ~wxMenu();
- // implement base class virtuals
- virtual wxMenuItem* DoAppend(wxMenuItem *item);
- virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
- virtual wxMenuItem* DoRemove(wxMenuItem *item);
-
virtual void Break();
virtual void SetTitle(const wxString& title);
int FindAccel(int id) const;
#endif // wxUSE_ACCEL
+protected:
+ virtual wxMenuItem* DoAppend(wxMenuItem *item);
+ virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
+ virtual wxMenuItem* DoRemove(wxMenuItem *item);
+
private:
// common part of all ctors
void Init();
}
#endif // wxUSE_UXTHEME
+ // translate wxWin styles to the Windows ones
+ virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
+
+ // return the themed brush for painting our children
+ virtual WXHBRUSH MSWGetBgBrushForChild(WXHDC hDC, WXHWND hWnd);
+
+ // draw child background
+ virtual bool MSWPrintChild(WXHDC hDC, wxWindow *win);
+
protected:
// common part of all ctors
void Init();
- // translate wxWin styles to the Windows ones
- virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
-
// remove one page from the notebook, without deleting
virtual wxNotebookPage *DoRemovePage(size_t nPage);
// creates the brush to be used for drawing the tab control background
void UpdateBgBrush();
- // return the themed brush for painting our children
- virtual WXHBRUSH MSWGetBgBrushForChild(WXHDC hDC, WXHWND hWnd);
-
- // draw child background
- virtual bool MSWPrintChild(WXHDC hDC, wxWindow *win);
-
// common part of QueryBgBitmap() and MSWPrintChild()
//
// if child == NULL, draw background for the entire notebook itself
virtual bool Show(bool show = true);
-protected:
- // popups handle the position like wxTopLevelWindow, not wxWindow
- virtual void DoGetPosition(int *x, int *y) const;
-
// return the style to be used for the popup windows
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle) const;
// get the HWND to be used as parent of this window with CreateWindow()
virtual WXHWND MSWGetParent() const;
+protected:
+ // popups handle the position like wxTopLevelWindow, not wxWindow
+ virtual void DoGetPosition(int *x, int *y) const;
+
DECLARE_DYNAMIC_CLASS_NO_COPY(wxPopupWindow)
};
// override wxControl version to not use solid background here
virtual WXHBRUSH MSWControlColor(WXHDC pDC, WXHWND hWnd);
+ virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
+
protected:
virtual wxSize DoGetBestSize() const;
- virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
int m_pageSize;
int m_viewSize;
virtual bool Enable(bool show = true);
virtual bool SetFont(const wxFont& font);
+ virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
+
protected:
// common part of all ctors
void Init();
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
- virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
-
// the labels windows, if any
wxSubwindows *m_labels;
virtual wxBitmap GetBitmap() const;
virtual wxIcon GetIcon() const;
+ virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
protected:
virtual wxBorder GetDefaultBorder() const;
virtual wxSize DoGetBestSize() const;
- virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
// ctor/dtor helpers
void Init() { m_isIcon = true; m_image = NULL; m_currentHandle = 0; }
/// Implementation only
virtual void GetBordersForSizer(int *borderTop, int *borderOther) const;
+ virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
+
protected:
virtual wxSize DoGetBestSize() const;
// choose the default border for this window
virtual wxBorder GetDefaultBorder() const;
- virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
-
#ifndef __WXWINCE__
+public:
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
+protected:
// return the region with all the windows inside this static box excluded
virtual WXHRGN MSWGetRegionWithoutChildren();
virtual int GetBorderX() const;
virtual int GetBorderY() const;
+ virtual WXLRESULT MSWWindowProc(WXUINT nMsg,
+ WXWPARAM wParam,
+ WXLPARAM lParam);
protected:
void CopyFieldsWidth(const int widths[]);
void SetFieldsWidth();
// override base class virtual
void DoMoveWindow(int x, int y, int width, int height);
- virtual WXLRESULT MSWWindowProc(WXUINT nMsg,
- WXWPARAM wParam,
- WXLPARAM lParam);
-
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBar95)
};
// overriden base class virtuals
virtual bool AcceptsFocus() const { return false; }
-protected:
// usually overridden base class virtuals
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
virtual void SetLabel(const wxString& label);
virtual bool SetFont( const wxFont &font );
+ virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
+
protected:
// implement/override some base class virtuals
virtual wxBorder GetDefaultBorder() const;
virtual void DoSetSize(int x, int y, int w, int h,
int sizeFlags = wxSIZE_AUTO);
virtual wxSize DoGetBestSize() const;
- virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
-
DECLARE_DYNAMIC_CLASS_NO_COPY(wxStaticText)
};
static WXHBITMAP MapBitmap(WXHBITMAP bitmap, int width, int height);
+ // override WndProc mainly to process WM_SIZE
+ virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
+
+ virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
+
protected:
// common part of all ctors
void Init();
const wxString& longHelp);
virtual wxToolBarToolBase *CreateTool(wxControl *control);
- // override WndProc mainly to process WM_SIZE
- virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
-
// return the appropriate size and flags for the toolbar control
virtual wxSize DoGetBestSize() const;
- virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
// handlers for various events
bool HandleSize(WXWPARAM wParam, WXLPARAM lParam);
// called HideNativeCaret() before
void OnSetFocus(wxFocusEvent& event);
+ // intercept WM_GETDLGCODE
+ virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
+
+ virtual bool MSWShouldPreProcessMessage(WXMSG* pMsg);
+ virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
+ virtual wxVisualAttributes GetDefaultAttributes() const;
+
protected:
// common part of all ctors
void Init();
- // intercept WM_GETDLGCODE
- virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
-
// return true if this control has a user-set limit on amount of text (i.e.
// the limit is due to a previous call to SetMaxLength() and not built in)
bool HasSpaceLimit(unsigned int *len) const;
// send TEXT_UPDATED event, return true if it was handled, false otherwise
bool SendUpdateEvent();
- // override some base class virtuals
- virtual bool MSWShouldPreProcessMessage(WXMSG* pMsg);
virtual wxSize DoGetBestSize() const;
- virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
-
#if wxUSE_RICHEDIT
// we're using RICHEDIT (and not simple EDIT) control if this field is not
// 0, it also gives the version of the RICHEDIT control being used (1, 2 or
// text ourselves: we want this to be exactly 1
int m_updatesCount;
- virtual wxVisualAttributes GetDefaultAttributes() const;
-
private:
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS_NO_COPY(wxTextCtrl)
virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual void Command(wxCommandEvent& event);
+ virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
protected:
virtual wxSize DoGetBestSize() const;
virtual wxBorder GetDefaultBorder() const;
- virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton)
virtual bool HandleSettingChange(WXWPARAM wParam, WXLPARAM lParam);
#endif
+ // translate wxWidgets flags to Windows ones
+ virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle) const;
+
+ // choose the right parent to use with CreateWindow()
+ virtual WXHWND MSWGetParent() const;
+
+ // window proc for the frames
+ WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
+
protected:
// common part of all ctors
void Init();
// common part of Iconize(), Maximize() and Restore()
void DoShowWindow(int nShowCmd);
- // translate wxWidgets flags to Windows ones
- virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle) const;
-
- // choose the right parent to use with CreateWindow()
- virtual WXHWND MSWGetParent() const;
-
- // window proc for the frames
- WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
-
// is the window currently iconized?
bool m_iconized;
wxTextCtrl *m_textCtrl; // text control in which it is edited
wxTreeItemId m_idEdited; // the item being edited
-private:
- // the common part of all ctors
- void Init();
-
- // helper functions
- inline bool DoGetItem(wxTreeViewItem *tvItem) const;
- inline void DoSetItem(wxTreeViewItem *tvItem);
-
- inline void DoExpand(const wxTreeItemId& item, int flag);
-
virtual wxTreeItemId DoInsertItem(const wxTreeItemId& parent,
size_t pos,
const wxString& text,
wxTreeItemData *data = NULL);
virtual wxTreeItemId DoTreeHitTest(const wxPoint& point, int& flags);
+private:
+ // the common part of all ctors
+ void Init();
+
+ // helper functions
+ inline bool DoGetItem(wxTreeViewItem *tvItem) const;
+ inline void DoSetItem(wxTreeViewItem *tvItem);
+
+ inline void DoExpand(const wxTreeItemId& item, int flag);
+
int DoGetItemImageFromData(const wxTreeItemId& item,
wxTreeItemIcon which) const;
void DoSetItemImageFromData(const wxTreeItemId& item,
const wxFont *theFont = (const wxFont *) NULL)
const;
-#if wxUSE_MENUS_NATIVE
- virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
-#endif // wxUSE_MENUS_NATIVE
-
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = true );
virtual void SetScrollPos( int orient, int pos, bool refresh = true );
virtual void OnInternalIdle();
protected:
+
+#if wxUSE_MENUS_NATIVE
+ virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
+#endif // wxUSE_MENUS_NATIVE
+
// the window handle
WXHWND m_hWnd;
long GetFirstVisiblePosition() const;
// Overrides
+protected:
virtual wxSize DoGetBestSize() const ;
: wxRichTextFileHandler(name, ext, type)
{ }
-#if wxUSE_STREAMS
- virtual bool DoLoadFile(wxRichTextBuffer *buffer, wxInputStream& stream);
- virtual bool DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream& stream);
-#endif
-
/// Can we save using this handler?
virtual bool CanSave() const { return true; }
virtual void OutputParagraphFormatting(const wxTextAttrEx& currentStyle, const wxTextAttrEx& thisStyle, wxOutputStream& stream, bool start);
protected:
-
+#if wxUSE_STREAMS
+ virtual bool DoLoadFile(wxRichTextBuffer *buffer, wxInputStream& stream);
+ virtual bool DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream& stream);
+#endif
};
#endif
const wxSize& size = wxDefaultSize, long style = 0);
~wxRichTextStyleListBox();
- /// Returns the HTML for this item
- virtual wxString OnGetItem(size_t n) const;
-
/// Creates a suitable HTML fragment for a definition
wxString CreateHTML(wxRichTextStyleDefinition* def) const;
// Convert units in tends of a millimetre to device units
int ConvertTenthsMMToPixels(wxDC& dc, int units) const;
+protected:
+ /// Returns the HTML for this item
+ virtual wxString OnGetItem(size_t n) const;
+
private:
wxRichTextStyleSheet* m_styleSheet;
{ }
#if wxUSE_STREAMS
- virtual bool DoLoadFile(wxRichTextBuffer *buffer, wxInputStream& stream);
- virtual bool DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream& stream);
-
/// Recursively export an object
bool ExportXML(wxOutputStream& stream, wxMBConv* convMem, wxMBConv* convFile, wxRichTextObject& obj, int level);
wxString GetText(wxXmlNode *node, const wxString& param = wxEmptyString, bool translate = false);
protected:
-
+#if wxUSE_STREAMS
+ virtual bool DoLoadFile(wxRichTextBuffer *buffer, wxInputStream& stream);
+ virtual bool DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream& stream);
+#endif
};
#endif
{ ScrollDoSetVirtualSize(x, y); } \
virtual wxSize GetBestVirtualSize() const \
{ return ScrollGetBestVirtualSize(); } \
+protected: \
virtual wxSize GetWindowSizeForVirtualSize(const wxSize& size) const \
{ return ScrollGetWindowSizeForVirtualSize(size); }
long style = wxScrolledWindowStyle,
const wxString& name = wxPanelNameStr);
+ // we need to return a special WM_GETDLGCODE value to process just the
+ // arrows but let the other navigation characters through
+#ifdef __WXMSW__
+ virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
+#endif // __WXMSW__
+
WX_FORWARD_TO_SCROLL_HELPER()
protected:
// wxScrollHelperEvtHandler::ProcessEvent()
void OnPaint(wxPaintEvent& event);
- // we need to return a special WM_GETDLGCODE value to process just the
- // arrows but let the other navigation characters through
-#ifdef __WXMSW__
- virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
-#endif // __WXMSW__
-
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxScrolledWindow)
DECLARE_EVENT_TABLE()
virtual void SelectAll();
virtual void SetEditable(bool editable) = 0;
- // override streambuf method
-#if wxHAS_TEXT_WINDOW_STREAM
- int overflow(int i);
-#endif // wxHAS_TEXT_WINDOW_STREAM
-
// stream-like insertion operators: these are always available, whether we
// were, or not, compiled with streambuf support
wxTextCtrl& operator<<(const wxString& s);
virtual bool ShouldInheritColours() const { return false; }
protected:
+ // override streambuf method
+#if wxHAS_TEXT_WINDOW_STREAM
+ int overflow(int i);
+#endif // wxHAS_TEXT_WINDOW_STREAM
+
// the name of the last file loaded with LoadFile() which will be used by
// SaveFile() by default
wxString m_filename;
virtual bool DeleteAllPages();
protected:
+ // Implementation of a page removal. See DeletPage for comments.
+ wxTreebookPage *DoRemovePage(size_t pos);
+
// This subclass of wxBookCtrlBase accepts NULL page pointers (empty pages)
virtual bool AllowNullPage() const { return true; }
bool bSelect = false,
int imageId = wxNOT_FOUND);
- // Implementation of a page removal. See DeletPage for comments.
- wxTreebookPage *DoRemovePage(size_t pos);
-
// Sets selection in the tree control and updates the page being shown.
int DoSetSelection(size_t pos);
virtual void Release();
virtual void Click();
-protected:
virtual bool PerformAction(const wxControlAction& action,
long numArg = -1,
const wxString& strArg = wxEmptyString);
+
+ virtual bool CanBeHighlighted() const { return true; }
+
+protected:
virtual wxSize DoGetBestClientSize() const;
virtual bool DoDrawBackground(wxDC& dc);
virtual void DoDraw(wxControlRenderer *renderer);
- virtual bool CanBeHighlighted() const { return true; }
-
// common part of all ctors
void Init();
// overridden base class virtuals
virtual bool IsPressed() const { return m_isPressed; }
+ virtual bool PerformAction(const wxControlAction& action,
+ long numArg = -1,
+ const wxString& strArg = wxEmptyString);
+
+ virtual bool CanBeHighlighted() const { return true; }
+
protected:
virtual void DoSet3StateValue(wxCheckBoxState WXUNUSED(state));
virtual wxCheckBoxState DoGet3StateValue() const;
- virtual bool PerformAction(const wxControlAction& action,
- long numArg = -1,
- const wxString& strArg = wxEmptyString);
virtual void DoDraw(wxControlRenderer *renderer);
virtual wxSize DoGetBestClientSize() const;
- virtual bool CanBeHighlighted() const { return true; }
-
// get the size of the bitmap using either the current one or the default
// one (query renderer then)
virtual wxSize GetBitmapSize() const;
virtual void DoSetToolTip( wxToolTip *tip );
#endif // wxUSE_TOOLTIPS
+ // we have our own input handler and our own actions
+ virtual bool PerformAction(const wxControlAction& action,
+ long numArg = 0l,
+ const wxString& strArg = wxEmptyString);
+
protected:
// override the base class virtuals involved into geometry calculations
virtual wxSize DoGetBestClientSize() const;
int width, int height,
int sizeFlags = wxSIZE_AUTO);
- // we have our own input handler and our own actions
- virtual bool PerformAction(const wxControlAction& action,
- long numArg = 0l,
- const wxString& strArg = wxEmptyString);
-
// event handlers
void OnKey(wxKeyEvent& event);
virtual wxToolBar* CreateToolBar(long style = -1,
wxWindowID id = wxID_ANY,
const wxString& name = wxToolBarNameStr);
- virtual void PositionToolBar();
#endif // wxUSE_TOOLBAR
virtual int GetMinWidth() const;
virtual void PositionStatusBar();
#endif // wxUSE_MENUS
+protected:
+#if wxUSE_TOOLBAR
+ virtual void PositionToolBar();
+#endif // wxUSE_TOOLBAR
+
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxFrame)
};
virtual bool IsSelected(int n) const
{ return m_selections.Index(n) != wxNOT_FOUND; }
- virtual void DoSetSelection(int n, bool select);
virtual int GetSelection() const;
virtual int GetSelections(wxArrayInt& aSelections) const;
protected:
+ virtual void DoSetSelection(int n, bool select);
virtual int DoAppendOnly(const wxString& item);
virtual int DoAppend(const wxString& item);
virtual void DoInsertItems(const wxArrayString& items, int pos);
// for wxStdSliderButtonInputHandler
wxScrollThumb& GetThumb() { return m_thumb; }
+ virtual bool PerformAction(const wxControlAction& action,
+ long numArg = 0,
+ const wxString& strArg = wxEmptyString);
+
protected:
enum
{
virtual void DoDraw(wxControlRenderer *renderer);
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
- virtual bool PerformAction(const wxControlAction& action,
- long numArg = 0,
- const wxString& strArg = wxEmptyString);
-
// event handlers
void OnSize(wxSizeEvent& event);
// for wxStdSpinButtonInputHandler
const wxScrollArrows& GetArrows() { return m_arrows; }
+ virtual bool PerformAction(const wxControlAction& action,
+ long numArg = 0,
+ const wxString& strArg = wxEmptyString);
+
protected:
virtual wxSize DoGetBestClientSize() const;
virtual void DoDraw(wxControlRenderer *renderer);
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
- virtual bool PerformAction(const wxControlAction& action,
- long numArg = 0,
- const wxString& strArg = wxEmptyString);
-
// the common part of all ctors
void Init();
wxIcon GetIcon() const;
virtual bool HasTransparentBackground() { return true; }
-
-private:
+
+protected:
virtual void DoDraw(wxControlRenderer *renderer);
+private:
// the bitmap which we show
wxBitmap m_bitmap;
// take account of this
virtual wxPoint GetBoxAreaOrigin() const;
+ // returning true from here ensures that we act as a container window for
+ // our children
+ virtual bool IsStaticBox() const { return true; }
+
protected:
// draw the control
virtual void DoDraw(wxControlRenderer *renderer);
// get the size of the border
wxRect GetBorderGeometry() const;
- // returning true from here ensures that we act as a container window for
- // our children
- virtual bool IsStaticBox() const { return true; }
-
private:
DECLARE_DYNAMIC_CLASS(wxStaticBox)
};
virtual int GetBorderX() const;
virtual int GetBorderY() const;
+ // wxInputConsumer pure virtual
+ virtual wxWindow *GetInputWindow() const
+ { return wx_const_cast(wxStatusBar*, this); }
+
protected:
// recalculate the field widths
void OnSize(wxSizeEvent& event);
// draw the statusbar
virtual void DoDraw(wxControlRenderer *renderer);
- // wxInputConsumer pure virtual
- virtual wxWindow *GetInputWindow() const
- { return wxConstCast(this, wxStatusBar); }
-
// tell them about our preferred height
virtual wxSize DoGetBestSize() const;
virtual void CalcUnscrolledPosition(int x, int y, int *xx, int *yy) const;
virtual void CalcScrolledPosition(int x, int y, int *xx, int *yy) const;
- // ensure we have correct default border
- virtual wxBorder GetDefaultBorder() const { return wxBORDER_SUNKEN; }
-
// perform an action
virtual bool PerformAction(const wxControlAction& action,
long numArg = -1,
// only for wxStdTextCtrlInputHandler
void RefreshSelection();
+ // override wxScrollHelper method to prevent (auto)scrolling beyond the end
+ // of line
+ virtual bool SendAutoScrollEvents(wxScrollWinEvent& event) const;
+
+ // idle processing
+ virtual void OnInternalIdle();
+
protected:
+ // ensure we have correct default border
+ virtual wxBorder GetDefaultBorder() const { return wxBORDER_SUNKEN; }
+
// override base class methods
virtual void DoDrawBorder(wxDC& dc, const wxRect& rect);
virtual void DoDraw(wxControlRenderer *renderer);
void OnChar(wxKeyEvent& event);
void OnSize(wxSizeEvent& event);
- // overrdie wxScrollHelper method to prevent (auto)scrolling beyond the end
- // of line
- virtual bool SendAutoScrollEvents(wxScrollWinEvent& event) const;
-
// return the struct containing control-type dependent data
struct wxTextSingleLineData& SData() { return *m_data.sdata; }
struct wxTextMultiLineData& MData() { return *m_data.mdata; }
bool DoCut();
bool DoPaste();
- // idle processing
- virtual void OnInternalIdle();
private:
// all these methods are for multiline text controls only
virtual void SetMargins(int x, int y);
void SetMargins(const wxSize& size)
{ SetMargins((int) size.x, (int) size.y); }
-
+
+ virtual bool PerformAction(const wxControlAction& action,
+ long numArg = -1,
+ const wxString& strArg = wxEmptyString);
protected:
// common part of all ctors
void Init();
const wxString& longHelp);
virtual wxToolBarToolBase *CreateTool(wxControl *control);
- // implement wxUniversal methods
- virtual bool PerformAction(const wxControlAction& action,
- long numArg = -1,
- const wxString& strArg = wxEmptyString);
virtual wxSize DoGetBestClientSize() const;
virtual void DoSetSize(int x, int y,
int width, int height,
// implement base class pure virtuals
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
virtual wxPoint GetClientAreaOrigin() const;
- virtual void DoGetClientSize(int *width, int *height) const;
- virtual void DoSetClientSize(int width, int height);
virtual void SetIcon(const wxIcon& icon) { SetIcons( wxIconBundle( icon ) ); }
virtual void SetIcons(const wxIconBundle& icons);
virtual int GetMinWidth() const;
virtual int GetMinHeight() const;
+ virtual wxWindow *GetInputWindow() const { return wx_const_cast(wxTopLevelWindow*, this); }
+
protected:
+ virtual void DoGetClientSize(int *width, int *height) const;
+ virtual void DoSetClientSize(int width, int height);
+
// handle titlebar button click event
virtual void ClickTitleBarButton(long button);
- virtual wxWindow *GetInputWindow() const { return (wxWindow*)this; }
-
// return wxTOPLEVEL_xxx combination based on current state of the frame
long GetDecorationsStyle() const;
// NB: all menu related functions are implemented in menu.cpp
#if wxUSE_MENUS
- virtual bool DoPopupMenu(wxMenu *menu, int x, int y);
-
// this is wxUniv-specific private method to be used only by wxMenu
void DismissPopupMenu();
#endif // wxUSE_MENUS
// common part of all ctors
void Init();
- // overridden base class virtuals
+#if wxUSE_MENUS
+ virtual bool DoPopupMenu(wxMenu *menu, int x, int y);
+#endif // wxUSE_MENUS
// we deal with the scrollbars in these functions
virtual void DoSetClientSize(int width, int height);
};
#define WX_DECLARE_VECTORBASE(obj, cls)\
-private:\
+protected:\
virtual void Free(void *o)\
{\
delete (obj *) o;\
void SetStyle( int style );
void SetStipple( const wxBitmap& stipple );
-private:
+protected:
// ref counting code
virtual wxObjectRefData *CreateRefData() const;
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
virtual size_t GetDataSize() const { return m_pngSize; }
virtual bool GetDataHere(void *buf) const;
virtual bool SetData(size_t len, const void *buf);
+ // Must provide overloads to avoid hiding them (and warnings about it)
+ virtual size_t GetDataSize(const wxDataFormat&) const
+ {
+ return GetDataSize();
+ }
+ virtual bool GetDataHere(const wxDataFormat&, void *buf) const
+ {
+ return GetDataHere(buf);
+ }
+ virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
+ {
+ return SetData(len, buf);
+ }
protected:
void Init() { m_pngData = (void *)NULL; m_pngSize = 0; }
void *m_pngData;
void DoConvertToPng();
-
-private:
- // virtual function hiding supression
- size_t GetDataSize(const wxDataFormat& format) const
- { return(wxDataObjectSimple::GetDataSize(format)); }
- bool GetDataHere(const wxDataFormat& format, void* pBuf) const
- { return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
- bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
- { return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
};
// ----------------------------------------------------------------------------
virtual size_t GetDataSize() const;
virtual bool GetDataHere(void *buf) const;
virtual bool SetData(size_t len, const void *buf);
-
-private:
- // virtual function hiding supression
- size_t GetDataSize(const wxDataFormat& format) const
- { return(wxDataObjectSimple::GetDataSize(format)); }
- bool GetDataHere(const wxDataFormat& format, void* pBuf) const
- { return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
- bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
- { return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
+ // Must provide overloads to avoid hiding them (and warnings about it)
+ virtual size_t GetDataSize(const wxDataFormat&) const
+ {
+ return GetDataSize();
+ }
+ virtual bool GetDataHere(const wxDataFormat&, void *buf) const
+ {
+ return GetDataHere(buf);
+ }
+ virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
+ {
+ return SetData(len, buf);
+ }
};
#endif // _WX_X11_DATAOBJ2_H_
virtual wxCoord GetCharHeight() const;
virtual wxCoord GetCharWidth() const;
- virtual void DoGetTextExtent(const wxString& string,
- wxCoord *x, wxCoord *y,
- wxCoord *descent = NULL,
- wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const;
virtual int GetDepth() const;
virtual wxSize GetPPI() const;
virtual void DestroyClippingRegion();
WXWindow GetWindow() const { return m_window; }
+ virtual void ComputeScaleAndOrigin();
+
protected:
// implementation
// --------------
+ virtual void DoGetTextExtent(const wxString& string,
+ wxCoord *x, wxCoord *y,
+ wxCoord *descent = NULL,
+ wxCoord *externalLeading = NULL,
+ wxFont *theFont = NULL) const;
WXDisplay *m_display;
WXWindow m_window;
void SetUpDC();
void Destroy();
- virtual void ComputeScaleAndOrigin();
private:
DECLARE_DYNAMIC_CLASS(wxWindowDC)
wxMemoryDC( wxDC *dc ); // Create compatible DC
~wxMemoryDC();
virtual void SelectObject( const wxBitmap& bitmap );
- void DoGetSize( int *width, int *height ) const;
// implementation
wxBitmap m_selected;
-private:
+protected:
+ void DoGetSize( int *width, int *height ) const;
+
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
};
wxDash* GetDash() const;
wxBitmap* GetStipple() const;
-private:
+protected:
// ref counting code
virtual wxObjectRefData *CreateRefData() const;
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
virtual bool SetShape(const wxRegion& region);
+ // For implementation purposes - sometimes decorations make the
+ // client area smaller
+ virtual wxPoint GetClientAreaOrigin() const;
+
+ virtual void OnInternalIdle();
+
protected:
// common part of all ctors
void Init();
// set the icon for the window
void DoSetIcon( const wxIcon& icon );
- // For implementation purposes - sometimes decorations make the
- // client area smaller
- virtual wxPoint GetClientAreaOrigin() const;
-
// For implementation of delayed resize events
bool m_needResizeInIdle;
- virtual void OnInternalIdle();
virtual void DoGetClientSize( int *width, int *height ) const;
virtual void DoGetSize( int *width, int *height ) const;
void Notify();
-private:
wxArchiveEntry* DoClone() const { return ZipClone(); }
+private:
size_t ReadLocal(wxInputStream& stream, wxMBConv& conv);
size_t WriteLocal(wxOutputStream& stream, wxMBConv& conv) const;
int GetLevel() const { return m_level; }
void WXZIPFIX SetLevel(int level);
-
+
+ bool WXZIPFIX PutNextEntry(wxArchiveEntry *entry);
+ bool WXZIPFIX CopyEntry(wxArchiveEntry *entry, wxArchiveInputStream& stream);
+ bool WXZIPFIX CopyArchiveMetaData(wxArchiveInputStream& stream);
+
protected:
virtual size_t WXZIPFIX OnSysWrite(const void *buffer, size_t size);
virtual wxFileOffset OnSysTell() const { return m_entrySize; }
{ return m_offsetAdjustment != wxInvalidOffset; }
private:
- bool WXZIPFIX PutNextEntry(wxArchiveEntry *entry);
- bool WXZIPFIX CopyEntry(wxArchiveEntry *entry, wxArchiveInputStream& stream);
- bool WXZIPFIX CopyArchiveMetaData(wxArchiveInputStream& stream);
-
bool IsOpened() const { return m_comp || m_pending; }
bool DoCreate(wxZipEntry *entry, bool raw = false);
virtual WXZIPFIX ~wxZipInputStream();
+ bool WXZIPFIX OpenEntry(wxArchiveEntry& entry);
bool OpenEntry(wxZipEntry& entry) { return DoOpen(&entry); }
bool WXZIPFIX CloseEntry();
virtual wxInputStream* WXZIPFIX OpenDecompressor(wxInputStream& stream);
virtual bool WXZIPFIX CloseDecompressor(wxInputStream *decomp);
+ wxArchiveEntry *DoGetNextEntry() { return GetNextEntry(); }
+
private:
void Init();
void Init(const wxString& file);
wxInputStream& OpenFile(const wxString& archive);
- wxArchiveEntry *DoGetNextEntry() { return GetNextEntry(); }
-
- bool WXZIPFIX OpenEntry(wxArchiveEntry& entry);
-
wxStreamError ReadLocal(bool readEndRec = false);
wxStreamError ReadCentral();
long style = 0,
const wxValidator& validator = wxDefaultValidator);
- virtual void DoMoveWindow(int x, int y, int w, int h);
-
protected:
+ virtual void DoMoveWindow(int x, int y, int w, int h);
void OnSize(wxSizeEvent& event);
void OnMouseEnter(wxMouseEvent& event);
virtual ~wxListMainWindow();
- wxWindow *GetMainWindowOfCompositeControl() { return GetParent(); }
-
bool HasFlag(int flag) const { return m_parent->HasFlag(flag); }
// return true if this is a virtual list control
wxListTextCtrl* m_textctrl;
protected:
+ wxWindow *GetMainWindowOfCompositeControl() { return GetParent(); }
+
// the total count of items in a virtual list control
size_t m_countVirt;
bottom_border += default_border->bottom;
g_free( default_border );
}
- win->DoMoveWindow( win->m_x-top_border,
- win->m_y-left_border,
- win->m_width+left_border+right_border,
- win->m_height+top_border+bottom_border );
+ win->MoveWindow(
+ win->m_x - top_border,
+ win->m_y - left_border,
+ win->m_width + left_border + right_border,
+ win->m_height + top_border + bottom_border);
}
return FALSE;
private:
wxComboBox *m_cb;
+ friend class wxComboBox;
+
DECLARE_EVENT_TABLE()
};
}
}
}
+
+void wxFrame::PositionBars()
+{
+#if wxUSE_STATUSBAR
+ PositionStatusBar();
+#endif
+#if wxUSE_TOOLBAR
+ PositionToolBar();
+#endif
+}
+
#endif
SetSizeHints(-1,-1);
}
+ bool ProcessEvent(wxEvent &event)
+ {
+ // Hand button down events to wxSpinCtrl. Doesn't work.
+ if (event.GetEventType() == wxEVT_LEFT_DOWN && m_spin->ProcessEvent( event ))
+ return TRUE;
+
+ return wxTextCtrl::ProcessEvent( event );
+ }
+
protected:
void OnTextChange(wxCommandEvent& event)
{
event.Skip();
}
- bool ProcessEvent(wxEvent &event)
- {
- // Hand button down events to wxSpinCtrl. Doesn't work.
- if (event.GetEventType() == wxEVT_LEFT_DOWN && m_spin->ProcessEvent( event ))
- return TRUE;
-
- return wxTextCtrl::ProcessEvent( event );
- }
-
private:
wxSpinCtrl *m_spin;
wxFrame *frame = wxDynamicCast( toplevelWindow , wxFrame ) ;
if ( frame )
{
-#if wxUSE_STATUSBAR
- frame->PositionStatusBar();
-#endif
-#if wxUSE_TOOLBAR
- frame->PositionToolBar();
-#endif
+ frame->PositionBars();
}
wxSizeEvent event( r.GetSize() , toplevelWindow->GetId() ) ;
bool wxAcceleratorTable::Translate(wxWindow *window, WXMSG *wxmsg) const
{
+#if 0
+ // calling TranslateAccelerator() with child window doesn't do anything so
+ // it's probably a bug
+ wxASSERT_MSG( window->IsTopLevel(),
+ _T("TranslateAccelerator() needs a top level window") );
+#endif
+
MSG *msg = (MSG *)wxmsg;
return Ok() && ::TranslateAccelerator(GetHwndOf(window), GetHaccel(), msg);
}
wxIEnumFORMATETC(const wxDataFormat* formats, ULONG nCount);
virtual ~wxIEnumFORMATETC() { delete [] m_formats; }
- DECLARE_IUNKNOWN_METHODS;
-
// IEnumFORMATETC
STDMETHODIMP Next(ULONG celt, FORMATETC *rgelt, ULONG *pceltFetched);
STDMETHODIMP Skip(ULONG celt);
STDMETHODIMP Reset();
STDMETHODIMP Clone(IEnumFORMATETC **ppenum);
+ DECLARE_IUNKNOWN_METHODS;
+
private:
CLIPFORMAT *m_formats; // formats we can provide data in
ULONG m_nCount, // number of formats we support
// when this object is deleted - setting this flag enables such logic
void SetDeleteFlag() { m_mustDelete = true; }
- DECLARE_IUNKNOWN_METHODS;
-
// IDataObject
STDMETHODIMP GetData(FORMATETC *pformatetcIn, STGMEDIUM *pmedium);
STDMETHODIMP GetDataHere(FORMATETC *pformatetc, STGMEDIUM *pmedium);
STDMETHODIMP DUnadvise(DWORD dwConnection);
STDMETHODIMP EnumDAdvise(IEnumSTATDATA **ppenumAdvise);
+ DECLARE_IUNKNOWN_METHODS;
+
private:
wxDataObject *m_pDataObject; // pointer to C++ class we belong to
{
public:
CFSTR_SHELLURLDataObject() : wxCustomDataObject(CFSTR_SHELLURL) {}
-protected:
+
virtual size_t GetBufferOffset( const wxDataFormat& WXUNUSED(format) )
{
return 0;
wxIDropSource(wxDropSource *pDropSource);
virtual ~wxIDropSource() { }
- DECLARE_IUNKNOWN_METHODS;
-
// IDropSource
STDMETHODIMP QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState);
STDMETHODIMP GiveFeedback(DWORD dwEffect);
+ DECLARE_IUNKNOWN_METHODS;
+
private:
DWORD m_grfInitKeyState; // button which started the d&d operation
wxDropSource *m_pDropSource; // pointer to C++ class we belong to
virtual void SetSelection(int n) { DoSetSelection(n, true); }
void SetSelection(int n, bool select) { DoSetSelection(n, select); }
+ // used to process wxUniv actions
+ bool PerformAction(const wxControlAction& action,
+ long numArg,
+ const wxString& strArg);
+
protected:
// we shouldn't return height too big from here
virtual wxSize DoGetBestClientSize() const;
// called whenever the user selects or activates a listbox item
void OnSelect(wxCommandEvent& event);
- // used to process wxUniv actions
- bool PerformAction(const wxControlAction& action,
- long numArg,
- const wxString& strArg);
-
private:
// has the mouse been released on this control?
bool m_clicked;
// override the base class version to dismiss any open submenus
virtual void Dismiss();
- // notify the menu when the window disappears from screen
- virtual void OnDismiss();
-
// called when a submenu is dismissed
void OnSubmenuDismiss(bool dismissParent);
// don't dismiss the popup window if the parent menu was clicked
virtual bool ProcessLeftDown(wxMouseEvent& event);
+ virtual bool SetCurrent(bool doit = true) { return wxPopupTransientWindow::SetCurrent(doit); };
+
protected:
// how did we perform this operation?
enum InputMethod
WithMouse
};
+ // notify the menu when the window disappears from screen
+ virtual void OnDismiss();
+
// draw the menu inside this window
virtual void DoDraw(wxControlRenderer *renderer);
// set the current node and item withotu refreshing anything
void SetCurrent(wxMenuItemList::compatibility_iterator node);
- virtual bool SetCurrent(bool doit = true){return wxPopupTransientWindow::SetCurrent(doit);};
// change the current item refreshing the old and new items
void ChangeCurrent(wxMenuItemList::compatibility_iterator node);