Blame toonz/sources/include/tw/fxbrowser.h
|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef TNZ_FXBROWSER_INCLUDED
|
|
Toshihiro Shimizu |
890ddd |
#define TNZ_FXBROWSER_INCLUDED
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "tw/tw.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tw/treeview.h"
|
|
Toshihiro Shimizu |
890ddd |
//#include "tfilepath.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
// forward declaration
|
|
Toshihiro Shimizu |
890ddd |
class TFx;
|
|
Toshihiro Shimizu |
890ddd |
class TFilePath;
|
|
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 |
//--------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class FxBuilder {
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
virtual ~FxBuilder() {}
|
|
Shinya Kitaoka |
120a6e |
virtual TFx *create() = 0;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//--------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class DVAPI TFxBrowser : public TTreeView {
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
class DoubleClickListener {
|
|
Shinya Kitaoka |
120a6e |
public:
|
|
Shinya Kitaoka |
120a6e |
virtual void onDoubleClick() = 0;
|
|
Shinya Kitaoka |
120a6e |
virtual ~DoubleClickListener() {}
|
|
Shinya Kitaoka |
120a6e |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class FxLoader;
|
|
Shinya Kitaoka |
120a6e |
class MacroFxFolderItem;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
string m_selectedFxId;
|
|
Shinya Kitaoka |
120a6e |
DoubleClickListener *m_doubleClickListener;
|
|
Shinya Kitaoka |
120a6e |
FxLoader *m_fxLoader;
|
|
Shinya Kitaoka |
120a6e |
MacroFxFolderItem *m_macroFxFolderItem;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TFxBrowser(TWidget *parent, const TFilePath &fxListPath,
|
|
Shinya Kitaoka |
120a6e |
const TFilePath &fxPresetFolder, string name = "fxBrowser");
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
~TFxBrowser();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
string getSelectedFxId() const;
|
|
Shinya Kitaoka |
120a6e |
FxBuilder *getSelectedFxBuilder() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void onSelect(TTreeViewItem *item);
|
|
Shinya Kitaoka |
120a6e |
void leftButtonDoubleClick(const TMouseEvent &e);
|
|
Shinya Kitaoka |
120a6e |
void rightButtonDown(const TMouseEvent &) {}
|
|
Shinya Kitaoka |
120a6e |
void mouseWheel(const TMouseEvent &, int wheel);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void setDoubleClickListener(DoubleClickListener *listener);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void updatePresets();
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif
|