|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef TNZ_TABBEDWINDOW_INCLUDED
|
|
Toshihiro Shimizu |
890ddd |
#define TNZ_TABBEDWINDOW_INCLUDED
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "tw/tw.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 |
/*
|
|
Toshihiro Shimizu |
890ddd |
class DVAPI TTabbedWindow : public TWidget {
|
|
Toshihiro Shimizu |
890ddd |
class Data;
|
|
Toshihiro Shimizu |
890ddd |
Data *m_data;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
TTabbedWindow(TWidget *parent, string name = "tabbedWindow");
|
|
Toshihiro Shimizu |
890ddd |
~TTabbedWindow();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void addPanel(TWidget *panel);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getTabCount() const;
|
|
Toshihiro Shimizu |
890ddd |
string getTabName(int i) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TWidget *getCurrentPanel() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void repaint();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void leftButtonDown(const TMouseEvent &e);
|
|
Toshihiro Shimizu |
890ddd |
void leftButtonDrag(const TMouseEvent &e);
|
|
Toshihiro Shimizu |
890ddd |
void leftButtonUp (const TMouseEvent &e);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void configureNotify(const TDimension &d);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class DVAPI TTabbedWidget : public TWidget {
|
|
Shinya Kitaoka |
120a6e |
int m_currentPageIndex;
|
|
Shinya Kitaoka |
120a6e |
TGuiColor m_tabColor, m_tabHlColor;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TTabbedWidget(TWidget *parent, string name = "tabbedwidget");
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void configureNotify(const TDimension &d);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
int page2x0(int index) const;
|
|
Shinya Kitaoka |
120a6e |
int page2x1(int index) const;
|
|
Shinya Kitaoka |
120a6e |
int x2page(int x) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
virtual void drawTab(const TRect &rect, int index);
|
|
Shinya Kitaoka |
120a6e |
virtual void onPageChange(TWidget *oldPage, TWidget *newPage) {}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
TWidget *getCurrentPage() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void repaint();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void leftButtonDown(const TMouseEvent &e);
|
|
Shinya Kitaoka |
120a6e |
void leftButtonDrag(const TMouseEvent &e);
|
|
Shinya Kitaoka |
120a6e |
void leftButtonUp(const TMouseEvent &e);
|
|
Shinya Kitaoka |
120a6e |
void mouseMove(const TMouseEvent &e);
|
|
Shinya Kitaoka |
120a6e |
void enter(const TPoint &p);
|
|
Shinya Kitaoka |
120a6e |
void leave(const TPoint &p);
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif
|