Kage Studio 0.7.240121
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~2024 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 class PropertyFillStroke : public Gtk::VBox {
36 public:
37 PropertyFillStroke(Kage* p_kage);
38 virtual ~PropertyFillStroke();
39
40 protected:
42 //Fill Property items
43 Gtk::HBox m_PropFill;
44 Gtk::VBox m_PropFillV1;
45 Gtk::VBox m_PropFillV2;
46
47 Gtk::Button m_ButtonFill;
48 Gtk::ColorButton m_ColorButtonFill;
49 Gtk::Label m_LabelFillR;
50 Gtk::Label m_LabelFillG;
51 Gtk::Label m_LabelFillB;
52 Gtk::Label m_LabelFillAlpha;
53 Glib::RefPtr<Gtk::Adjustment> _adjustFillR;
54 Glib::RefPtr<Gtk::Adjustment> _adjustFillG;
55 Glib::RefPtr<Gtk::Adjustment> _adjustFillB;
56 Glib::RefPtr<Gtk::Adjustment> _adjustFillA;
57
58 Gtk::Scale _scaleFillR;
59 Gtk::Scale _scaleFillG;
60 Gtk::Scale _scaleFillB;
61 Gtk::Scale _scaleFillAlpha;
62 Gtk::Label m_LabelFillRGBA;
63 Gtk::Entry m_EntryFillRGBA;
64 //Stroke Property items
65 Gtk::HBox m_PropStroke;
66 Gtk::VBox m_PropStrokeV1;
67 Gtk::VBox m_PropStrokeV2;
68
69 Glib::RefPtr<Gtk::Adjustment> _adjustStrokeR;
70 Glib::RefPtr<Gtk::Adjustment> _adjustStrokeG;
71 Glib::RefPtr<Gtk::Adjustment> _adjustStrokeB;
72 Glib::RefPtr<Gtk::Adjustment> _adjustStrokeA;
73
74 Gtk::Button m_ButtonStroke;
77 Gtk::Label m_LabelStrokeR;
78 Gtk::Label m_LabelStrokeG;
79 Gtk::Label m_LabelStrokeB;
81 Gtk::Scale _scaleStrokeR;
82 Gtk::Scale _scaleStrokeG;
83 Gtk::Scale _scaleStrokeB;
85 Gtk::Label m_LabelStrokeRGBA;
87 Gtk::ColorButton m_ColorButtonStroke;
88 //Toggle for Fill/Stroke Property items
89 Gtk::HBox m_PropFillLabel;
92
96 public:
98 void FillR_onChange();
99 void FillG_onChange();
100 void FillB_onChange();
101 void FillAlpha_onChange();
103 void updateEntryFillRGBA();
105 void StrokeR_onChange();
106 void StrokeG_onChange();
107 void StrokeB_onChange();
112
115
116 void setFillColorData(ColorData p_colordata);
117 void setStrokeColorData(ColorData p_colordata);
118 void setFillButtonColor(Gdk::Color p_color);
119 void setStrokeButtonColor(Gdk::Color p_color);
120 void setScaleFillRGBA(ColorData p_colordata);
121 void setScaleStrokeRGBA(ColorData p_colordata);
122 void setStrokeThicknessText(double p_thickness);
123 std::string getStrokeThicknessText();
124 Gdk::Color getFillColor();
125 Gdk::Color getStrokeColor();
126
127 unsigned int getFillScaleR();
128 unsigned int getFillScaleG();
129 unsigned int getFillScaleB();
130 unsigned int getFillScaleAlpha();
131 unsigned int getStrokeScaleR();
132 unsigned int getStrokeScaleG();
133 unsigned int getStrokeScaleB();
134 unsigned int getStrokeScaleAlpha();
135 };
136#endif //GTKMM_KAGE_PROP_FILL_STROKE_H
Definition color.h:28
Definition kage.h:74
void updateEntryFillRGBA()
Definition fillstroke.cpp:258
void StrokeAlpha_onChange()
Definition fillstroke.cpp:490
Gtk::Scale _scaleFillB
Definition fillstroke.h:60
unsigned int getStrokeScaleB()
Definition fillstroke.cpp:684
Gtk::HBox m_PropFill
Definition fillstroke.h:43
Gtk::Entry m_EntryStrokeThickness
Definition fillstroke.h:76
Gtk::ColorButton m_ColorButtonStroke
Definition fillstroke.h:87
Gtk::HBox m_PropStroke
Definition fillstroke.h:65
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:89
Glib::RefPtr< Gtk::Adjustment > _adjustStrokeR
Definition fillstroke.h:69
unsigned int getFillScaleG()
Definition fillstroke.cpp:669
Glib::RefPtr< Gtk::Adjustment > _adjustFillR
Definition fillstroke.h:53
void setStrokeThicknessText(double p_thickness)
Definition fillstroke.cpp:651
Gtk::VBox m_PropStrokeV2
Definition fillstroke.h:67
void FillG_onChange()
Definition fillstroke.cpp:290
std::string getStrokeThicknessText()
Definition fillstroke.cpp:654
Gtk::Label m_LabelFillAlpha
Definition fillstroke.h:52
Gtk::Scale _scaleFillAlpha
Definition fillstroke.h:61
Glib::RefPtr< Gtk::Adjustment > _adjustStrokeB
Definition fillstroke.h:71
void FillB_onChange()
Definition fillstroke.cpp:304
Gtk::Button m_ButtonStroke
Definition fillstroke.h:74
Kage * _kage
Definition fillstroke.h:41
void FillAlpha_onChange()
Definition fillstroke.cpp:318
Gtk::Label m_LabelFillB
Definition fillstroke.h:51
Gtk::VBox m_PropStrokeLabelV2
Definition fillstroke.h:95
Gtk::Label m_LabelStrokeThickness
Definition fillstroke.h:75
void updateEntryStrokeRGBA()
Definition fillstroke.cpp:430
void setFillButtonColor(Gdk::Color p_color)
Definition fillstroke.cpp:633
Gtk::VBox m_PropFillLabelV1
Definition fillstroke.h:90
void StrokeR_onChange()
Definition fillstroke.cpp:448
Glib::RefPtr< Gtk::Adjustment > _adjustFillB
Definition fillstroke.h:55
Gtk::Label m_LabelFillG
Definition fillstroke.h:50
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:72
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:59
Gtk::Label m_LabelStrokeAlpha
Definition fillstroke.h:80
Gtk::VBox m_PropStrokeLabelV1
Definition fillstroke.h:94
Gtk::Scale _scaleStrokeR
Definition fillstroke.h:81
void setFillColorData(ColorData p_colordata)
Definition fillstroke.cpp:612
Gtk::Label m_LabelStrokeR
Definition fillstroke.h:77
Gtk::Label m_LabelFillRGBA
Definition fillstroke.h:62
Gtk::VBox m_PropFillV1
Definition fillstroke.h:44
Gtk::HBox m_PropStrokeLabel
Definition fillstroke.h:93
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:86
unsigned int getFillScaleAlpha()
Definition fillstroke.cpp:675
unsigned int getFillScaleB()
Definition fillstroke.cpp:672
Gtk::Label m_LabelStrokeRGBA
Definition fillstroke.h:85
void ColorButtonFill_onClick()
Definition fillstroke.cpp:215
Gtk::Label m_LabelFillR
Definition fillstroke.h:49
virtual ~PropertyFillStroke()
Definition fillstroke.cpp:201
Gdk::Color getStrokeColor()
Definition fillstroke.cpp:662
Gtk::Scale _scaleStrokeB
Definition fillstroke.h:83
void TogglePropertiesFill_onClick()
Definition fillstroke.cpp:206
void FillR_onChange()
Definition fillstroke.cpp:276
Glib::RefPtr< Gtk::Adjustment > _adjustFillG
Definition fillstroke.h:54
Glib::RefPtr< Gtk::Adjustment > _adjustStrokeG
Definition fillstroke.h:70
Glib::RefPtr< Gtk::Adjustment > _adjustFillA
Definition fillstroke.h:56
void EntryStrokeRGBA_onEnter()
Definition fillstroke.cpp:503
Gtk::VBox m_PropFillV2
Definition fillstroke.h:45
Gtk::ColorButton m_ColorButtonFill
Definition fillstroke.h:48
void StrokeG_onChange()
Definition fillstroke.cpp:462
PropertyFillStroke(Kage *p_kage)
Definition fillstroke.cpp:25
Gtk::VBox m_PropFillLabelV2
Definition fillstroke.h:91
Gtk::Entry m_EntryFillRGBA
Definition fillstroke.h:63
Gtk::VBox m_PropStrokeV1
Definition fillstroke.h:66
Gtk::Scale _scaleStrokeG
Definition fillstroke.h:82
Gtk::Button m_ButtonFill
Definition fillstroke.h:47
Gtk::Scale _scaleFillR
Definition fillstroke.h:58
unsigned int getStrokeScaleAlpha()
Definition fillstroke.cpp:687
unsigned int getFillScaleR()
Definition fillstroke.cpp:666
Gtk::Scale _scaleStrokeAlpha
Definition fillstroke.h:84
void setScaleStrokeRGBA(ColorData p_colordata)
Definition fillstroke.cpp:645
Gtk::Label m_LabelStrokeG
Definition fillstroke.h:78
Gtk::Label m_LabelStrokeB
Definition fillstroke.h:79