⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 window.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
📖 第 1 页 / 共 5 页
字号:
\docparam{y}{Receives the y position of the window if non-\NULL.}\pythonnote{In place of a single overloaded method name, wxPythonimplements the following methods:\par\indented{2cm}{\begin{twocollist}\twocolitem{{\bf GetPosition()}}{Returns a wxPoint}\twocolitem{{\bf GetPositionTuple()}}{Returns a tuple (x, y)}\end{twocollist}}}\perlnote{In wxPerl there are two methods instead of a single overloadedmethod:\par\indented{2cm}{\begin{twocollist}\twocolitem{{\bf GetPosition()}}{Returns a Wx::Point}\twocolitem{{\bf GetPositionXY()}}{Returns a 2-element list {\tt ( x, y )}}\end{twocollist}}}\wxheading{See also}\helpref{GetScreenPosition}{wxwindowgetscreenposition}\membersection{wxWindow::GetRect}\label{wxwindowgetrect}\constfunc{virtual wxRect}{GetRect}{\void}Returns the size and position of the window as a \helpref{wxRect}{wxrect} object.\wxheading{See also}\helpref{GetScreenRect}{wxwindowgetscreenrect}\membersection{wxWindow::GetScreenPosition}\label{wxwindowgetscreenposition}\constfunc{virtual void}{GetScreenPosition}{\param{int* }{x}, \param{int* }{y}}\constfunc{wxPoint}{GetScreenPosition}{\void}Returns the window position in screen coordinates, whether the window is achild window or a top level one.\wxheading{Parameters}\docparam{x}{Receives the x position of the window on the screen if non-\NULL.}\docparam{y}{Receives the y position of the window on the screen if non-\NULL.}\wxheading{See also}\helpref{GetPosition}{wxwindowgetposition}\membersection{wxWindow::GetScreenRect}\label{wxwindowgetscreenrect}\constfunc{virtual wxRect}{GetScreenRect}{\void}Returns the size and position of the window on the screen as a \helpref{wxRect}{wxrect} object.\wxheading{See also}\helpref{GetRect}{wxwindowgetrect}\membersection{wxWindow::GetScrollPos}\label{wxwindowgetscrollpos}\func{virtual int}{GetScrollPos}{\param{int }{orientation}}Returns the built-in scrollbar position.\wxheading{See also}See \helpref{wxWindow::SetScrollbar}{wxwindowsetscrollbar}\membersection{wxWindow::GetScrollRange}\label{wxwindowgetscrollrange}\func{virtual int}{GetScrollRange}{\param{int }{orientation}}Returns the built-in scrollbar range.\wxheading{See also}\helpref{wxWindow::SetScrollbar}{wxwindowsetscrollbar}\membersection{wxWindow::GetScrollThumb}\label{wxwindowgetscrollthumb}\func{virtual int}{GetScrollThumb}{\param{int }{orientation}}Returns the built-in scrollbar thumb size.\wxheading{See also}\helpref{wxWindow::SetScrollbar}{wxwindowsetscrollbar}\membersection{wxWindow::GetSize}\label{wxwindowgetsize}\constfunc{void}{GetSize}{\param{int* }{width}, \param{int* }{height}}\constfunc{wxSize}{GetSize}{\void}This gets the size of the entire window in pixels,including title bar, border, scrollbars, etc.\wxheading{Parameters}\docparam{width}{Receives the window width.}\docparam{height}{Receives the window height.}\pythonnote{In place of a single overloaded method name, wxPythonimplements the following methods:\par\indented{2cm}{\begin{twocollist}\twocolitem{{\bf GetSize()}}{Returns a wxSize}\twocolitem{{\bf GetSizeTuple()}}{Returns a 2-tuple (width, height)}\end{twocollist}}}\perlnote{In wxPerl there are two methods instead of a single overloadedmethod:\par\indented{2cm}{\begin{twocollist}\twocolitem{{\bf GetSize()}}{Returns a Wx::Size}\twocolitem{{\bf GetSizeWH()}}{Returns a 2-element list {\tt ( width, height )}}\end{twocollist}}}\wxheading{See also}\helpref{GetClientSize}{wxwindowgetclientsize},\rtfsp\helpref{GetVirtualSize}{wxwindowgetvirtualsize}\membersection{wxWindow::GetSizer}\label{wxwindowgetsizer}\constfunc{wxSizer *}{GetSizer}{\void}Return the sizer associated with the window by a previous call to\helpref{SetSizer()}{wxwindowsetsizer} or {\tt NULL}.\membersection{wxWindow::GetTextExtent}\label{wxwindowgettextextent}\constfunc{virtual void}{GetTextExtent}{\param{const wxString\& }{string}, \param{int* }{x}, \param{int* }{y}, \param{int* }{descent = NULL}, \param{int* }{externalLeading = NULL}, \param{const wxFont* }{font = NULL}, \param{bool}{ use16 = {\tt false}}}Gets the dimensions of the string as it would be drawn on thewindow with the currently selected font.\wxheading{Parameters}\docparam{string}{String whose extent is to be measured.}\docparam{x}{Return value for width.}\docparam{y}{Return value for height.}\docparam{descent}{Return value for descent (optional).}\docparam{externalLeading}{Return value for external leading (optional).}\docparam{font}{Font to use instead of the current window font (optional).}\docparam{use16}{If {\tt true}, {\it string} contains 16-bit characters. The default is {\tt false}.}\pythonnote{In place of a single overloaded method name, wxPythonimplements the following methods:\par\indented{2cm}{\begin{twocollist}\twocolitem{{\bf GetTextExtent(string)}}{Returns a 2-tuple,  (width, height)}\twocolitem{{\bf GetFullTextExtent(string, font=NULL)}}{Returns a4-tuple, (width, height, descent, externalLeading) }\end{twocollist}}}\perlnote{In wxPerl this method takes only the {\tt string} and optionally {\tt font} parameters, and returns a 4-element list {\tt ( x, y, descent, externalLeading )}.}\membersection{wxWindow::GetToolTip}\label{wxwindowgettooltip}\constfunc{wxToolTip*}{GetToolTip}{\void}Get the associated tooltip or NULL if none.\membersection{wxWindow::GetUpdateRegion}\label{wxwindowgetupdateregion}\constfunc{virtual wxRegion}{GetUpdateRegion}{\void}Returns the region specifying which parts of the window have been damaged. Shouldonly be called within an \helpref{wxPaintEvent}{wxpaintevent} handler.\wxheading{See also}\helpref{wxRegion}{wxregion},\rtfsp\helpref{wxRegionIterator}{wxregioniterator}\membersection{wxWindow::GetValidator}\label{wxwindowgetvalidator}\constfunc{wxValidator*}{GetValidator}{\void}Returns a pointer to the current validator for the window, or NULL if there is none.\membersection{wxWindow::GetVirtualSize}\label{wxwindowgetvirtualsize}\constfunc{void}{GetVirtualSize}{\param{int* }{width}, \param{int* }{height}}\constfunc{wxSize}{GetVirtualSize}{\void}This gets the virtual size of the window in pixels. By default itreturns the client size of the window, but after a call to\helpref{SetVirtualSize}{wxwindowsetvirtualsize} it will returnthat size.\wxheading{Parameters}\docparam{width}{Receives the window virtual width.}\docparam{height}{Receives the window virtual height.}\helpref{GetSize}{wxwindowgetsize},\rtfsp\helpref{GetClientSize}{wxwindowgetclientsize}\membersection{wxWindow::GetWindowBorderSize}\label{wxwindowgetwindowbordersize}\constfunc{wxSize}{GetWindowBorderSize}{\void}Returns the size of the left/right and top/bottom borders of this window in xand y components of the result respectively.\membersection{wxWindow::GetWindowStyleFlag}\label{wxwindowgetwindowstyleflag}\constfunc{long}{GetWindowStyleFlag}{\void}Gets the window style that was passed to the constructor or {\bf Create}method. {\bf GetWindowStyle()} is another name for the same function.\membersection{wxWindow::GetWindowVariant}\label{wxwindowgetwindowvariant}\constfunc{wxWindowVariant}{GetWindowVariant}{\void}Returns the value previously passed to\helpref{wxWindow::SetWindowVariant}{wxwindowsetwindowvariant}.\membersection{wxWindow::HasCapture}\label{wxwindowhascapture}\constfunc{virtual bool}{HasCapture}{\void}Returns {\tt true} if this window has the current mouse capture.\wxheading{See also}\helpref{wxWindow::CaptureMouse}{wxwindowcapturemouse},\helpref{wxWindow::ReleaseMouse}{wxwindowreleasemouse},\helpref{wxMouseCaptureLostEvent}{wxmousecapturelostevent}\helpref{wxMouseCaptureChangedEvent}{wxmousecapturechangedevent}\membersection{wxWindow::HasFlag}\label{wxwindowhasflag}\constfunc{bool}{HasFlag}{\param{int }{flag}}Returns \texttt{true} if the window has the given \arg{flag} bit set.\membersection{wxWindow::HasMultiplePages}\label{wxwindowhasmultiplepages}\constfunc{virtual bool}{HasMultiplePages}{\void}This method should be overridden to return \texttt{true} if this window hasmultiple pages. All standard class with multiple pages such as \helpref{wxNotebook}{wxnotebook}, \helpref{wxListbook}{wxlistbook} and \helpref{wxTreebook}{wxtreebook} already override it to return \texttt{true}and user-defined classes with similar behaviour should do it as well to allowthe library to handle such windows appropriately.\membersection{wxWindow::HasScrollbar}\label{wxwindowhasscrollbar}\constfunc{virtual bool}{HasScrollbar}{\param{int }{orient}}Returns {\tt true} if this window has a scroll bar for this orientation.\wxheading{Parameters}\docparam{orient}{Orientation to check, either {\tt wxHORIZONTAL} or {\tt wxVERTICAL}.}\membersection{wxWindow::HasTransparentBackground}\label{wxwindowhastransparentbackground}\constfunc{virtual bool}{HasTransparentBackground}{\void}Returns \true if this window background is transparent (as, for example, forwxStaticText) and should show the parent window background.This method is mostly used internally by the library itself and you normallyshouldn't have to call it. You may, however, have to override it in yourwxWindow-derived class to ensure that background is painted correctly.\membersection{wxWindow::Hide}\label{wxwindowhide}\func{bool}{Hide}{\void}Equivalent to calling \helpref{Show}{wxwindowshow}({\tt false}).\membersection{wxWindow::InheritAttributes}\label{wxwindowinheritattributes}\func{void}{InheritAttributes}{\void}This function is (or should be, in case of custom controls) called duringwindow creation to intelligently set up the window visual attributes, that isthe font and the foreground and background colours.By ``intelligently'' the following is meant: by default, all windows use theirown \helpref{default}{wxwindowgetclassdefaultattributes} attributes. Howeverif some of the parents attributes are explicitly (that is, using\helpref{SetFont}{wxwindowsetfont} and not\helpref{SetOwnFont}{wxwindowsetownfont}) changed \emph{and} if thecorresponding attribute hadn't been explicitly set for this window itself,then this window takes the same value as used by the parent. In addition, ifthe window overrides \helpref{ShouldInheritColours}{wxwindowshouldinheritcolours}to return \false, the colours will not be changed no matter what and only thefont might.This rather complicated logic is necessary in order to accommodate thedifferent usage scenarios. The most common one is when all default attributesare used and in this case, nothing should be inherited as in modern GUIsdifferent controls use different fonts (and colours) than their siblings sothey can't inherit the same value from the parent. However it was also deemeddesirable to allow to simply change the attributes of all children at once byjust changing the font or colour of their common parent, hence in this case wedo inherit the parents attributes.\membersection{wxWindow::InitDialog}\label{wxwindowinitdialog}\func{void}{InitDialog}{\void}Sends an {\tt wxEVT\_INIT\_DIALOG} event, whose handler usually transfers datato the dialog via validators.\membersection{wxWindow::InvalidateBestSize}\label{wxwindowinvalidatebestsize}\func{void}{InvalidateBestSize}{\void}Resets the cached best size value so it will be recalculated the next time it is needed.\membersection{wxWindow::IsDoubleBuffered}\label{wxwindowisdoublebuffered}\constfunc{virtual bool}{IsDoubleBuffered}{\void}Returns \true if the window contents is double-buffered by the system, i.e. ifany drawing done on the window is really done on a temporary backing surfaceand transferred to the screen all at once later.\wxheading{See also}\helpref{wxBufferedDC}{wxbuffereddc}\membersection{wxWindow::IsEnabled}\label{wxwindowisenabled}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -