Modified form of Patch #1611222, adds wxSearchCtrl (generic & native carbon HISearchField)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -348,6 +348,7 @@
|
||||
\input setcursorevt.tex
|
||||
\input ipcservr.tex
|
||||
\input hprovsmp.tex
|
||||
\input srchctrl.tex
|
||||
\input sngchdlg.tex
|
||||
\input snglinst.tex
|
||||
\input size.tex
|
||||
|
156
docs/latex/wx/srchctrl.tex
Normal file
156
docs/latex/wx/srchctrl.tex
Normal file
@@ -0,0 +1,156 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%% wxSearchCtrl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\section{\class{wxSearchCtrl}}\label{wxsearchctrl}
|
||||
|
||||
A search control is a composite control with a search button, a text
|
||||
control, and a cancel button.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxTextCtrl}{wxsearchctrl}\\
|
||||
streambuf\\
|
||||
\helpref{wxControl}{wxcontrol}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/srchctrl.h>
|
||||
|
||||
\wxheading{Window styles}
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\windowstyle{wxTE\_PROCESS\_ENTER}}{The control will generate
|
||||
the event wxEVT\_COMMAND\_TEXT\_ENTER (otherwise pressing Enter key
|
||||
is either processed internally by the control or used for navigation between
|
||||
dialog controls).}
|
||||
\twocolitem{\windowstyle{wxTE\_PROCESS\_TAB}}{The control will receive
|
||||
wxEVT\_CHAR events for TAB pressed - normally, TAB is used for passing to the
|
||||
next control in a dialog instead. For the control created with this style,
|
||||
you can still use Ctrl-Enter to pass to the next control from the keyboard.}
|
||||
\twocolitem{\windowstyle{wxTE\_NOHIDESEL}}{By default, the Windows text control
|
||||
doesn't show the selection when it doesn't have focus - use this style to force
|
||||
it to always show it. It doesn't do anything under other platforms.}
|
||||
\twocolitem{\windowstyle{wxTE\_LEFT}}{The text in the control will be left-justified (default).}
|
||||
\twocolitem{\windowstyle{wxTE\_CENTRE}}{The text in the control will be centered (currently wxMSW and wxGTK2 only).}
|
||||
\twocolitem{\windowstyle{wxTE\_RIGHT}}{The text in the control will be right-justified (currently wxMSW and wxGTK2 only).}
|
||||
\twocolitem{\windowstyle{wxTE\_CAPITALIZE}}{On PocketPC and Smartphone, causes the first letter to be capitalized.}
|
||||
\end{twocollist}
|
||||
|
||||
See also \helpref{window styles overview}{windowstyles} and \helpref{wxSearchCtrl::wxSearchCtrl}{wxsearchctrlctor}.
|
||||
|
||||
\wxheading{Event handling}
|
||||
|
||||
To process input from a search control, use these event handler macros to direct input to member
|
||||
functions that take a \helpref{wxCommandEvent}{wxcommandevent} argument.
|
||||
|
||||
\twocolwidtha{9cm}%
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf EVT\_SEARCHCTRL\_SEARCH(id, func)}}{Respond to a wxEVT\_SEARCHCTRL\_SEARCH event,
|
||||
generated when the search button is clicked.}
|
||||
\twocolitem{{\bf EVT\_SEARCHCTRL\_CANCEL(id, func)}}{Respond to a wxEVT\_SEARCHCTRL\_CANCEL event,
|
||||
generated when the cancel button is clicked.}
|
||||
\end{twocollist}%
|
||||
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSearchCtrl::wxSearchCtrl}\label{wxsearchctrlctor}
|
||||
|
||||
\func{}{wxSearchCtrl}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxSearchCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
|
||||
\param{const wxString\& }{value = ``"}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
|
||||
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = wxSearchCtrlNameStr}}
|
||||
|
||||
Constructor, creating and showing a text control.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{parent}{Parent window. Should not be NULL.}
|
||||
|
||||
\docparam{id}{Control identifier. A value of -1 denotes a default value.}
|
||||
|
||||
\docparam{value}{Default text value.}
|
||||
|
||||
\docparam{pos}{Text control position.}
|
||||
|
||||
\docparam{size}{Text control size.}
|
||||
|
||||
\docparam{style}{Window style. See \helpref{wxSearchCtrl}{wxsearchctrl}.}
|
||||
|
||||
\docparam{validator}{Window validator.}
|
||||
|
||||
\docparam{name}{Window name.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxTextCtrl::Create}{wxtextctrlcreate}, \helpref{wxValidator}{wxvalidator}
|
||||
|
||||
|
||||
\membersection{wxSearchCtrl::\destruct{wxSearchCtrl}}\label{wxsearchctrldtor}
|
||||
|
||||
\func{}{\destruct{wxSearchCtrl}}{\void}
|
||||
|
||||
Destructor, destroying the search control.
|
||||
|
||||
|
||||
\membersection{wxSearchCtrl::SetMenu}\label{wxsearchctrlsetmenu}
|
||||
|
||||
\func{virtual void}{SetMenu}{\param{wxMenu* }{ menu}}
|
||||
|
||||
Sets the search control's menu object. If there is already a menu associated with
|
||||
the search control it is deleted.
|
||||
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{menu}{Menu to attach to the search control.}
|
||||
|
||||
\membersection{wxSearchCtrl::GetMenu}\label{wxsearchctrlgetmenu}
|
||||
|
||||
\func{virtual wxMenu*}{GetMenu}{\void}
|
||||
|
||||
Returns a pointer to the search control's menu object or NULL if there is no
|
||||
menu attached.
|
||||
|
||||
|
||||
\membersection{wxSearchCtrl::SetSearchButtonVisible}\label{wxsearchctrlsetsearchbuttonvisible}
|
||||
|
||||
\func{virtual void}{SetSearchButtonVisible}{\param{bool }{ show}}
|
||||
|
||||
Sets the search button visibility value on the search control.
|
||||
If there is a menu attached, the search button will be visible regardless of the search
|
||||
button visibility value.
|
||||
|
||||
This has no effect in Mac OS X v10.3
|
||||
|
||||
|
||||
\membersection{wxSearchCtrl::GetSearchButtonVisible}\label{wxsearchctrlgetsearchbuttonvisible}
|
||||
|
||||
\func{virtual bool}{GetSearchButtonVisible}{\void}
|
||||
|
||||
Returns the search button visibility value.
|
||||
If there is a menu attached, the search button will be visible regardless of the search
|
||||
button visibility value.
|
||||
|
||||
This always returns false in Mac OS X v10.3
|
||||
|
||||
|
||||
\membersection{wxSearchCtrl::SetCancelButtonVisible}\label{wxsearchctrlsetcancelbuttonvisible}
|
||||
|
||||
\func{virtual void}{SetCancelButtonVisible}{\param{bool }{ show}}
|
||||
|
||||
Shows or hides the cancel button.
|
||||
|
||||
|
||||
\membersection{wxSearchCtrl::GetCancelButtonVisible}\label{wxsearchctrlgetcancelbuttonvisible}
|
||||
|
||||
\func{virtual bool}{GetCancelButtonVisible}{\void}
|
||||
|
||||
Indicates whether the cancel button is visible.
|
Reference in New Issue
Block a user