return wxSize( wxMax( client.x, best.x ), wxMax( client.y, best.y ) );
}
+ // return the size of the left/right and top/bottom borders in x and y
+ // components of the result respectively
+ virtual wxSize GetWindowBorderSize() const;
+
+
// window state
// ------------
void SetWindowStyle( long style ) { SetWindowStyleFlag(style); }
long GetWindowStyle() const { return GetWindowStyleFlag(); }
+ // check if the flag is set
bool HasFlag(int flag) const { return (m_windowStyle & flag) != 0; }
virtual bool IsRetained() const { return HasFlag(wxRETAINED); }
+ // turn the flag on if it had been turned off before and vice versa,
+ // return true if the flag is currently turned on
+ bool ToggleWindowStyle(int flag);
+
// extra style: the less often used style bits which can't be set with
// SetWindowStyleFlag()
virtual void SetExtraStyle(long exStyle) { m_exStyle = exStyle; }
const wxFont *theFont = (const wxFont *) NULL)
const = 0;
+ wxSize GetTextExtent(const wxString& string) const
+ {
+ wxCoord w, h;
+ GetTextExtent(string, &w, &h);
+ return wxSize(w, h);
+ }
+
// client <-> screen coords
// ------------------------
// behaviour in the most common case
virtual bool ShouldInheritColours() const { return false; }
+ // returns true if the window can be positioned outside of parent's client
+ // area (normal windows can't, but e.g. menubar or statusbar can):
+ virtual bool CanBeOutsideClientArea() const { return false; }
+
protected:
// event handling specific to wxWindow
virtual bool TryValidator(wxEvent& event);