public class ColorButton extends Button
RGBA colour.
This is a Button that presents a little rectangle filled with the currently selected RGBA colour. When pressed, it opens a ColorSelectionDialog where the user can select a colour.
You will usually want to connect to the ColorButton.ColorSet
signal, that is emitted each time the user changes the colour. You can get
the currently selected colour with the getRGBA() method.
| Modifier and Type | Class and Description |
|---|---|
static interface |
ColorButton.ColorSet
Signal emitted when the user selects a different RGBA colour.
|
Button.ClickedWidget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.Destroy, Widget.Draw, Widget.EnterNotifyEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.QueryTooltip, Widget.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent| Constructor and Description |
|---|
ColorButton()
Create a new ColorButton.
|
ColorButton(RGBA color)
Create a new ColorButton with the specified Color selected.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect(ColorButton.ColorSet handler)
Hook up a handler for
ColorButton.ColorSet signal. |
RGBA |
getRGBA()
Get the colour currently selected.
|
void |
setRGBA(RGBA color)
Set the selected colour.
|
connect, emitClicked, getAlignmentX, getAlignmentY, getImage, getLabel, getRelatedAction, getRelief, setAlignment, setFocusOnClick, setImage, setLabel, setRelatedAction, setReliefadd, getChildren, remove, setBorderWidthactivate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, destroy, getAllocatedHeight, getAllocatedWidth, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getPreferredHeightForWidthMinimum, getPreferredHeightForWidthNatural, getPreferredHeightMinimum, getPreferredHeightNatural, getPreferredWidthForHeightMinimum, getPreferredWidthForHeightNatural, getPreferredWidthMinimum, getPreferredWidthNatural, getRequestMode, getRequisition, getSensitive, getStyleContext, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, overrideBackground, overrideColor, overrideFont, queueDraw, queueDrawArea, realize, setAlignHorizontal, setAlignVertical, setCanDefault, setCanFocus, setEvents, setExpandHorizontal, setExpandVertical, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAllpublic ColorButton()
public ColorButton(RGBA color)
public void connect(ColorButton.ColorSet handler)
ColorButton.ColorSet signal.public RGBA getRGBA()
public void setRGBA(RGBA color)