X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7a9763046b9f7b99399d5538d204b3d8c03bbc2e..1e9693318372b3321c400fc7a1746bbcd696eceb:/docs/latex/wx/toolbar.tex?ds=inline

diff --git a/docs/latex/wx/toolbar.tex b/docs/latex/wx/toolbar.tex
index 98c905f386..9179ae5086 100644
--- a/docs/latex/wx/toolbar.tex
+++ b/docs/latex/wx/toolbar.tex
@@ -104,6 +104,24 @@ Pass the id of the tool.}
 for a range of ids. Pass the ids of the tools.}
 \twocolitem{{\bf EVT\_TOOL\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_ENTER event.
 Pass the id of the toolbar itself. The value of wxCommandEvent::GetSelection is the tool id, or -1 if the mouse cursor has moved off a tool.}
+\twocolitem{{\bf EVT\_TOOL\_DROPDOWN(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_DROPDOWN\_CLICKED event. If unhandled, displays the default dropdown menu set using \helpref{wxToolBar::SetDropdownMenu}{wxtoolbarsetdropdownmenu}.}
+\end{twocollist}
+
+\wxheading{wxItemKind}
+
+There are several different types of tools you can add to a toolbar. These
+types are controlled by the wxItemKind enumeration which has the following
+values:
+\twocolwidtha{5cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf wxITEM\_NORMAL}}{Normal tool button}
+\twocolitem{{\bf wxITEM\_CHECK}}{Check (or toggle) tool button.}
+\twocolitem{{\bf wxITEM\_NORMAL}}{Radio tool button. See \helpref{wxToolBar::AddRadioTool}{wxtoolbaraddradiotool} for details}
+\twocolitem{{\bf wxITEM\_DROPDOWN}}{Normal tool button with a dropdown arrow
+next to it. Clicking the dropdown arrow sends a wxEVT\_COMMAND\_TOOL\_DROPDOWN\_CLICKED
+event and may also display the menu previously associated with the item with 
+\helpref{wxToolBar::SetDropdownMenu}{wxtoolbarsetdropdownmenu}. Currently this
+type of tools is supported under MSW and GTK.}
 \end{twocollist}
 
 \wxheading{See also}
@@ -165,12 +183,20 @@ Toolbar destructor.
 
 \membersection{wxToolBar::AddControl}\label{wxtoolbaraddcontrol}
 
-\func{bool}{AddControl}{\param{wxControl*}{ control}}
+\func{bool}{AddControl}{\param{wxControl*}{ control}, \param{const wxString&}{ label = ""}}
 
 Adds any control to the toolbar, typically e.g. a combobox.
 
 \docparam{control}{The control to be added.}
 
+\docparam{label}{Text to be displayed near the control.}
+
+\wxheading{Remarks}
+
+wxMSW: the label is only displayed if there is enough space available below the embedded control.
+
+wxMac: labels are only displayed if wxWidgets is built with wxMAC\_USE\_NATIVE\_TOOLBAR set to 1
+
 
 \membersection{wxToolBar::AddSeparator}\label{wxtoolbaraddseparator}
 
@@ -290,6 +316,11 @@ others are not.
 
 \helpref{wxToolBar::AddTool}{wxtoolbaraddtool}
 
+\membersection{wxToolBar::ClearTools}\label{wxtoolbarcleartools}
+
+\func{void}{ClearTools}{\void}
+
+Deletes all the tools in the toolbar.
 
 \membersection{wxToolBar::DeleteTool}\label{wxtoolbardeletetool}
 
@@ -360,7 +391,7 @@ Returns a pointer to the control identified by \arg{id} or
 
 \membersection{wxToolBar::FindToolForPosition}\label{wxtoolbarfindtoolforposition}
 
-\constfunc{wxToolBarToolBase*}{FindToolForPosition}{\param{const float}{ x}, \param{const float}{ y}}
+\constfunc{wxToolBarToolBase*}{FindToolForPosition}{\param{wxCoord }{x}, \param{wxCoord }{y}}
 
 Finds a tool for the given mouse position.
 
@@ -379,6 +410,13 @@ A pointer to a tool if a tool is found, or \NULL otherwise.
 Currently not implemented in wxGTK (always returns \NULL there).
 
 
+\membersection{wxToolBar::GetToolsCount}\label{wxtoolbargettoolscount}
+
+\constfunc{int}{GetToolsCount}{\void}
+
+Returns the number of tools in the toolbar.
+
+
 \membersection{wxToolBar::GetToolSize}\label{wxtoolbargettoolsize}
 
 \func{wxSize}{GetToolSize}{\void}
@@ -718,6 +756,17 @@ default (zero-size) margins are to be overridden.
 \helpref{wxToolBar::GetMargins}{wxtoolbargetmargins}, \helpref{wxSize}{wxsize}
 
 
+\membersection{wxToolBar::SetDropdownMenu}\label{wxtoolbarsetdropdownmenu}
+
+\func{bool}{SetDropdownMenu}{\param{int }{id}, \param{wxMenu* }{menu}}
+
+Sets the dropdown menu for the tool given by its \arg{id}. The tool itself will
+delete the menu when it's no longer needed.
+
+If you define a EVT\_TOOL\_DROPDOWN handler in your program, you must call 
+\helpref{wxEvent::Skip()}{wxeventskip} from it or the menu won't be displayed.
+
+
 \membersection{wxToolBar::SetToolBitmapSize}\label{wxtoolbarsettoolbitmapsize}
 
 \func{void}{SetToolBitmapSize}{\param{const wxSize\&}{ size}}
@@ -749,6 +798,17 @@ and not the eventual size of the tool button.
 Sets the client data associated with the tool.
 
 
+\membersection{wxToolBar::SetToolDisabledBitmap}\label{wxtoolbarsettooldisabledbitmap}
+
+\func{void}{SetToolDisabledBitmap}{\param{int }{id}, \param{const wxBitmap\& }{bitmap}}
+
+Sets the bitmap to be used by the tool with the given ID when the tool
+is in a disabled state.  This can only be used on Button tools, not
+controls.  NOTE: The native toolbar classes on the main platforms all
+synthesize the disabled bitmap from the normal bitmap, so this
+function will have no effect on those platforms.
+
+
 \membersection{wxToolBar::SetToolLongHelp}\label{wxtoolbarsettoollonghelp}
 
 \func{void}{SetToolLongHelp}{\param{int }{toolId}, \param{const wxString\& }{helpString}}
@@ -812,6 +872,15 @@ An application might use short help for identifying the tool purpose in a toolti
 \helpref{wxToolBar::GetToolShortHelp}{wxtoolbargettoolshorthelp}, \helpref{wxToolBar::SetToolLongHelp}{wxtoolbarsettoollonghelp}
 
 
+\membersection{wxToolBar::SetToolNormalBitmap}\label{wxtoolbarsettoolnormalbitmap}
+
+\func{void}{SetToolNormalBitmap}{\param{int }{id}, \param{const wxBitmap\& }{bitmap}}
+
+Sets the bitmap to be used by the tool with the given ID.  This can
+only be used on Button tools, not controls.
+
+
+
 \membersection{wxToolBar::SetToolSeparation}\label{wxtoolbarsettoolseparation}
 
 \func{void}{SetToolSeparation}{\param{int}{ separation}}
