30
30
class IconTexture : public nux::TextureArea, public unity::Introspectable
33
IconTexture (nux::BaseTexture *texture, guint width, guint height);
34
IconTexture (const char *icon_name, unsigned int size, bool defer_icon_loading=false);
37
void SetByIconName (const char *icon_name, unsigned int size);
38
void SetByFilePath (const char *file_path, unsigned int size);
39
void GetTextureSize (int *width, int *height);
43
void SetOpacity (float opacity);
44
void SetTexture (nux::BaseTexture *texture);
33
IconTexture(nux::BaseTexture* texture, guint width, guint height);
34
IconTexture(const char* icon_name, unsigned int size, bool defer_icon_loading = false);
37
void SetByIconName(const char* icon_name, unsigned int size);
38
void SetByFilePath(const char* file_path, unsigned int size);
39
void GetTextureSize(int* width, int* height);
43
void SetOpacity(float opacity);
44
void SetTexture(nux::BaseTexture* texture);
46
46
void SetAcceptKeyNavFocus(bool accept);
50
50
virtual bool AcceptKeyNavFocus();
51
51
bool _accept_key_nav_focus;
53
const gchar* GetName ();
54
void AddProperties (GVariantBuilder *builder);
55
virtual bool DoCanFocus ();
53
const gchar* GetName();
54
void AddProperties(GVariantBuilder* builder);
55
virtual bool DoCanFocus();
58
void Draw (nux::GraphicsEngine& GfxContext, bool force_draw);
60
void CreateTextureCallback (const char *texid, int width, int height, nux::BaseTexture **texture);
61
void Refresh (GdkPixbuf *pixbuf);
62
void IconLoaded (const char *icon_name, guint size, GdkPixbuf *pixbuf);
58
void Draw(nux::GraphicsEngine& GfxContext, bool force_draw);
60
void CreateTextureCallback(const char* texid, int width, int height, nux::BaseTexture** texture);
61
void Refresh(GdkPixbuf* pixbuf);
62
void IconLoaded(const char* icon_name, guint size, GdkPixbuf* pixbuf);
65
65
unsigned int _size;
67
GdkPixbuf *_pixbuf_cached;
68
nux::BaseTexture *_texture_cached;
67
GdkPixbuf* _pixbuf_cached;
68
nux::BaseTexture* _texture_cached;
69
69
int _texture_width;
70
70
int _texture_height;