Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef TNZ_TOOLBAR_INCLUDED
Toshihiro Shimizu 890ddd
#define TNZ_TOOLBAR_INCLUDED
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//#include "tw/action.h"
Toshihiro Shimizu 890ddd
#include "traster.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tw/tw.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class TGenericCommandAction;
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 TButtonSet;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//---------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
class DVAPI TToolButtonInfo {
Shinya Kitaoka 120a6e
  string m_name;
Shinya Kitaoka 120a6e
  TRaster32P m_downIcon, m_upIcon;
Shinya Kitaoka 120a6e
  TGenericCommandAction *m_action;
Shinya Kitaoka 120a6e
  TButtonSet *m_buttonSet;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  TToolButtonInfo(string name);
Shinya Kitaoka 120a6e
  ~TToolButtonInfo();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void setAction(TGenericCommandAction *action);
Shinya Kitaoka 120a6e
  void setIcon(TRaster32P upIcon, TRaster32P downIcon);
Shinya Kitaoka 120a6e
  void setIcon(TRaster32P icon);
Shinya Kitaoka 120a6e
  void setButtonSet(TButtonSet *bs);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TWidget *createToolButton(TWidget *parent);
Shinya Kitaoka 120a6e
  string getName() const { return m_name; };
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//---------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
class DVAPI TToolbar : public TWidget {
Shinya Kitaoka 120a6e
  TWidget *m_dockWidget;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  // static TGuiColor ToolbarColor;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  class DVAPI Space : public TWidget {
Shinya Kitaoka 120a6e
  public:
Shinya Kitaoka 120a6e
    Space(TWidget *parent);
Shinya Kitaoka 120a6e
    void draw();
Shinya Kitaoka 120a6e
  };
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TToolbar(TWidget *parent, string name);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void draw();
Shinya Kitaoka 120a6e
  void configureNotify(const TDimension &size);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void leftButtonDown(const TMouseEvent &);
Shinya Kitaoka 120a6e
  void close();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif