A widget selecting a color with one slider per component & a preview of the result.
|
| | ColorPicker (const float4 &color={0.0f, 0.0f, 0.0f, 1.0f}) |
| |
| const auto & | getColor () const |
| |
| void | setColor (const float4 &color) |
| |
| auto | getMode () const |
| |
| void | setMode (Mode mode) |
| |
| void | setModeLabels (const std::array< std::string, MODES > &labels) |
| |
| auto | getTabBar () const |
| |
| void | setTabHeight (float height) |
| |
| auto | getTabHeight () const |
| |
| auto | getFooter () const |
| |
| void | setFooterHeight (float height) |
| |
| auto | getFooterHeight () const |
| |
| void | setPreviewTransform (const Transform &transform) |
| |
| void | setPreviewHeight (float height) |
| |
| auto | getPreviewHeight () const |
| |
| void | setWheelHeight (float height) |
| |
| auto | getWheelHeight () const |
| |
| void | setBrightnessWidth (float width) |
| |
| auto | getBrightnessWidth () const |
| |
| void | setRowHeight (float height) |
| |
| auto | getRowHeight () const |
| |
| void | setLabelWidth (float width) |
| |
| auto | getLabelWidth () const |
| |
| void | setValueWidth (float width) |
| |
| auto | getValueWidth () const |
| |
| float | getAutoHeight () const |
| |
| auto | getPreview () const |
| |
| auto | getWheel () const |
| |
| auto | getBrightnessSlider () const |
| |
| auto | getSlider (const Component component) const |
| |
| auto | getLabel (const Component component) const |
| |
| auto | getValue (const Component component) const |
| |
| void | setResources (const std::string &resPreview) |
| |
| | Widget (Type type=WIDGET) |
| |
| | ~Widget () override |
| |
| Type | getType () const |
| |
| bool | isVisible () const |
| |
| void | setVisible (bool show=true) |
| |
| bool | isEnabled () const |
| |
| void | setEnabled (bool isEnabled=true) |
| |
| virtual void | setPos (float x, float y) |
| |
| float | getWidth () const |
| |
| float | getHeight () const |
| |
| float | getRequestedWidth () const |
| |
| float | getRequestedHeight () const |
| |
| virtual void | setSize (float width, float height) |
| |
| void | setWidth (const float width) |
| |
| void | setHeight (const float height) |
| |
| const Rect & | getRect () const |
| |
| void | setRect (float x, float y, float width, float height) |
| |
| void | setRect (const Rect &rect) |
| |
| float | getAspectRatio () const |
| |
| Alignment | getAlignment () const |
| |
| void | setAlignment (Alignment alignment) |
| |
| std::shared_ptr< Font > | getFont () const |
| |
| void | setFont (const std::shared_ptr< Font > &font) |
| |
| float | getFontScale () const |
| |
| virtual void | setFontScale (float fontScale) |
| |
| bool | isFocused () const |
| |
| Widget * | getParent () const |
| |
| void | setOverlap (const bool overlap) |
| |
| template<typename T , typename... Args> |
| std::shared_ptr< T > | create (const std::string &resource, const Alignment alignment, Args &&...args) |
| |
| template<typename T , typename... Args> |
| std::shared_ptr< T > | create (const Alignment alignment, Args &&...args) |
| |
| template<typename T > |
| std::shared_ptr< T > | add (std::shared_ptr< T > child, const Alignment alignment=Alignment::NONE, const std::string &resource="", const bool overlap=false) |
| |
| template<typename T > |
| std::shared_ptr< T > | addPopup (std::shared_ptr< T > child, const std::string &resource="") |
| |
| template<typename T > |
| std::shared_ptr< T > | addAfter (std::shared_ptr< T > child, const std::shared_ptr< Widget > &after, const Alignment alignment, const std::string &resource="", const bool overlap=false) |
| |
| virtual void | remove (const std::shared_ptr< Widget > &child) |
| |
| virtual void | removeAll () |
| |
| void | setPadding (float padding) |
| |
| float | getPadding () const |
| |
| float | getVBorder () const |
| |
| float | getHBorder () const |
| |
| void | setVBorder (float size) |
| |
| void | setHBorder (float size) |
| |
| bool | isDrawBackground () const |
| |
| void | setDrawBackground (bool drawBackground) |
| |
| bool | isPushed () const |
| |
| bool | isPointed () const |
| |
| bool | isFreezed () const |
| |
| bool | isRedrawOnMouseEvent () const |
| |
| bool | isOverlapping () const |
| |
| Rect | getChildrenRect () const |
| |
| void | setFreezed (const bool f) |
| |
| void | setPushed (const bool p) |
| |
| void | refresh () |
| |
| void | setResource (std::shared_ptr< UIResource > res) |
| |
| uint32 | getGroupIndex () const |
| |
| void | setGroupIndex (int32 index) |
| |
| template<typename T > |
| T | getUserData () const |
| |
| template<typename T > |
| std::shared_ptr< T > | getPointerUserData () const |
| |
| const std::any & | getUserData () const |
| |
| void | setUserData (const std::any &data) |
| |
| float | getTransparency () const |
| |
| void | setTransparency (float alpha) |
| |
| void | resizeChildren () |
| |
| float | getChildrenOffsetX () const |
| |
| float | getChildrenOffsetY () const |
| |
| void | setChildrenOffset (float x, float y) |
| |
| std::shared_ptr< Widget > | setFocus (bool focus=true) |
| |
| virtual void | onAttach () |
| |
| virtual void | onDetach () |
| |
| virtual void | onShow () |
| |
| virtual void | onHide () |
| |
| virtual void | onResize () |
| |
| virtual void | onMove () |
| |
| virtual bool | onKeyDown (Key key) |
| |
| virtual bool | onTextInput (const std::string &text) |
| |
| virtual bool | onKeyUp (Key key) |
| |
| virtual bool | onMouseDown (MouseButton button, float x, float y) |
| |
| virtual bool | onMouseUp (MouseButton button, float x, float y) |
| |
| virtual bool | onMouseMove (uint32 buttonsState, float x, float y) |
| |
| virtual void | onMouseLeave () |
| |
| virtual void | onDisable () |
| |
| virtual void | onEnable () |
| |
| virtual void | onGotFocus () |
| |
| virtual void | onLostFocus () |
| |
| bool | getConsumeMouseEvent () const |
| |
| void | setConsumeMouseEvent (const bool consumeMouseEvent) |
| |
| const std::list< std::shared_ptr< Widget > > & | getChildren () const |
| |
| bool | hasChildren () const |
| |
| void | subscribe (const event_type &type, unique_id id, EventHandlerCallback callback) |
| |
| void | subscribe (const event_type &type, EventHandlerCallback callback) |
| |
| void | unsubscribe (unique_id id) |
| |
| bool | isAttached () const |
| |
| Window & | getWindow () const |
| |
| Style & | getStyle () const |
| |
| Vector2DRenderer & | getRenderer () const |
| |
| RenderingWindow & | getRenderingWindow () const |
| |
| WindowManager & | getWindowManager () const |
| |
|
| static constexpr uint32 | COMPONENTS {4} |
| | Number of components of a color. More...
|
| |
| static constexpr uint32 | MODES {3} |
| | Number of spaces the components can be edited in. More...
|
| |
| static constexpr float | MAX_HUE {359.0f} |
| | Largest value of a hue, in degrees. More...
|
| |
| static constexpr uint32 | HUE_STOPS {6} |
| | Number of stops of the ramp of the hue, one per primary & secondary color. More...
|
| |
| static constexpr float | MAX_VALUE {255.0f} |
| | Largest value of a component : the sliders select integral values in [0, MAX_VALUE]. More...
|
| |
| static constexpr float | DEFAULT_PREVIEW_HEIGHT {32.0f} |
| | Default height of the preview of the color. More...
|
| |
| static constexpr float | DEFAULT_WHEEL_HEIGHT {150.0f} |
| | Default height of the wheel selecting the hue & the saturation. More...
|
| |
| static constexpr float | DEFAULT_BRIGHTNESS_WIDTH {16.0f} |
| | Default width of the slider selecting the brightness, in square units. More...
|
| |
| static constexpr float | DEFAULT_ROW_HEIGHT {28.0f} |
| | Default height of the row displaying the slider & the spin box of one component. More...
|
| |
| static constexpr float | DEFAULT_LABEL_WIDTH {16.0f} |
| | Default width of the name of a component, in square units. More...
|
| |
| static constexpr float | DEFAULT_VALUE_WIDTH {60.0f} |
| | Default width of the value of a component, in square units, buttons included. More...
|
| |
| static constexpr float | DEFAULT_TAB_HEIGHT {24.0f} |
| | Default height of the bar of tabs selecting the mode. More...
|
| |
| static const std::array< std::array< std::string, COMPONENTS >, MODES > | LABELS |
| | Names of the components, displayed at the left of the sliders, by mode. More...
|
| |
| static const std::array< std::string, MODES > | MODE_LABELS {"RGB", "HSV", "Linear"} |
| | Default labels of the tabs, in the order of Mode. More...
|
| |