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

📄 clrpicker.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Name:        clrpicker.tex%% Purpose:     wxColourPickerCtrl and wxColourPickerEvent documentation%% Author:      Francesco Montorsi%% Created:     2006-04-17%% RCS-ID:      $Id: clrpicker.tex,v 1.5 2006/11/26 18:48:35 RR Exp $%% Copyright:   (c) 2006 Francesco Montorsi%% License:     wxWindows license%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\section{\class{wxColourPickerCtrl}}\label{wxcolourpickerctrl}This control allows the user to select a colour. The generic implementation isa button which brings up a \helpref{wxColourDialog}{wxcolourdialog} when clicked. Native implementationmay differ but this is usually a (small) widget which give access to the colour-chooserdialog.It is only available if \texttt{wxUSE\_COLOURPICKERCTRL} is set to $1$ (the default).\wxheading{Derived from}\helpref{wxPickerBase}{wxpickerbase}\\\helpref{wxControl}{wxcontrol}\\\helpref{wxWindow}{wxwindow}\\\helpref{wxEvtHandler}{wxevthandler}\\\helpref{wxObject}{wxobject}\wxheading{Include files}<wx/clrpicker.h>\wxheading{Window styles}\twocolwidtha{5cm}%\begin{twocollist}\itemsep=0pt\twocolitem{\windowstyle{wxCLRP\_DEFAULT\_STYLE}}{The default style: 0.}\twocolitem{\windowstyle{wxCLRP\_USE\_TEXTCTRL}}{Creates a text control to the left of thepicker button which is completely managed by the \helpref{wxColourPickerCtrl}{wxcolourpickerctrl}and which can be used by the user to specify a colour (see \helpref{SetColour}{wxcolourpickerctrlsetcolour}).The text control is automatically synchronized with button's value. Use functions defined in \helpref{wxPickerBase}{wxpickerbase} to modify the text control.}\twocolitem{\windowstyle{wxCLRP\_SHOW\_LABEL}}{Shows the colour in HTML form (#AABBCC) as colour button label(instead of no label at all).}\end{twocollist}\wxheading{Event handling}To process a colour picker event, use these event handler macros to direct input to memberfunctions that take a \helpref{wxColourPickerEvent}{wxcolourpickerevent} argument.\twocolwidtha{7cm}%\begin{twocollist}\itemsep=0pt\twocolitem{{\bf EVT\_COLOURPICKER\_CHANGED(id, func)}}{The user changed thecolour selected in the control either using the button or using text control(see wxCLRP\_USE\_TEXTCTRL; note that in this case the event is fired only ifthe user's input is valid, i.e. recognizable). }\end{twocollist}\wxheading{See also}\helpref{wxColourDialog}{wxcolourdialog},\\\helpref{wxColourPickerEvent}{wxcolourpickerevent}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxColourPickerCtrl::wxColourPickerCtrl}\label{wxcolourpickerctrl}\func{}{wxColourPickerCtrl}{\param{wxWindow *}{parent},\rtfsp\param{wxWindowID}{ id},\rtfsp\param{const wxColour\& }{colour = *wxBLACK},\rtfsp\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp\param{const wxSize\& }{size = wxDefaultSize},\rtfsp\param{long}{ style = wxCLRP\_DEFAULT\_STYLE},\rtfsp\param{const wxValidator\& }{validator = wxDefaultValidator},\param{const wxString\& }{name = ``colourpickerctrl"}}Initializes the object and calls \helpref{Create}{wxcolourpickerctrlcreate} withall the parameters.\membersection{wxColourPickerCtrl::Create}\label{wxcolourpickerctrlcreate}\func{bool}{Create}{\param{wxWindow *}{parent},\rtfsp\param{wxWindowID}{ id},\rtfsp\param{const wxColour\& }{colour = *wxBLACK},\rtfsp\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp\param{const wxSize\& }{size = wxDefaultSize},\rtfsp\param{long}{ style = wxCLRP\_DEFAULT\_STYLE},\rtfsp\param{const wxValidator\& }{validator = wxDefaultValidator},\param{const wxString\& }{name = ``colourpickerctrl"}}\wxheading{Parameters}\docparam{parent}{Parent window, must not be non-\texttt{NULL}.}\docparam{id}{The identifier for the control.}\docparam{colour}{The initial colour shown in the control.}\docparam{pos}{Initial position.}\docparam{size}{Initial size.}\docparam{style}{The window style, see {\tt wxCRLP\_*} flags.}\docparam{validator}{Validator which can be used for additional date checks.}\docparam{name}{Control name.}\wxheading{Return value}\true if the control was successfully created or \false if creation failed.\membersection{wxColourPickerCtrl::GetColour}\label{wxcolourpickerctrlgetcolour}\constfunc{wxColour}{GetColour}{\void}Returns the currently selected colour.\membersection{wxColourPickerCtrl::SetColour}\label{wxcolourpickerctrlsetcolour}\func{void}{SetColour}{\param{const wxColour \&}{col}}\func{void}{SetColour}{\param{const wxString \&}{colname}}Sets the currently selected colour. See \helpref{wxColour::Set}{wxcolourset}.%% wxColourPickerEvent documentation\section{\class{wxColourPickerEvent}}\label{wxcolourpickerevent}This event class is used for the events generated by\helpref{wxColourPickerCtrl}{wxcolourpickerctrl}.\wxheading{Derived from}\helpref{wxCommandEvent}{wxcommandevent}\\\helpref{wxEvent}{wxevent}\\\helpref{wxObject}{wxobject}\wxheading{Include files}<wx/clrpicker.h>\wxheading{Event handling}To process input from a wxColourPickerCtrl, use one of these event handler macros todirect input to member function that take a\helpref{wxColourPickerEvent}{wxcolourpickerevent} argument:\twocolwidtha{7cm}\begin{twocollist}\twocolitem{{\bf EVT\_COLOURPICKER\_CHANGED(id, func)}}{Generated whenever the selected colour changes.}\end{twocollist}%\wxheading{See also}\helpref{wxColourPickerCtrl}{wxcolourpickerctrl}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxColourPickerEvent::wxColourPickerEvent}\label{wxcolourpickereventctor}\func{}{wxColourPickerEvent}{\param{wxObject *}{ generator}, \param{int}{ id}, \param{const wxColour\&}{ colour}}The constructor is not normally used by the user code.\membersection{wxColourPickerEvent::GetColour}\label{wxcolourpickereventgetcolour}\constfunc{wxColour}{GetColour}{\void}Retrieve the colour the user has just selected.\membersection{wxColourPickerEvent::SetColour}\label{wxcolourpickereventsetcolour}\func{void}{SetColour}{\param{const wxColour \&}{pos}}Set the colour associated with the event.

⌨️ 快捷键说明

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