wxSHOW_EFFECT_MAX
};
+// flags for SendSizeEvent()
+enum
+{
+ wxSEND_EVENT_POST = 1
+};
+
// ----------------------------------------------------------------------------
// (pseudo)template list classes
// ----------------------------------------------------------------------------
// sends a size event to the window using its current size -- this has an
// effect of refreshing the window layout
- virtual void SendSizeEvent();
+ //
+ // by default the event is sent, i.e. processed immediately, but if flags
+ // value includes wxSEND_EVENT_POST then it's posted, i.e. only schedule
+ // for later processing
+ virtual void SendSizeEvent(int flags = 0);
// this is a safe wrapper for GetParent()->SendSizeEvent(): it checks that
// we have a parent window and it's not in process of being deleted
//
// this is used by controls such as tool/status bars changes to which must
// also result in parent re-layout
- void SendSizeEventToParent();
+ void SendSizeEventToParent(int flags = 0);
+
+ // this is a more readable synonym for SendSizeEvent(wxSEND_EVENT_POST)
+ void PostSizeEvent() { SendSizeEvent(wxSEND_EVENT_POST); }
+
+ // this is the same as SendSizeEventToParent() but using PostSizeEvent()
+ void PostSizeEventToParent() { SendSizeEventToParent(wxSEND_EVENT_POST); }
// window state
#if wxUSE_TOOLTIPS
// the easiest way to set a tooltip for a window is to use this method
void SetToolTip( const wxString &tip );
- // attach a tooltip to the window
+ // attach a tooltip to the window, pointer can be NULL to remove
+ // existing tooltip
void SetToolTip( wxToolTip *tip ) { DoSetToolTip(tip); }
+ // more readable synonym for SetToolTip(NULL)
+ void UnsetToolTip() { SetToolTip(NULL); }
// get the associated tooltip or NULL if none
wxToolTip* GetToolTip() const { return m_tooltip; }
- wxString GetToolTipText() const ;
-#else
+ wxString GetToolTipText() const;
+#else // !wxUSE_TOOLTIPS
// make it much easier to compile apps in an environment
// that doesn't support tooltips, such as PocketPC
- inline void SetToolTip( const wxString & WXUNUSED(tip) ) {}
-#endif // wxUSE_TOOLTIPS
+ void SetToolTip(const wxString & WXUNUSED(tip)) { }
+ void UnsetToolTip() { }
+#endif // wxUSE_TOOLTIPS/!wxUSE_TOOLTIPS
// drag and drop
// -------------