wxColourPickerCtrl(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

🎨 wxColourPickerCtrl(3) β€” Erlang Module Definition 🎨

hey bestie, welcome to the wxColourPickerCtrl(3) manual page! it's giving "let me pick a colour for you" energy and honestly? obsessed. πŸ’…


πŸ’– NAME πŸ’–

wxColourPickerCtrl β€” this control allows the user to select a colour. periodt.


🌸 DESCRIPTION 🌸

so like, the generic implementation is a button which brings up a wxColourDialog when clicked. native implementation may differ but this is usually a (small) widget which give access to the colour-chooser dialog. it is only available if wxUSE_COLOURPICKERCTRL is set to 1 (the default, no cap). πŸ¦‹

πŸŽ€ Styles πŸŽ€

this class supports the following styles:

  • wxCLRP_DEFAULT_STYLE β€” the default style: 0. iconic.
  • wxCLRP_USE_TEXTCTRL β€” creates a text control to the left of the picker button which is completely managed by the wxColourPickerCtrl and which can be used by the user to specify a colour (see SetColour). the text control is automatically synchronized with button's value. use functions defined in wxPickerBase to modify the text control. slay.
  • wxCLRP_SHOW_LABEL β€” shows the colour in HTML form (AABBCC) as colour button label (instead of no label at all). cute.
  • wxCLRP_SHOW_ALPHA β€” allows selecting opacity in the colour-chooser (effective under wxGTK and wxOSX). transparency queen.

see:

  • wxColourDialog
  • wxColourPickerEvent

this class is derived, and can use functions, from:

  • wxPickerBase
  • wxControl
  • wxWindow
  • wxEvtHandler

wxWidgets docs: wxColourPickerCtrl

πŸ¦‹ Events πŸ¦‹

event types emitted from this class:

  • command_colourpicker_changed

🌈 DATA TYPES 🌈

wxColourPickerCtrl() :: wx:wx_object().

πŸ‘‘ FUNCTIONS πŸ‘‘

create/4

       create(This, Parent, Id, [Option]) -> boolean()
                       when
                           This :: wxColourPickerCtrl(),
                           Parent :: wxWindow:wxWindow(),
                           Id :: integer(),
                           Option ::
                               {col, wx:wx_colour()} |
                               {pos, {X :: integer(), Y :: integer()}} |
                               {size, {W :: integer(), H :: integer()}} |
                               {style, integer()} |
                               {validator, wx:wx_object()}.

creates a colour picker with the given arguments.

return: true if the control was successfully created or false if creation failed.

destroy/1

       destroy(This :: wxColourPickerCtrl()) -> ok.

destroys the object. bye bestie. πŸ’€

getColour/1

       getColour(This) -> wx:wx_colour4()
                          when This :: wxColourPickerCtrl().

returns the currently selected colour. get that colour, girl. πŸ’…

new/0

       new() -> wxColourPickerCtrl().

new/3

       new(Parent, Id, [Option]) -> wxColourPickerCtrl()
                    when
                        Parent :: wxWindow:wxWindow(),
                        Id :: integer(),
                        Option ::
                            {col, wx:wx_colour()} |
                            {pos, {X :: integer(), Y :: integer()}} |
                            {size, {W :: integer(), H :: integer()}} |
                            {style, integer()} |
                            {validator, wx:wx_object()}.

initializes the object and calls create/4 with all the parameters.

setColour/2

       setColour(This, Colname) -> ok
                          when
                              This :: wxColourPickerCtrl(),
                              Colname :: unicode:chardata();
                      (This, Col) -> ok
                          when
                              This :: wxColourPickerCtrl(),
                              Col :: wx:wx_colour().

sets the currently selected colour.

see wxColour::Set() (not implemented in wx).


⚠️ that's literally the whole page, bestie. don't skip a single detail, iykyk.

and that's the vibe! this page was brought to you by Ericsson AB, version wx 2.6, for the wxColourPickerCtrl(3) manual. now go pick a colour and slay! πŸ’–βœ¨πŸŒˆ

πŸ“¦ where this page comes from