25 #include <gtkmm/togglebutton.h>
26 #include <gtkmm/paned.h>
27 #include <gtkmm/scrolledwindow.h>
28 #include <gtkmm/separator.h>
29 #include <gtkmm/scrollbar.h>
30 #include <gtkmm/uimanager.h>
31 #include <gtkmm/statusbar.h>
32 #include <gtkmm/radioaction.h>
33 #include <gtkmm/messagedialog.h>
34 #include <gtkmm/filechooserdialog.h>
35 #include <gtkmm/cssprovider.h>
66 #include <gdkmm/cursor.h>
67 #include <gdkmm/frameclock.h>
69 class Kage :
public Gtk::Window {
71 Kage(
string p_filePath);
178 void doSave(
string p_filename);
300 bool dtrace(
string p_msg);
303 bool exportSvg(
string p_path,
string p_msg);
305 bool dump(
string p_path,
string p_msg);
306 bool fileWrite(
string p_path,
string p_msg, std::ofstream &p_file,
bool &p_flag);
329 bool on_tick(
const Glib::RefPtr<Gdk::FrameClock>& frame_clock);
Definition: assetmanager.h:34
Definition: document.h:84
PropertyFrameTween m_propFrameTween
Definition: kage.h:356
void LayerDel_onClick()
Definition: kage.cpp:1472
std::ofstream ksfFile
Definition: kage.h:295
Gtk::Button _btnTimelinePrevious
Definition: kage.h:216
bool continueNewFileWithUnsavedWork()
Definition: kage.cpp:2048
PropertyLocationSize m_propLocationSize
Definition: kage.h:353
void ToolEyedrop_onClick()
Definition: kage.cpp:1690
const gint64 cycle_time
Definition: kage.h:332
void ToolSelect_onClick()
Definition: kage.cpp:1592
bool saveKageStudio(string p_path, string p_msg)
Definition: kage.cpp:2997
int _area_timeline_pane
Definition: kage.h:342
void ToggleOnionLayer_onClick()
Definition: kage.cpp:1531
bool exportHtml5(string p_path, string p_msg)
Definition: kage.cpp:3006
bool dump(string p_path, string p_msg)
Definition: kage.cpp:2994
void Duplicate_onClick()
Definition: kage.cpp:1021
Glib::RefPtr< Gdk::Pixbuf > _btnLayerAdd_pixbuf
Definition: kage.h:196
unsigned int tickCounter
Definition: kage.h:334
void propStageSetVisible(bool p_visible)
Definition: kage.cpp:1716
KageAssetManager _assetManager
Definition: kage.h:97
KageDocument _document
Definition: kage.h:407
std::ofstream expFile
Definition: kage.h:299
std::vector< Gtk::Tooltip * > tooltips
Definition: kage.h:278
void addToolButton(const Glib::ustring &label)
Definition: kage.cpp:2925
void Raise_onClick()
Definition: kage.cpp:1126
Gtk::VBox m_VBoxTimelineLayer
Definition: kage.h:185
void PasteFrame_onClick()
Definition: kage.cpp:1358
void ToggleProperties_onClick()
Definition: kage.cpp:1078
void Paste_onClick()
Definition: kage.cpp:1014
vector< double > parseNumbers(string p_numbers)
Definition: kage.cpp:3463
Gtk::Button _btnTimelinePlay
Definition: kage.h:219
void Deselect_onClick()
Definition: kage.cpp:1045
void RemoveTweenFrame_onClick()
Definition: kage.cpp:1422
Glib::RefPtr< Gdk::Pixbuf > _btnLayerMoveUp_pixbuf
Definition: kage.h:205
bool doDeleteFrame()
Definition: kage.cpp:1376
Gtk::HSeparator m_Separator
Definition: kage.h:251
void propNodeXYSetVisible(bool p_visible)
Definition: kage.cpp:1729
Gtk::HSeparator m_Separator_Toolbar1
Definition: kage.h:252
bool on_tick(const Glib::RefPtr< Gdk::FrameClock > &frame_clock)
Definition: kage.cpp:2889
Gtk::VBox m_Timeline_Layer_VBox2
Definition: kage.h:189
Gtk::HPaned m_HPane_DrawingArea
Definition: kage.h:287
PropertyNodeXY m_propNodeXY
Definition: kage.h:355
void forceRenderFrames()
Definition: kage.cpp:1870
KageTimeline _timeline
Definition: kage.h:98
Gtk::HSeparator m_Separator_Toolbar4
Definition: kage.h:255
virtual ~Kage()
Definition: kage.cpp:959
bool exportKonsolScript(string p_path, string p_msg)
Definition: kage.cpp:3023
void doExportPNGDialog(string p_title, bool p_transparent)
Definition: kage.cpp:2397
Glib::RefPtr< Gdk::Pixbuf > _toggleOnionLayer_pixbuf
Definition: kage.h:240
void updateShapeProperties()
Definition: kage.cpp:1765
void Cut_onClick()
Definition: kage.cpp:996
void ExportPNG_onClick()
Definition: kage.cpp:2389
Gtk::HBox m_HBoxToolbar
Definition: kage.h:184
void updateColors()
We're updating the GUI's colors based on KageStage's Fill and Stroke colors.
Definition: kage.cpp:1741
Gtk::Image _btnTimelineRewind_img
Definition: kage.h:214
void Play_onClick()
Definition: kage.cpp:2866
KageStage _stage
Definition: kage.h:348
void setCurrentLayerByID(unsigned int p_layerID)
Definition: kage.cpp:1998
void ImportAsset_onClick()
Definition: kage.cpp:2579
void LayerRename_onClick()
Definition: kage.cpp:1461
static void timestamp_IN()
Definition: kage.cpp:3736
bool m_LabelLibrary_onClick(GdkEventButton *event)
Definition: kage.cpp:940
void LayerMoveTop_onClick()
Definition: kage.cpp:1486
bool fileWrite(string p_path, string p_msg, std::ofstream &p_file, bool &p_flag)
Definition: kage.cpp:2975
std::vector< Glib::RefPtr< Gdk::Pixbuf > > toggleButtons_pixbuf
Definition: kage.h:276
void TweenFrame_onClick()
Definition: kage.cpp:1406
string dumpFrameToSvg()
Definition: kage.cpp:3269
std::vector< Gtk::Image > toggleButtons_img
Definition: kage.h:277
void ToolStroke_onClick()
Definition: kage.cpp:1664
vector< VectorData > _undoBase
Definition: kage.h:338
Glib::RefPtr< Gdk::Pixbuf > _btnTimelinePlay_pixbuf
Definition: kage.h:221
void LayerAdd_onClick()
Definition: kage.cpp:1454
void Redo_onClick()
Definition: kage.cpp:985
bool _UPDATE_SHAPE_COLORS
Definition: kage.h:349
virtual bool on_key_release_event(GdkEventKey *e) override
Definition: kage.cpp:949
Glib::RefPtr< Gdk::Pixbuf > _toggleOnion_pixbuf
Definition: kage.h:235
virtual bool on_key_press_event(GdkEventKey *e) override
Definition: kage.cpp:945
Glib::RefPtr< Gdk::Pixbuf > _btnTimelineRewind_pixbuf
Definition: kage.h:215
unsigned int hexToInt15(char p)
Definition: kage.cpp:3433
void refreshUI()
Definition: kage.cpp:1281
Gtk::Image _btnLayerMoveDown_img
Definition: kage.h:207
void setStageBG(Gdk::Color p_Color)
Definition: kage.cpp:3755
Gtk::ScrolledWindow m_Timeline_Layer_ScrolledWindow
Definition: kage.h:246
void LayerMoveUp_onClick()
Definition: kage.cpp:1497
void updateNodeXY()
Definition: kage.cpp:1772
bool expInited
Definition: kage.h:297
bool exportSvg(string p_path, string p_msg)
Definition: kage.cpp:3014
void ToolZoom_onClick()
Definition: kage.cpp:1703
Gtk::Button _btnLayerDelete
Definition: kage.h:197
void ExportPNGSequence_onClick()
Definition: kage.cpp:2502
void Save_onClick()
Definition: kage.cpp:2110
unsigned int getCurrentLayer()
Definition: kage.cpp:1984
Gtk::Button _btnTimelineStop
Definition: kage.h:225
void renderFramesBelowCurrentLayer()
Definition: kage.cpp:1940
Gtk::Button _btnLayerMoveUp
Definition: kage.h:203
Gtk::ScrolledWindow m_Timeline_Frame_ScrolledWindow
Definition: kage.h:247
static void timestamp_OUT()
Definition: kage.cpp:3743
int _area_properties_pane1
Definition: kage.h:343
bool runExternal(string p_cmd, string p_param)
Definition: kage.cpp:3672
void renderFramesAboveCurrentLayer()
Definition: kage.cpp:1964
void propShapePropertiesSetVisible(bool p_visible)
Definition: kage.cpp:1724
void ExportPNGSpritesheet_onClick()
Definition: kage.cpp:2437
bool switchToNextFrame()
Definition: kage.cpp:1445
void parseKSF_Children(vector< XmlTag > p_children)
Definition: kage.cpp:3490
Gtk::Label m_Timeline_Label
Definition: kage.h:193
void doOpen()
Definition: kage.cpp:2092
Gtk::Button _btnTimelineNext
Definition: kage.h:222
Glib::RefPtr< Gdk::Pixbuf > _btnTimelineStop_pixbuf
Definition: kage.h:227
void PreviousFrame_onClick()
Definition: kage.cpp:1247
void PlayFrame_onClick()
Definition: kage.cpp:2876
void ExportHTML5_onClick()
Definition: kage.cpp:2252
void ToolFill_onClick()
Definition: kage.cpp:1677
Gtk::ScrolledWindow m_Property_Pane_ScrolledWindow
Definition: kage.h:259
void ToggleOnionSkin_onClick()
Definition: kage.cpp:1526
void ShowHideLayer_onClick()
Definition: kage.cpp:1464
void ToolRectangle_onClick()
Definition: kage.cpp:1652
void ToggleTimeline_onClick()
Definition: kage.cpp:1066
Gtk::HSeparator m_Separator_Toolbar2
Definition: kage.h:253
void ToolNode_onClick()
Definition: kage.cpp:1603
Gtk::Image _toggleOnion_img
Definition: kage.h:234
Gtk::HBox m_Box1
Definition: kage.h:249
void doSaveDialog(string p_title)
Definition: kage.cpp:2121
bool isLayerLocked()
Definition: kage.cpp:1981
void focusOnStage()
Definition: kage.cpp:3750
Gtk::ToggleButton _toggleOnion
Definition: kage.h:232
void ToolPencil_onClick()
Definition: kage.cpp:1628
std::vector< Gtk::ToggleButton * > toggleButtons
Definition: kage.h:275
void ExtendFrame_onClick()
Definition: kage.cpp:1263
Gtk::Image _btnTimelinePlay_img
Definition: kage.h:220
VectorDataManager getFrameDataAt(unsigned int p_frame)
Definition: kage.cpp:1843
void TogglePropertiesFill_onClick()
Definition: kage.cpp:1089
Glib::RefPtr< Gtk::UIManager > m_refUIManager
Definition: kage.h:265
void RecenterRotationPoint_onClick()
Definition: kage.cpp:1216
Gtk::Image _btnTimelineStop_img
Definition: kage.h:226
Gdk::Color m_Color
Definition: kage.h:358
void toolsButtonToggle(string p_toolTip)
Definition: kage.cpp:1542
Gtk::Image _toggleOnionLayer_img
Definition: kage.h:239
Gtk::VBox m_Timeline_Layer_VBox1
Definition: kage.h:188
void FlipVertical_onClick()
Definition: kage.cpp:1201
void Stop_onClick()
Definition: kage.cpp:2882
void CheckUpdate_onClick()
Definition: kage.cpp:2956
Gtk::HSeparator m_Separator_Toolbar3
Definition: kage.h:254
void NextFrame_onClick()
Definition: kage.cpp:1251
void stackDoZoom(PointData p_originBefore, PointData p_originAfter, PointData p_zoomReference, double p_zoomRatio)
Definition: kage.cpp:970
Glib::RefPtr< Gdk::Pixbuf > _btnLayerMoveDown_pixbuf
Definition: kage.h:208
Gtk::VBox m_Timeline_Layer_VBox
Definition: kage.h:187
void btnDebug_onClick()
Definition: kage.cpp:2945
Gtk::VBox m_Timeline_Frame_VBox2
Definition: kage.h:244
void Copy_onClick()
Definition: kage.cpp:1007
Gtk::HSeparator m_Separator_Library2
Definition: kage.h:257
static void timestamp()
Definition: kage.cpp:3693
void ShapeUngroup_onClick()
Definition: kage.cpp:1109
Gtk::Label m_Timeline_CurrentFrame
Definition: kage.h:241
void ProjectSave_onClick()
Definition: kage.cpp:2840
void RemoveFrame_onClick()
Definition: kage.cpp:1274
string expPath
Definition: kage.h:298
void propFrameTweenSetVisible(bool p_visible)
Definition: kage.cpp:1734
Gtk::VPaned m_VPane_Timeline
Definition: kage.h:286
vector< int > parseColorString(string p_color)
Definition: kage.cpp:3471
Gtk::Image _btnLayerDelete_img
Definition: kage.h:198
Glib::RefPtr< Gdk::Pixbuf > _btnTimelineLoop_pixbuf
Definition: kage.h:230
VectorDataManager getFrameData(bool p_force=false)
Definition: kage.cpp:1828
Gtk::VBox m_VBoxRoot
Definition: kage.h:183
void ToggleLoop_onClick()
Definition: kage.cpp:1255
Gtk::Image _btnTimelineLoop_img
Definition: kage.h:229
KageLibrary _library
Definition: kage.h:357
Gtk::Label _labelStatusMouseXY
Definition: kage.h:289
unsigned m_ContextId
Definition: kage.h:291
PropertyStage m_PropStage
Definition: kage.h:352
bool dtrace(string p_msg)
Definition: kage.cpp:3032
void SaveAs_onClick()
Definition: kage.cpp:2117
void Undo_onClick()
Definition: kage.cpp:974
void FlipHorizontal_onClick()
Definition: kage.cpp:1187
Glib::RefPtr< Gdk::Pixbuf > _btnLayerMoveTop_pixbuf
Definition: kage.h:202
void LayerMoveBottom_onClick()
Definition: kage.cpp:1519
string dumpFrame(bool bKS)
Definition: kage.cpp:3131
void Quit_onClick()
Definition: kage.cpp:1795
void DuplicateFrame_onClick()
Definition: kage.cpp:1269
void LowerToBottom_onClick()
Definition: kage.cpp:1171
Gtk::Label m_TimelineFrame_Label
Definition: kage.h:243
string openTextFile(string p_path)
Definition: kage.cpp:3453
string ksfPath
Definition: kage.h:294
void setCurrentLayer(unsigned int p_layer)
Definition: kage.cpp:1988
void renderFrames()
Definition: kage.cpp:1915
void setFrameData(VectorDataManager p_vectorsData)
Definition: kage.cpp:1852
void setCurrentFrame(unsigned int p_layer)
Definition: kage.cpp:2004
bool _isPlaying
Definition: kage.h:362
void registerPropertiesPane()
Definition: kage.cpp:954
void btnAbout_onClick()
Definition: kage.cpp:2950
Gtk::Image _btnLayerMoveTop_img
Definition: kage.h:201
Glib::RefPtr< Gdk::Pixbuf > _btnTimelineNext_pixbuf
Definition: kage.h:224
Gtk::ToggleButton * currentTool
Definition: kage.h:279
guint m_tick_id
Definition: kage.h:330
Gtk::VBox m_Timeline_Frame_VBox1
Definition: kage.h:242
void OpenKSF_onClick()
Definition: kage.cpp:2064
void displayMouseXY(double p_x, double p_y)
Definition: kage.cpp:963
void LockUnlockLayer_onClick()
Definition: kage.cpp:1468
Gtk::Image _btnTimelineNext_img
Definition: kage.h:223
void TogglePropertiesStroke_onClick()
Definition: kage.cpp:1092
void ExportVideo_onClick()
Definition: kage.cpp:2662
Gtk::VBox m_VBoxTimelineFrame
Definition: kage.h:245
Gtk::Image _btnLayerMoveUp_img
Definition: kage.h:204
void Tween_onClick()
Definition: kage.cpp:1382
Gtk::VScrollbar m_Timeline_VScrollbar
Definition: kage.h:283
Glib::RefPtr< Gdk::Pixbuf > _btnLayerDelete_pixbuf
Definition: kage.h:199
unsigned int getCurrentFrame()
Definition: kage.cpp:1995
void AddFrame_onClick()
Definition: kage.cpp:1258
Gtk::ToggleButton _toggleOnionLayer
Definition: kage.h:237
void doSave(string p_filename)
Definition: kage.cpp:2145
void parseKSF(string p_content)
Definition: kage.cpp:3640
KageLayerManager _layerManager
Definition: kage.h:96
Gtk::Label m_LabelLibrary
Definition: kage.h:261
int _area_properties_pane2
Definition: kage.h:344
void onActionActivate()
Definition: kage.cpp:2862
void CopyFrame_onClick()
Definition: kage.cpp:1347
void stackDo()
Definition: kage.cpp:1777
void Website_onClick()
Definition: kage.cpp:2961
Glib::RefPtr< Gtk::ActionGroup > m_refActionGroup
Definition: kage.h:266
Gtk::Image _btnLayerMoveBottom_img
Definition: kage.h:210
Gtk::VScrollbar m_Property_Pane_VScrollbar
Definition: kage.h:260
void updateSelectedShapeColor(bool p_doFill=true, bool p_doStroke=true)
Used by Fill and Stroke tools.
Definition: kage.cpp:3042
gint64 m_start_time
Definition: kage.h:331
void ExportSVG_onClick()
Definition: kage.cpp:2330
Gtk::HBox m_Timeline_Controls_HBox
Definition: kage.h:192
void DeleteFrame_onClick()
Definition: kage.cpp:1370
PropertyFillStroke m_propFillStroke
Definition: kage.h:354
Glib::RefPtr< Gdk::Pixbuf > _btnTimelinePrevious_pixbuf
Definition: kage.h:218
void ExportPNGTransparent_onClick()
Definition: kage.cpp:2393
Gtk::Button _btnLayerMoveDown
Definition: kage.h:206
Gtk::HBox m_Timeline_HBox
Definition: kage.h:284
Gdk::Color getStageBG()
Definition: kage.cpp:3762
Gtk::Statusbar m_Statusbar
Definition: kage.h:288
void ToolPoly_onClick()
Definition: kage.cpp:1616
bool _propStrokeVisible
Definition: kage.h:351
void Delete_onClick()
Definition: kage.cpp:1231
void Lower_onClick()
Definition: kage.cpp:1141
void SelectAll_onClick()
Definition: kage.cpp:1035
virtual bool on_delete_event(GdkEventAny *any_event)
Definition: kage.cpp:1802
Gtk::VBox m_PropertyBox
Definition: kage.h:250
UnRe _undoRedoManager
Definition: kage.h:386
bool ksfInited
Definition: kage.h:293
Gtk::Button _btnLayerMoveTop
Definition: kage.h:200
string saveFrame()
Definition: kage.cpp:3064
Gtk::HPaned m_Timeline_HPaned
Definition: kage.h:186
Gtk::ScrolledWindow m_Stage_Pane_ScrolledWindow
Definition: kage.h:264
guint frameCounter
Definition: kage.h:335
void updateStatus(Glib::ustring status_msg)
Definition: kage.cpp:966
Gtk::Label m_LabelProp
Definition: kage.h:258
void New_onClick()
Definition: kage.cpp:2010
static unsigned int TAB_COUNT
Definition: kage.h:371
void openWebsite(string p_url)
Definition: kage.cpp:2965
bool _propFillVisible
Definition: kage.h:350
Gtk::Image _btnLayerAdd_img
Definition: kage.h:195
unsigned int getTween()
Definition: kage.cpp:1862
Gtk::HScrollbar m_Timeline_HScrollbar
Definition: kage.h:282
Gtk::HBox m_Timeline_Layer_Controls_HBox
Definition: kage.h:191
void RaiseToTop_onClick()
Definition: kage.cpp:1156
Gtk::VBox m_VBoxToolbar_Holder
Definition: kage.h:248
void addDataToFrame(VectorDataManager v, bool p_force=false)
Definition: kage.cpp:1818
bool isFrameEmpty()
Definition: kage.cpp:1866
string int255ToHex(unsigned int p)
Definition: kage.cpp:3374
void renderOnionFrames()
Definition: kage.cpp:1882
Gtk::Image _btnTimelinePrevious_img
Definition: kage.h:217
Gtk::Button _btnTimelineRewind
Definition: kage.h:213
char int15ToHex(unsigned int p)
Definition: kage.cpp:3410
void ToolOval_onClick()
Definition: kage.cpp:1640
Gtk::ToggleButton _btnTimelineLoop
Definition: kage.h:228
void propFillStrokeSetVisible(bool p_visible)
Definition: kage.cpp:1720
void ToolButtons_onClick(Gtk::ToggleButton *p_sourceButton)
Definition: kage.cpp:1558
Gtk::HSeparator m_Separator_Library1
Definition: kage.h:256
bool switchToPreviousFrame()
Definition: kage.cpp:1436
Gtk::Button _btnLayerAdd
Definition: kage.h:194
Gtk::ToggleButton m_ToggleBtnSelect
Definition: kage.h:269
Gtk::Label m_LblHolder_Toolbar
Definition: kage.h:263
Glib::RefPtr< Gdk::Pixbuf > _btnLayerMoveBottom_pixbuf
Definition: kage.h:211
void LayerMoveDown_onClick()
Definition: kage.cpp:1508
void CutFrame_onClick()
Definition: kage.cpp:1336
void ShapeGroup_onClick()
Definition: kage.cpp:1096
Gtk::Button _btnLayerMoveBottom
Definition: kage.h:209
void ToggleOnion_onClick()
Definition: kage.cpp:1536
unsigned int hexToInt255(string p)
Definition: kage.cpp:3389
void ExportKS_onClick()
Definition: kage.cpp:2206
Gtk::HScrollbar m_Timeline_Layer_HScrollbar
Definition: kage.h:281
Definition: layermanager.h:33
forward declaration
Definition: library.h:31
forward declaration
Definition: timeline.h:32
Definition: fillstroke.h:37
Definition: frametween.h:34
Definition: locationsize.h:35
Definition: vectordatamanager.h:37