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

forward declaration More...

#include <asset.h>

Inheritance diagram for KageAsset:
Collaboration diagram for KageAsset:

Public Types

enum  AssetType { ASSET_IMAGE , ASSET_KAGE , ASSET_VIDEO }
 

Public Member Functions

 KageAsset (KageAssetManager *p_assetManager, unsigned p_assetID)
 
virtual ~KageAsset ()
 
void setAssetHash (string p_assetHash)
 When User imports a file, the original file is copied inside project file; the copied file name will be the Asset Hash.
 
string getAssetHash ()
 
void setFilePath (string p_filePath)
 
string getFilePath ()
 
void setFileName (string p_fileName)
 Set the original File Name where this ASSET was loaded.
 
string getFileName ()
 
void setLabel (string p_label)
 
string getLabel ()
 
void setSelected (bool p_selected)
 
bool isSelected ()
 
void setFocus ()
 
void setAssetType (KageAsset::AssetType p_assetType)
 
KageAsset::AssetType getAssetType ()
 
void forceRender ()
 
virtual bool invalidateToRender ()
 
void txtLabel_onEnter ()
 
void addEventsListener ()
 
void render (unsigned int p_assetID)
 

Data Fields

Glib::RefPtr< Gdk::Window > window
 
unsigned int assetID
 
Gtk::Entry _txtLabel
 

Static Public Attributes

static bool mouseIsDown = false
 
static Glib::RefPtr< Gdk::Pixbuf > iconASSET_IMAGE
 
static Glib::RefPtr< Gdk::Pixbuf > iconASSET_KAGE
 
static Glib::RefPtr< Gdk::Pixbuf > iconASSET_VIDEO
 

Protected Member Functions

virtual bool on_expose_event (GdkEventExpose *e)
 
virtual bool on_key_press_event (GdkEventKey *e) override
 
virtual bool on_key_release_event (GdkEventKey *e) override
 
virtual bool on_event (GdkEvent *e) override
 
bool on_draw (const Cairo::RefPtr< Cairo::Context > &cr) override
 

Protected Attributes

string _assetHash
 
bool _selected
 
KageAsset::AssetType _assetType
 
string _label
 
KageAssetManager_assetManager
 
string _filePath
 
string _fileName
 
unsigned int _renderAssetID
 
bool _CTRL
 

Detailed Description

forward declaration

Member Enumeration Documentation

◆ AssetType

Enumerator
ASSET_IMAGE 
ASSET_KAGE 
ASSET_VIDEO 

Constructor & Destructor Documentation

◆ KageAsset()

KageAsset::KageAsset ( KageAssetManager p_assetManager,
unsigned  p_assetID 
)
Here is the call graph for this function:

◆ ~KageAsset()

KageAsset::~KageAsset ( )
virtual

Member Function Documentation

◆ addEventsListener()

void KageAsset::addEventsListener ( )
Here is the caller graph for this function:

◆ forceRender()

void KageAsset::forceRender ( )
Here is the call graph for this function:

◆ getAssetHash()

string KageAsset::getAssetHash ( )

◆ getAssetType()

KageAsset::AssetType KageAsset::getAssetType ( )

◆ getFileName()

string KageAsset::getFileName ( )

◆ getFilePath()

string KageAsset::getFilePath ( )

◆ getLabel()

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

◆ invalidateToRender()

bool KageAsset::invalidateToRender ( )
virtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isSelected()

bool KageAsset::isSelected ( )
Here is the caller graph for this function:

◆ on_draw()

bool KageAsset::on_draw ( const Cairo::RefPtr< Cairo::Context > &  cr)
overrideprotected
Here is the call graph for this function:

◆ on_event()

bool KageAsset::on_event ( GdkEvent *  e)
overrideprotectedvirtual
Here is the call graph for this function:

◆ on_expose_event()

bool KageAsset::on_expose_event ( GdkEventExpose *  e)
protectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_key_press_event()

bool KageAsset::on_key_press_event ( GdkEventKey *  e)
overrideprotectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_key_release_event()

bool KageAsset::on_key_release_event ( GdkEventKey *  e)
overrideprotectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ render()

void KageAsset::render ( unsigned int  p_assetID)
Here is the call graph for this function:

◆ setAssetHash()

void KageAsset::setAssetHash ( string  p_assetHash)

When User imports a file, the original file is copied inside project file; the copied file name will be the Asset Hash.

See also
setFileName
Parameters
p_assetHash

◆ setAssetType()

void KageAsset::setAssetType ( KageAsset::AssetType  p_assetType)
Here is the call graph for this function:

◆ setFileName()

void KageAsset::setFileName ( string  p_fileName)

Set the original File Name where this ASSET was loaded.

See also
setAssetHash
Parameters
p_fileNamethe original File Name

◆ setFilePath()

void KageAsset::setFilePath ( string  p_filePath)

◆ setFocus()

void KageAsset::setFocus ( )

◆ setLabel()

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

◆ setSelected()

void KageAsset::setSelected ( bool  p_selected)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ txtLabel_onEnter()

void KageAsset::txtLabel_onEnter ( )
Here is the caller graph for this function:

Field Documentation

◆ _assetHash

string KageAsset::_assetHash
protected

◆ _assetManager

KageAssetManager* KageAsset::_assetManager
protected

◆ _assetType

KageAsset::AssetType KageAsset::_assetType
protected

◆ _CTRL

bool KageAsset::_CTRL
protected

◆ _fileName

string KageAsset::_fileName
protected

◆ _filePath

string KageAsset::_filePath
protected

◆ _label

string KageAsset::_label
protected

◆ _renderAssetID

unsigned int KageAsset::_renderAssetID
protected

◆ _selected

bool KageAsset::_selected
protected

◆ _txtLabel

Gtk::Entry KageAsset::_txtLabel

◆ assetID

unsigned int KageAsset::assetID

◆ iconASSET_IMAGE

Glib::RefPtr< Gdk::Pixbuf > KageAsset::iconASSET_IMAGE
static

◆ iconASSET_KAGE

Glib::RefPtr< Gdk::Pixbuf > KageAsset::iconASSET_KAGE
static

◆ iconASSET_VIDEO

Glib::RefPtr< Gdk::Pixbuf > KageAsset::iconASSET_VIDEO
static

◆ mouseIsDown

bool KageAsset::mouseIsDown = false
static

◆ window

Glib::RefPtr<Gdk::Window> KageAsset::window

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