Kage Studio 0.7.230612
A Simple Free and Open Source 2D Animation Software
Loading...
Searching...
No Matches
fillstroke.h
Go to the documentation of this file.
1/*
2 * Kage Studio - a simple free and open source vector-based 2D animation software
3 * Copyright (C) 2011~2023 Mj Mendoza IV
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 * MA 02110-1301, USA. Or, see <https://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef GTKMM_KAGE_PROP_FILL_STROKE_H
23 #define GTKMM_KAGE_PROP_FILL_STROKE_H
24
25 #include <gtkmm/box.h>
26 #include <gtkmm/label.h>
27 #include <gtkmm/entry.h>
28 #include <gtkmm/colorbutton.h>
29 #include <gtkmm/colorselection.h>
30 #include <gtkmm/scale.h>
31 #include "../data/color.h"
32
33 class Kage; //forward declaration
34
35 using namespace std;
36
37 class PropertyFillStroke : public Gtk::VBox {
38 public:
39 PropertyFillStroke(Kage* p_kage);
40 virtual ~PropertyFillStroke();
41
42 protected:
44 //Fill Property items
45 Gtk::HBox m_PropFill;
46 Gtk::VBox m_PropFillV1;
47 Gtk::VBox m_PropFillV2;
48
49 Gtk::Button m_ButtonFill;
50 Gtk::ColorButton m_ColorButtonFill;
51 Gtk::Label m_LabelFillR;
52 Gtk::Label m_LabelFillG;
53 Gtk::Label m_LabelFillB;
54 Gtk::Label m_LabelFillAlpha;
55 Glib::RefPtr<Gtk::Adjustment> _adjustFillR;
56 Glib::RefPtr<Gtk::Adjustment> _adjustFillG;
57 Glib::RefPtr<Gtk::Adjustment> _adjustFillB;
58 Glib::RefPtr<Gtk::Adjustment> _adjustFillA;
59
60 Gtk::Scale _scaleFillR;
61 Gtk::Scale _scaleFillG;
62 Gtk::Scale _scaleFillB;
63 Gtk::Scale _scaleFillAlpha;
64 Gtk::Label m_LabelFillRGBA;
65 Gtk::Entry m_EntryFillRGBA;
66 //Stroke Property items
67 Gtk::HBox m_PropStroke;
68 Gtk::VBox m_PropStrokeV1;
69 Gtk::VBox m_PropStrokeV2;
70
71 Glib::RefPtr<Gtk::Adjustment> _adjustStrokeR;
72 Glib::RefPtr<Gtk::Adjustment> _adjustStrokeG;
73 Glib::RefPtr<Gtk::Adjustment> _adjustStrokeB;
74 Glib::RefPtr<Gtk::Adjustment> _adjustStrokeA;
75
76 Gtk::Button m_ButtonStroke;
79 Gtk::Label m_LabelStrokeR;
80 Gtk::Label m_LabelStrokeG;
81 Gtk::Label m_LabelStrokeB;
83 Gtk::Scale _scaleStrokeR;
84 Gtk::Scale _scaleStrokeG;
85 Gtk::Scale _scaleStrokeB;
87 Gtk::Label m_LabelStrokeRGBA;
89 Gtk::ColorButton m_ColorButtonStroke;
90 //Toggle for Fill/Stroke Property items
91 Gtk::HBox m_PropFillLabel;
94
98 public:
100 void FillR_onChange();
101 void FillG_onChange();
102 void FillB_onChange();
103 void FillAlpha_onChange();
105 void updateEntryFillRGBA();
107 void StrokeR_onChange();
108 void StrokeG_onChange();
109 void StrokeB_onChange();
114
117
118 void setFillColorData(ColorData p_colordata);
119 void setStrokeColorData(ColorData p_colordata);
120 void setFillButtonColor(Gdk::Color p_color);
121 void setStrokeButtonColor(Gdk::Color p_color);
122 void setScaleFillRGBA(ColorData p_colordata);
123 void setScaleStrokeRGBA(ColorData p_colordata);
124 void setStrokeThicknessText(double p_thickness);
125 string getStrokeThicknessText();
126 Gdk::Color getFillColor();
127 Gdk::Color getStrokeColor();
128
129 unsigned int getFillScaleR();
130 unsigned int getFillScaleG();
131 unsigned int getFillScaleB();
132 unsigned int getFillScaleAlpha();
133 unsigned int getStrokeScaleR();
134 unsigned int getStrokeScaleG();
135 unsigned int getStrokeScaleB();
136 unsigned int getStrokeScaleAlpha();
137 };
138#endif //GTKMM_KAGE_PROP_FILL_STROKE_H
Definition: color.h:28
Definition: kage.h:69
Definition: fillstroke.h:37
void updateEntryFillRGBA()
Definition: fillstroke.cpp:258
void StrokeAlpha_onChange()
Definition: fillstroke.cpp:490
Gtk::Scale _scaleFillB
Definition: fillstroke.h:62
unsigned int getStrokeScaleB()
Definition: fillstroke.cpp:684
Gtk::HBox m_PropFill
Definition: fillstroke.h:45
Gtk::Entry m_EntryStrokeThickness
Definition: fillstroke.h:78
Gtk::ColorButton m_ColorButtonStroke
Definition: fillstroke.h:89
Gtk::HBox m_PropStroke
Definition: fillstroke.h:67
void setStrokeColorData(ColorData p_colordata)
Definition: fillstroke.cpp:621
void setStrokeButtonColor(Gdk::Color p_color)
Definition: fillstroke.cpp:636
Gtk::HBox m_PropFillLabel
Definition: fillstroke.h:91
Glib::RefPtr< Gtk::Adjustment > _adjustStrokeR
Definition: fillstroke.h:71
unsigned int getFillScaleG()
Definition: fillstroke.cpp:669
Glib::RefPtr< Gtk::Adjustment > _adjustFillR
Definition: fillstroke.h:55
void setStrokeThicknessText(double p_thickness)
Definition: fillstroke.cpp:651
Gtk::VBox m_PropStrokeV2
Definition: fillstroke.h:69
void FillG_onChange()
Definition: fillstroke.cpp:290
Gtk::Label m_LabelFillAlpha
Definition: fillstroke.h:54
Gtk::Scale _scaleFillAlpha
Definition: fillstroke.h:63
Glib::RefPtr< Gtk::Adjustment > _adjustStrokeB
Definition: fillstroke.h:73
void FillB_onChange()
Definition: fillstroke.cpp:304
Gtk::Button m_ButtonStroke
Definition: fillstroke.h:76
Kage * _kage
Definition: fillstroke.h:43
void FillAlpha_onChange()
Definition: fillstroke.cpp:318
Gtk::Label m_LabelFillB
Definition: fillstroke.h:53
Gtk::VBox m_PropStrokeLabelV2
Definition: fillstroke.h:97
Gtk::Label m_LabelStrokeThickness
Definition: fillstroke.h:77
void updateEntryStrokeRGBA()
Definition: fillstroke.cpp:430
void setFillButtonColor(Gdk::Color p_color)
Definition: fillstroke.cpp:633
Gtk::VBox m_PropFillLabelV1
Definition: fillstroke.h:92
void StrokeR_onChange()
Definition: fillstroke.cpp:448
Glib::RefPtr< Gtk::Adjustment > _adjustFillB
Definition: fillstroke.h:57
Gtk::Label m_LabelFillG
Definition: fillstroke.h:52
void EntryFillRGBA_onEnter()
Definition: fillstroke.cpp:333
unsigned int getStrokeScaleR()
Definition: fillstroke.cpp:678
void TogglePropertiesStroke_onClick()
Definition: fillstroke.cpp:210
Glib::RefPtr< Gtk::Adjustment > _adjustStrokeA
Definition: fillstroke.h:74
void setScaleFillRGBA(ColorData p_colordata)
Definition: fillstroke.cpp:639
void ColorButtonStroke_onClick()
Definition: fillstroke.cpp:242
unsigned int getStrokeScaleG()
Definition: fillstroke.cpp:681
Gtk::Scale _scaleFillG
Definition: fillstroke.h:61
Gtk::Label m_LabelStrokeAlpha
Definition: fillstroke.h:82
Gtk::VBox m_PropStrokeLabelV1
Definition: fillstroke.h:96
Gtk::Scale _scaleStrokeR
Definition: fillstroke.h:83
void setFillColorData(ColorData p_colordata)
Definition: fillstroke.cpp:612
Gtk::Label m_LabelStrokeR
Definition: fillstroke.h:79
Gtk::Label m_LabelFillRGBA
Definition: fillstroke.h:64
Gtk::VBox m_PropFillV1
Definition: fillstroke.h:46
Gtk::HBox m_PropStrokeLabel
Definition: fillstroke.h:95
Gdk::Color getFillColor()
Definition: fillstroke.cpp:658
void StrokeB_onChange()
Definition: fillstroke.cpp:476
void EntryStrokeThickness_onEnter()
Definition: fillstroke.cpp:598
Gtk::Entry m_EntryStrokeRGBA
Definition: fillstroke.h:88
unsigned int getFillScaleAlpha()
Definition: fillstroke.cpp:675
unsigned int getFillScaleB()
Definition: fillstroke.cpp:672
Gtk::Label m_LabelStrokeRGBA
Definition: fillstroke.h:87
void ColorButtonFill_onClick()
Definition: fillstroke.cpp:215
Gtk::Label m_LabelFillR
Definition: fillstroke.h:51
virtual ~PropertyFillStroke()
Definition: fillstroke.cpp:201
Gdk::Color getStrokeColor()
Definition: fillstroke.cpp:662
Gtk::Scale _scaleStrokeB
Definition: fillstroke.h:85
void TogglePropertiesFill_onClick()
Definition: fillstroke.cpp:206
void FillR_onChange()
Definition: fillstroke.cpp:276
Glib::RefPtr< Gtk::Adjustment > _adjustFillG
Definition: fillstroke.h:56
Glib::RefPtr< Gtk::Adjustment > _adjustStrokeG
Definition: fillstroke.h:72
Glib::RefPtr< Gtk::Adjustment > _adjustFillA
Definition: fillstroke.h:58
void EntryStrokeRGBA_onEnter()
Definition: fillstroke.cpp:503
Gtk::VBox m_PropFillV2
Definition: fillstroke.h:47
Gtk::ColorButton m_ColorButtonFill
Definition: fillstroke.h:50
void StrokeG_onChange()
Definition: fillstroke.cpp:462
Gtk::VBox m_PropFillLabelV2
Definition: fillstroke.h:93
Gtk::Entry m_EntryFillRGBA
Definition: fillstroke.h:65
Gtk::VBox m_PropStrokeV1
Definition: fillstroke.h:68
string getStrokeThicknessText()
Definition: fillstroke.cpp:654
Gtk::Scale _scaleStrokeG
Definition: fillstroke.h:84
Gtk::Button m_ButtonFill
Definition: fillstroke.h:49
Gtk::Scale _scaleFillR
Definition: fillstroke.h:60
unsigned int getStrokeScaleAlpha()
Definition: fillstroke.cpp:687
unsigned int getFillScaleR()
Definition: fillstroke.cpp:666
Gtk::Scale _scaleStrokeAlpha
Definition: fillstroke.h:86
void setScaleStrokeRGBA(ColorData p_colordata)
Definition: fillstroke.cpp:645
Gtk::Label m_LabelStrokeG
Definition: fillstroke.h:80
Gtk::Label m_LabelStrokeB
Definition: fillstroke.h:81