X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5ef2e6333e6355ac6c925b07909408a631c5ee26..820b49cdbf6fa6e6aac6bbb66e84ea9f5f5f745d:/docs/latex/wx/toolbar.tex?ds=sidebyside diff --git a/docs/latex/wx/toolbar.tex b/docs/latex/wx/toolbar.tex index 39465088d1..d5c0824faa 100644 --- a/docs/latex/wx/toolbar.tex +++ b/docs/latex/wx/toolbar.tex @@ -168,12 +168,16 @@ Adds a separator for spacing groups of tools. \membersection{wxToolBar::AddTool}\label{wxtoolbaraddtool} +\func{wxToolBarTool*}{AddTool}{\param{int}{ toolId}, \param{const wxBitmap\&}{ bitmap1},\rtfsp +\param{const wxString\& }{shortHelpString = ""}, \param{const wxString\& }{longHelpString = ""}} + \func{wxToolBarTool*}{AddTool}{\param{int}{ toolId}, \param{const wxBitmap\&}{ bitmap1},\rtfsp \param{const wxBitmap\&}{ bitmap2 = wxNullBitmap}, \param{bool}{ isToggle = FALSE},\rtfsp \param{long}{ xPos = -1}, \param{long}{ yPos = -1},\rtfsp \param{wxObject* }{clientData = NULL}, \param{const wxString\& }{shortHelpString = ""}, \param{const wxString\& }{longHelpString = ""}} -Adds a tool to the toolbar. +Adds a tool to the toolbar. The first (short and most commonly used) version +adds a normal (and not a togglable) button without any associated client data. \wxheading{Parameters} @@ -251,6 +255,9 @@ Enables or disables the tool. \docparam{enable}{If TRUE, enables the tool, otherwise disables it.} +{\bf NB:} This function should only be called after +\helpref{Realize}{wxtoolbarrealize}. + \wxheading{Remarks} For wxToolBarSimple, does nothing. Some other implementations @@ -392,8 +399,6 @@ Returns the default separator size. Returns the short help for the given tool. -Returns the long help for the given tool. - \wxheading{Parameters} \docparam{toolId}{The tool in question.} @@ -450,7 +455,7 @@ You must call \helpref{Realize}{wxtoolbarrealize} for the change to take place. \membersection{wxToolBar::InsertTool}\label{wxtoolbarinserttool} \func{wxToolBarTool *}{InsertTool}{\param{size\_t }{pos},\rtfsp -{\param{int}{ toolId}, \param{const wxBitmap\&}{ bitmap1},\rtfsp +\param{int}{ toolId}, \param{const wxBitmap\&}{ bitmap1},\rtfsp \param{const wxBitmap\&}{ bitmap2 = wxNullBitmap}, \param{bool}{ isToggle = FALSE},\rtfsp \param{wxObject* }{clientData = NULL}, \param{const wxString\& }{shortHelpString = ""}, \param{const wxString\& }{longHelpString = ""}} @@ -544,10 +549,7 @@ A typical use of this member might be to pop up a menu. \func{bool}{Realize}{\void} -This function should be called after you have added tools. It -calls, according to the implementation, -either \helpref{wxToolBar::CreateTools}{wxtoolbarcreatetools} or - \helpref{wxToolBar::Layout}{wxtoolbarlayout}. +This function should be called after you have added tools. If you are using absolute positions for your tools when using a wxToolBarSimple object, do not call this function. You must call it at all other times. @@ -566,6 +568,31 @@ change to take place, it will happen immediately. \helpref{DeleteTool}{wxtoolbardeletetool} +\membersection{wxToolBar::SetMargins}\label{wxtoolbarsetmargins} + +\func{void}{SetMargins}{\param{const wxSize\&}{ size}} + +\func{void}{SetMargins}{\param{int}{ x}, \param{int}{ y}} + +Set the values to be used as margins for the toolbar. + +\wxheading{Parameters} + +\docparam{size}{Margin size.} + +\docparam{x}{Left margin, right margin and inter-tool separation value.} + +\docparam{y}{Top margin, bottom margin and inter-tool separation value.} + +\wxheading{Remarks} + +This must be called before the tools are added if absolute positioning is to be used, and the +default (zero-size) margins are to be overridden. + +\wxheading{See also} + +\helpref{wxToolBar::GetMargins}{wxtoolbargetmargins}, \helpref{wxSize}{wxsize} + \membersection{wxToolBar::SetToolBitmapSize}\label{wxtoolbarsettoolbitmapsize} \func{void}{SetToolBitmapSize}{\param{const wxSize\&}{ size}} @@ -589,30 +616,11 @@ and not the eventual size of the tool button. \helpref{wxToolBar::GetToolBitmapSize}{wxtoolbargettoolbitmapsize},\rtfsp \helpref{wxToolBar::GetToolSize}{wxtoolbargettoolsize} -\membersection{wxToolBar::SetMargins}\label{wxtoolbarsetmargins} - -\func{void}{SetMargins}{\param{const wxSize\&}{ size}} - -\func{void}{SetMargins}{\param{int}{ x}, \param{int}{ y}} - -Set the values to be used as margins for the toolbar. - -\wxheading{Parameters} - -\docparam{size}{Margin size.} - -\docparam{x}{Left margin, right margin and inter-tool separation value.} +\membersection{wxToolBar::SetToolClientData}\label{wxtoolbarsettoolclientdata} -\docparam{y}{Top margin, bottom margin and inter-tool separation value.} - -\wxheading{Remarks} +\func{void}{GetToolClientData}{\param{wxObject* }{clientData}} -This must be called before the tools are added if absolute positioning is to be used, and the -default (zero-size) margins are to be overridden. - -\wxheading{See also} - -\helpref{wxToolBar::GetMargins}{wxtoolbargetmargins}, \helpref{wxSize}{wxsize} +Sets the client data associated with the tool. \membersection{wxToolBar::SetToolLongHelp}\label{wxtoolbarsettoollonghelp}