Kage Studio 0.7.240121
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_NULL , ASSET_IMAGE , ASSET_KAGE , ASSET_VIDEO }
 

Public Member Functions

 KageAsset (KageAssetManager *p_assetManager, unsigned p_assetID)
 
virtual ~KageAsset ()
 
void setAssetHash (std::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.
 
std::string getAssetHash ()
 
void setFilePath (std::string p_filePath)
 
std::string getFilePath ()
 
void setFileName (std::string p_fileName)
 Set the original File Name where this ASSET was loaded.
 
std::string getFileName ()
 
void setLabel (std::string p_label)
 
std::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)
 
void render ()
 

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

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

Detailed Description

forward declaration

Member Enumeration Documentation

◆ AssetType

Enumerator
ASSET_NULL 
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()

std::string KageAsset::getAssetHash ( )

◆ getAssetType()

KageAsset::AssetType KageAsset::getAssetType ( )

◆ getFileName()

std::string KageAsset::getFileName ( )

◆ getFilePath()

std::string KageAsset::getFilePath ( )

◆ getLabel()

std::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() [1/2]

void KageAsset::render ( )

◆ render() [2/2]

void KageAsset::render ( unsigned int p_assetID)

◆ setAssetHash()

void KageAsset::setAssetHash ( std::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 ( std::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 ( std::string p_filePath)

◆ setFocus()

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

◆ setLabel()

void KageAsset::setLabel ( std::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

std::string KageAsset::_assetHash
protected

◆ _assetManager

KageAssetManager* KageAsset::_assetManager
protected

◆ _assetType

KageAsset::AssetType KageAsset::_assetType
protected

◆ _CTRL

bool KageAsset::_CTRL
protected

◆ _fileName

std::string KageAsset::_fileName
protected

◆ _filePath

std::string KageAsset::_filePath
protected

◆ _label

std::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: