tahoma2d/toonz/sources/include/tw/toolbar.h

70 lines
1.3 KiB
C
Raw Normal View History

2016-05-17 03:04:11 +12:00
#pragma once
2016-03-19 06:57:51 +13:00
#ifndef TNZ_TOOLBAR_INCLUDED
#define TNZ_TOOLBAR_INCLUDED
//#include "tw/action.h"
#include "traster.h"
#include "tw/tw.h"
class TGenericCommandAction;
#undef DVAPI
#undef DVVAR
#ifdef TWIN_EXPORTS
#define DVAPI DV_EXPORT_API
#define DVVAR DV_EXPORT_VAR
#else
#define DVAPI DV_IMPORT_API
#define DVVAR DV_IMPORT_VAR
#endif
class TButtonSet;
//---------------------------------------------------------------
2016-06-15 18:43:10 +12:00
class DVAPI TToolButtonInfo {
string m_name;
TRaster32P m_downIcon, m_upIcon;
TGenericCommandAction *m_action;
TButtonSet *m_buttonSet;
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
TToolButtonInfo(string name);
~TToolButtonInfo();
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void setAction(TGenericCommandAction *action);
void setIcon(TRaster32P upIcon, TRaster32P downIcon);
void setIcon(TRaster32P icon);
void setButtonSet(TButtonSet *bs);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
TWidget *createToolButton(TWidget *parent);
string getName() const { return m_name; };
2016-03-19 06:57:51 +13:00
};
//---------------------------------------------------------------
2016-06-15 18:43:10 +12:00
class DVAPI TToolbar : public TWidget {
TWidget *m_dockWidget;
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
// static TGuiColor ToolbarColor;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
class DVAPI Space : public TWidget {
public:
Space(TWidget *parent);
void draw();
};
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
TToolbar(TWidget *parent, string name);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void draw();
void configureNotify(const TDimension &size);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void leftButtonDown(const TMouseEvent &);
void close();
2016-03-19 06:57:51 +13:00
};
#endif