Under Windows, puts a query button on the caption. When pressed,
Windows will go into a context-sensitive help mode and wxWidgets
will send a wxEVT_HELP event if the user clicked on an application window.
- This style cannot be used together with wxMAXIMIZE_BOX or wxMINIMIZE_BOX, so
- these two styles are automatically turned of if this one is used.
+ This style cannot be used (because of the underlying native behaviour)
+ together with @c wxMAXIMIZE_BOX or @c wxMINIMIZE_BOX, so these two styles
+ are automatically turned off if this one is used.
@style{wxWS_EX_PROCESS_IDLE}
This window should always process idle events, even if the mode set
by wxIdleEvent::SetMode is wxIDLE_PROCESS_SPECIFIED.
@remarks This function is currently only implemented under Mac/Carbon.
*/
- virtual void AlwaysShowScrollbars(bool = true, bool = true);
+ virtual void AlwaysShowScrollbars(bool hflag = true, bool vflag = true);
/**
Sets the cached best size value.
If @true, the window is eligible for drop file events.
If @false, the window will not accept drop file events.
- @remarks Windows only.
+ @remarks Windows only until version 2.8.9, available on all platforms
+ since 2.8.10. Cannot be used together with SetDropTarget() on
+ non-Windows platforms.
+
+ @see SetDropTarget()
*/
virtual void DragAcceptFiles(bool accept);
*/
wxAccessible* GetAccessible();
- /**
- @deprecated
- This method is deprecated, use GetEffectiveMinSize() instead.
- */
- wxSize GetAdjustedBestSize() const;
-
/**
Returns the background colour of the window.
//@{
/**
Returns the size of the window 'client area' in pixels.
+
The client area is the area which may be drawn on by the programmer,
excluding title bar, border, scrollbars, etc.
Note that if this window is a top-level one and it is currently minimized, the
return size is empty (both width and height are 0).
- @param width
- Receives the client width in pixels.
- @param height
- Receives the client height in pixels.
-
@see GetSize(), GetVirtualSize()
*/
void GetClientSize(int* width, int* height) const;
@param origin
Help event origin, see also wxHelpEvent::GetOrigin.
*/
- virtual wxString GetHelpTextAtPoint(const wxPoint point,
+ virtual wxString GetHelpTextAtPoint(const wxPoint& point,
wxHelpEvent::Origin origin) const;
/**
/**
This gets the virtual size of the window in pixels.
By default it returns the client size of the window, but after a call to
- SetVirtualSize() it will return that size.
+ SetVirtualSize() it will return the size set with that method.
+ */
+ wxSize GetVirtualSize() const;
+
+ /**
+ Like the other GetVirtualSize() overload but uses pointers instead.
@param width
Receives the window virtual width.
Receives the window virtual height.
*/
void GetVirtualSize(int* width, int* height) const;
- wxSize GetVirtualSize() const;
//@}
/**
only redrawing those areas, which have been exposed.
*/
bool IsExposed(int x, int y) const;
- const bool IsExposed(wxPoint amp;pt) const;
- const bool IsExposed(int x, int y, int w, int h) const;
- const bool IsExposed(wxRect amp;rect) const;
+ bool IsExposed(wxPoint& pt) const;
+ bool IsExposed(int x, int y, int w, int h) const;
+ bool IsExposed(wxRect& rect) const;
//@}
/**
Invokes the constraint-based layout algorithm or the sizer-based algorithm
for this window.
- See SetAutoLayout(): when auto layout is on, this function gets called automatically
- when the window is resized.
+ This function does not get called automatically when the window is resized
+ because lots of windows deriving from wxWindow does not need this functionality.
+ If you want to have Layout() called automatically, you should derive
+ from wxPanel (see wxPanel::Layout).
@see @ref overview_windowsizing
*/
/**
Lowers the window to the bottom of the window hierarchy (Z-order).
+ @remarks
+ This function only works for wxTopLevelWindow-derived classes.
+
@see Raise()
*/
virtual void Lower();
Disables all other windows in the application so that
the user can only interact with this window.
- @param flag
+ @param modal
If @true, this call disables all other windows in the application so that
the user can only interact with this window. If @false, the effect is
reversed.
Required x position.
@param y
Required y position.
+ @param flags
+ See SetSize() for more info about this parameter.
@remarks Implementations of SetSize can also implicitly implement the
Move() function, which is defined in the base wxWindow class as the call:
@see SetSize()
*/
- void Move(int x, int y, int flags = 0);
+ void Move(int x, int y, int flags = wxSIZE_USE_EXISTING);
/**
Moves the window to the given position.
@param pt
wxPoint object representing the position.
+ @param flags
+ See SetSize() for more info about this parameter.
@remarks Implementations of SetSize() can also implicitly implement the
Move() function, which is defined in the base wxWindow class as the call:
@see SetSize()
*/
- void Move(const wxPoint& pt, int flags = 0);
+ void Move(const wxPoint& pt, int flags = wxSIZE_USE_EXISTING);
/**
Moves this window in the tab navigation order after the specified @e win.
processed as usually. If the coordinates are not specified, current mouse
cursor position is used.
- @param menu
- Menu to pop up.
- @param pos
- The position where the menu will appear.
- @param x
- Required x position for the menu to appear.
- @param y
- Required y position for the menu to appear.
+ @a menu is the menu to pop up.
+
+ The position where the menu will appear can be specified either as a
+ wxPoint @a pos or by two integers (@a x and @a y).
@remarks Just before the menu is popped up, wxMenu::UpdateUI is called to
ensure that the menu items are in the correct state.
/**
Raises the window to the top of the window hierarchy (Z-order).
- In current version of wxWidgets this works both for managed and child windows.
+
+ @remarks
+ This function only works for wxTopLevelWindow-derived classes.
@see Lower()
*/
@see UnregisterHotKey()
*/
- bool RegisterHotKey(int hotkeyId, int modifiers,
- int virtualKeyCode);
+ virtual bool RegisterHotKey(int hotkeyId, int modifiers,
+ int virtualKeyCode);
/**
Releases mouse input captured with CaptureMouse().
*/
virtual bool Reparent(wxWindow* newParent);
- //@{
/**
Converts from screen to client window coordinates.
Stores the screen x coordinate and receives the client x coordinate.
@param y
Stores the screen x coordinate and receives the client x coordinate.
+ */
+ void ScreenToClient(int* x, int* y) const;
+
+ /**
+ Converts from screen to client window coordinates.
+
@param pt
- The screen position for the second form of the function.
+ The screen position.
*/
- virtual void ScreenToClient(int* x, int* y) const;
- virtual wxPoint ScreenToClient(const wxPoint& pt) const;
- //@}
+ wxPoint ScreenToClient(const wxPoint& pt) const;
/**
Scrolls the window by the given number of lines down (if @a lines is
const wxRect* rect = NULL);
/**
- This function sends a dummy @ref overview_wxsizeevent "size event" to
+ This function sends a dummy @ref wxSizeEvent "size event" to
the window allowing it to re-layout its children positions.
It is sometimes useful to call this function after adding or deleting a
updated when its size changes.
@param autoLayout
- Set this to @true if you wish the Layout function to be
- called automatically when the window is resized.
+ Set this to @true if you wish the Layout() function to be
+ called automatically when the window is resized
+ (really happens only if you derive from wxPanel or wxTopLevelWindow).
@see SetConstraints()
*/
than SetSize(), since the application need not worry about what dimensions
the border or title bar have when trying to fit the window around panel
items, for example.
-
- @param width
- The required client area width.
- @param height
- The required client area height.
- @param size
- The required client size.
*/
virtual void SetClientSize(int width, int height);
virtual void SetClientSize(const wxSize& size);
virtual void SetSize(int width, int height);
//@}
+ /**
+ Use of this function for windows which are not toplevel windows
+ (such as wxDialog or wxFrame) is discouraged.
+ Please use SetMinSize() and SetMaxSize() instead.
+
+ @see wxTopLevelWindow::SetSizeHints
+ */
+ void SetSizeHints( const wxSize& minSize,
+ const wxSize& maxSize=wxDefaultSize,
+ const wxSize& incSize=wxDefaultSize);
+
/**
Sets the window to have the given layout sizer.
The window will then own the object, and will take care of its deletion.
@see RegisterHotKey()
*/
- bool UnregisterHotKey(int hotkeyId);
+ virtual bool UnregisterHotKey(int hotkeyId);
/**
Unreserve an ID or range of IDs that was reserved by NewControlId().