55 typedef std::array<optional_color, 24> custom_color_list;
57 typedef std::variant<std::monostate, color, hsv_color> representations;
58 typedef std::optional<custom_color_list::iterator> optional_custom_color_list_iterator;
63 color_box(
color_dialog& aOwner,
const optional_color& aColor,
const optional_custom_color_list_iterator& aCustomColor = optional_custom_color_list_iterator());
74 optional_custom_color_list_iterator iCustomColor;
89 cursor_widget(x_picker& aParent, type_e aType);
92 void mouse_button_released(
mouse_button aButton,
const point& aPosition)
override;
101 scalar cursor_width()
const;
106 void moved()
override;
107 void resized()
override;
112 void mouse_button_released(
mouse_button aButton,
const point& aPosition)
override;
119 void select(
const point& aPosition);
120 representations color_at_position(
const point& aCursorPos)
const;
121 void update_cursors();
122 point current_cursor_position()
const;
127 cursor_widget iLeftCursor;
128 cursor_widget iRightCursor;
133 static scalar constexpr CURSOR_RADIUS = 4.0;
134 static scalar constexpr CURSOR_THICKNESS = 1.5;
138 void set_image(
image&& aImage);
142 void mouse_button_released(
mouse_button aButton,
const point& aPosition)
override;
147 void select(
const point& aPosition);
148 representations color_at_position(
const point& aCursorPos)
const;
149 point current_cursor_position()
const;
150 void update_texture();
155 std::optional<image> iImage;
156 mutable std::array<std::array<avec4u8, 256>, 256> iPixels;
191 static custom_color_list& previous_custom_colors();
192 scalar color_space_coefficient()
const;
194 mode_e current_mode()
const;
195 channel_e current_channel()
const;
196 void set_current_channel(channel_e aChannel);
198 vec4 selected_color_in_color_space()
const;
200 void select_color_in_color_space(
const vec4& aColor,
const i_widget& aUpdatingWidget);
201 custom_color_list::iterator current_custom_color()
const;
202 void set_current_custom_color(custom_color_list::iterator aCustomColor);
203 void update_widgets(
const i_widget& aUpdatingWidget);
206 channel_e iCurrentChannel;
208 mutable representations iSelectedColor;
209 custom_color_list iCustomColors;
210 custom_color_list::iterator iCurrentCustomColor;
211 bool iUpdatingWidgets;
212 bool iScreenPickerActive;
219 color_selection iColorSelection;
233 std::optional<color_space> iColorSpace;
234 drop_list iColorSpaceSelector;
235 std::pair<radio_button, double_spin_box> iH;
236 std::pair<radio_button, double_spin_box> iS;
237 std::pair<radio_button, double_spin_box> iV;
238 std::pair<radio_button, double_spin_box> iR;
239 std::pair<radio_button, double_spin_box> iG;
240 std::pair<radio_button, double_spin_box> iB;
241 std::pair<radio_button, double_spin_box> iA;