neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
gradient_dialog.hpp
Go to the documentation of this file.
1// gradient_dialog.hpp
2/*
3 neogfx C++ App/Game Engine
4 Copyright (c) 2015, 2020 Leigh Johnston. All Rights Reserved.
5
6 This program is free software: you can redistribute it and / or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
22#include <neogfx/neogfx.hpp>
29
30namespace neogfx
31{
32 class gradient_dialog : public dialog
33 {
35 class preview_box;
36 public:
37 gradient_dialog(i_widget& aParent, const neogfx::gradient& aCurrentGradient);
39 public:
41 void set_gradient(const i_gradient& aGradient);
42 void set_gradient(const i_ref_ptr<i_gradient>& aGradient);
45 private:
46 void init();
47 void update_widgets();
48 private:
49 vertical_layout iLayout;
50 horizontal_layout iLayout2;
51 vertical_layout iLayout3;
52 vertical_layout iLayout4;
53 group_box iSelectorGroupBox;
54 gradient_widget iGradientSelector;
55 horizontal_layout iLayout3_1;
56 push_button iReverse;
57 push_button iReversePartial;
58 double_slider iHueSlider;
59 push_button iImport;
60 push_button iDelete;
61 horizontal_layout iLayout3_2;
62 group_box iDirectionGroupBox;
63 radio_button iDirectionHorizontalRadioButton;
64 radio_button iDirectionVerticalRadioButton;
65 radio_button iDirectionDiagonalRadioButton;
66 radio_button iDirectionRectangularRadioButton;
67 radio_button iDirectionRadialRadioButton;
68 group_box iTile;
69 label iTileWidthLabel;
70 uint32_spin_box iTileWidth;
71 label iTileHeightLabel;
72 uint32_spin_box iTileHeight;
73 check_box iTileAligned;
74 group_box iSmoothnessGroupBox;
75 double_spin_box iSmoothnessSpinBox;
76 double_slider iSmoothnessSlider;
77 horizontal_layout iLayout5;
78 group_box iOrientationGroupBox;
79 group_box iStartingFromGroupBox;
80 radio_button iTopLeftRadioButton;
81 radio_button iTopRightRadioButton;
82 radio_button iBottomRightRadioButton;
83 radio_button iBottomLeftRadioButton;
84 radio_button iAngleRadioButton;
85 vertical_layout iLayout6;
86 group_box iAngleGroupBox;
87 label iAngle;
88 double_spin_box iAngleSpinBox;
89 double_slider iAngleSlider;
90 group_box iSizeGroupBox;
91 radio_button iSizeClosestSideRadioButton;
92 radio_button iSizeFarthestSideRadioButton;
93 radio_button iSizeClosestCornerRadioButton;
94 radio_button iSizeFarthestCornerRadioButton;
95 group_box iShapeGroupBox;
96 radio_button iShapeEllipseRadioButton;
97 radio_button iShapeCircleRadioButton;
98 group_box iExponentGroupBox;
99 check_box iLinkedExponents;
100 label iMExponent;
101 double_spin_box iMExponentSpinBox;
102 label iNExponent;
103 double_spin_box iNExponentSpinBox;
104 group_box iCenterGroupBox;
105 label iXCenter;
106 double_spin_box iXCenterSpinBox;
107 label iYCenter;
108 double_spin_box iYCenterSpinBox;
109 horizontal_spacer iSpacer2;
110 vertical_spacer iSpacer3;
111 group_box iPreviewGroupBox;
112 std::shared_ptr<i_widget> iPreview;
113 vertical_spacer iSpacer4;
114 bool iUpdatingWidgets;
115 bool iIgnoreHueSliderChange;
116 std::vector<std::pair<std::size_t, double>> iHueSelection;
117 };
118}
gradient_widget & gradient_selector()
void set_gradient(const i_gradient &aGradient)
const gradient_widget & gradient_selector() const
neogfx::gradient gradient() const
gradient_dialog(i_widget &aParent, const neogfx::gradient &aCurrentGradient)
void set_gradient(const i_ref_ptr< i_gradient > &aGradient)
#define meta_object(...)
Definition i_object.hpp:28