Kage Studio 0.7.230612
A Simple Free and Open Source 2D Animation Software
Loading...
Searching...
No Matches
KageLayerManager Class Reference

#include <layermanager.h>

Inheritance diagram for KageLayerManager:
Collaboration diagram for KageLayerManager:

Public Member Functions

 KageLayerManager (Kage *p_kage)
 
virtual ~KageLayerManager ()
 
unsigned int layerCount ()
 
unsigned int addLayer (Glib::ustring p_name="")
 
void deleteLayer ()
 
bool removeAllLayers ()
 
void setSelected (KageLayerUI *p_layer)
 
KageLayerUIgetLayer ()
 
unsigned int getCurrentLayer ()
 
void setCurrentLayer (unsigned int p_layer)
 
void setCurrentLayerByID (unsigned int p_layerID)
 
void renderStage ()
 
void toggleLock ()
 
bool isLayerLocked ()
 
void setLock (bool p_lock)
 
void toggleVisibility ()
 
bool isLayerVisible ()
 
void setVisible (bool p_visible)
 
void renameLayer (KageLayerUI *p_layer)
 
void renameLayer ()
 
void setLabel (string p_label)
 
string getLabel ()
 
bool moveToTop ()
 
bool moveUp ()
 
bool moveDown ()
 
bool moveToBottom ()
 

Protected Attributes

Kage_kage
 
unsigned int layerCtr
 
std::vector< Gtk::Button * > labels
 
std::vector< KageLayerUI * > layers
 
unsigned int _currentLayerID
 
unsigned int _currentLayerIndex
 

Constructor & Destructor Documentation

◆ KageLayerManager()

KageLayerManager::KageLayerManager ( Kage p_kage)

◆ ~KageLayerManager()

KageLayerManager::~KageLayerManager ( )
virtual

Member Function Documentation

◆ addLayer()

unsigned int KageLayerManager::addLayer ( Glib::ustring  p_name = "")
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteLayer()

void KageLayerManager::deleteLayer ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCurrentLayer()

unsigned int KageLayerManager::getCurrentLayer ( )

For use of Kage. To keep track of active Layer in-check of all layers in KageLayerManager.

Returns
index of registered active layer
See also
setCurrentLayer()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLabel()

string KageLayerManager::getLabel ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLayer()

KageLayerUI * KageLayerManager::getLayer ( )

Not to be confused of getCurrentLayer(). This function returns the pointer to active KageLayerUI Object to caller

Returns
pointer to registered active layer
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isLayerLocked()

bool KageLayerManager::isLayerLocked ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isLayerVisible()

bool KageLayerManager::isLayerVisible ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ layerCount()

unsigned int KageLayerManager::layerCount ( )

For use of Kage when exporting/saving to file.

Returns
size of array of KageLayerUI
Here is the caller graph for this function:

◆ moveDown()

bool KageLayerManager::moveDown ( )

NOTE: layers are organized as index 0 as BOTTOM and last index is TOP

See also
moveToBottom() moveToTop() moveUp()
Returns
True if successfully moved to bottom
Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveToBottom()

bool KageLayerManager::moveToBottom ( )

NOTE: layers are organized as index 0 as BOTTOM and last index is TOP

See also
moveDown() moveToTop() moveUp()
Returns
True if successfully moved to bottom
Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveToTop()

bool KageLayerManager::moveToTop ( )

NOTE: layers are organized as index 0 as BOTTOM and last index is TOP

See also
moveDown() moveToBottom() moveUp()
Returns
True if successfully moved to bottom
Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveUp()

bool KageLayerManager::moveUp ( )

NOTE: layers are organized as index 0 as BOTTOM and last index is TOP

See also
moveDown() moveToBottom() moveToTop()
Returns
True if successfully moved to bottom
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeAllLayers()

bool KageLayerManager::removeAllLayers ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ renameLayer() [1/2]

void KageLayerManager::renameLayer ( )

For use of Kage when User clicked Layer->Rename

See also
renameLayer(KageLayer)
Here is the call graph for this function:

◆ renameLayer() [2/2]

void KageLayerManager::renameLayer ( KageLayerUI p_layer)

For use of KageLayerUI when User double-clicked Layer

See also
renameLayer()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ renderStage()

void KageLayerManager::renderStage ( )

For use of KageLayer. When a KageLayer's visibility is clicked, this function will be called to reflect Layer's visibility on stage.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCurrentLayer()

void KageLayerManager::setCurrentLayer ( unsigned int  p_layer)

For use of Kage. When a KageFrame is clicked, KageFramesetManager will call this function via Kage then sets currently active Layer

Parameters
p_layeris index of Layer known to KageFrame
See also
getCurrentLayer()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCurrentLayerByID()

void KageLayerManager::setCurrentLayerByID ( unsigned int  p_layerID)

For use of Kage. When a KageFrame is clicked, KageFramesetManager will call this function via Kage then sets currently active Layer

Parameters
p_layerIDis layerID of Layer known to KageFrame
See also
getCurrentLayer()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLabel()

void KageLayerManager::setLabel ( string  p_label)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLock()

void KageLayerManager::setLock ( bool  p_lock)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSelected()

void KageLayerManager::setSelected ( KageLayerUI p_layer)

For use of KageLayerUI. When a KageLayerUI is clicked, previously clicked KageLayerUI should be un-selected.

Parameters
p_layeris pointer to KageLayerUI who called this function
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setVisible()

void KageLayerManager::setVisible ( bool  p_visible)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ toggleLock()

void KageLayerManager::toggleLock ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ toggleVisibility()

void KageLayerManager::toggleVisibility ( )
Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ _currentLayerID

unsigned int KageLayerManager::_currentLayerID
protected

◆ _currentLayerIndex

unsigned int KageLayerManager::_currentLayerIndex
protected

◆ _kage

Kage* KageLayerManager::_kage
protected

◆ labels

std::vector<Gtk::Button*> KageLayerManager::labels
protected

◆ layerCtr

unsigned int KageLayerManager::layerCtr
protected

◆ layers

std::vector<KageLayerUI*> KageLayerManager::layers
protected

The documentation for this class was generated from the following files: