Blame toonz/sources/include/tw/stylecontrol.h
|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef TNZ_STYLECONTROL_INCLUDED
|
|
Toshihiro Shimizu |
890ddd |
#define TNZ_STYLECONTROL_INCLUDED
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "tw/action.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#undef DVAPI
|
|
Toshihiro Shimizu |
890ddd |
#undef DVVAR
|
|
Toshihiro Shimizu |
890ddd |
#ifdef TWIN_EXPORTS
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_EXPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_EXPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_IMPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_IMPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class TColorStyle;
|
|
Toshihiro Shimizu |
890ddd |
class TPalette;
|
|
Toshihiro Shimizu |
890ddd |
class TLevel;
|
|
Toshihiro Shimizu |
890ddd |
class TFilePath;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class DVAPI TStyleControl : public TWidget, public TCommandSource {
|
|
Shinya Kitaoka |
120a6e |
class Data;
|
|
Shinya Kitaoka |
120a6e |
Data *m_data;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
enum {
|
|
Shinya Kitaoka |
120a6e |
COLOR_PAGE = 0x01,
|
|
Shinya Kitaoka |
120a6e |
TEXTURE_PAGE = 0x02,
|
|
Shinya Kitaoka |
120a6e |
SPECIAL_PAGE = 0x04,
|
|
Shinya Kitaoka |
120a6e |
CUSTOM_PAGE = 0x08,
|
|
Shinya Kitaoka |
120a6e |
SETTINGS_PAGE = 0x10,
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
NO_PAGES = 0x00,
|
|
Shinya Kitaoka |
120a6e |
ALL_PAGES = 0x1F
|
|
Shinya Kitaoka |
120a6e |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
enum { ALL_STYLES = 0x01, VECTOR_SYLES_ONLY = 0x02 };
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
TStyleControl(TWidget *parent, const TFilePath &rootDir,
|
|
Shinya Kitaoka |
120a6e |
int styleFilter = ALL_STYLES);
|
|
Shinya Kitaoka |
120a6e |
~TStyleControl();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void setActivePages(unsigned long pageMask);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void configureNotify(const TDimension &);
|
|
Shinya Kitaoka |
120a6e |
void draw();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void setStyle(TPalette *palette, int styleIndex);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
const TColorStyle *getCurrentStyle() const;
|
|
Shinya Kitaoka |
120a6e |
int getCurrentStyleIndex() const;
|
|
Shinya Kitaoka |
120a6e |
TPalette *getPalette() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
virtual void onChangeStyleParam(bool dragging) {}
|
|
Shinya Kitaoka |
120a6e |
virtual void onChangeStyleNumericParam(int paramIndex, bool dragging) {
|
|
Shinya Kitaoka |
120a6e |
onChangeStyleParam(dragging);
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void refreshCurrentPage();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void setAutoApply(bool on);
|
|
Shinya Kitaoka |
120a6e |
bool getAutoApply() const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif
|