1///////////////////////////////////////////////////////////////////////////// 2// Name: contrib/samples/ogl/ogledit/palette.h 3// Purpose: OGL sample palette 4// Author: Julian Smart 5// Modified by: 6// Created: 12/07/98 7// RCS-ID: $Id: palette.h 37440 2006-02-10 11:59:52Z ABX $ 8// Copyright: (c) Julian Smart 9// Licence: wxWindows licence 10///////////////////////////////////////////////////////////////////////////// 11 12#ifndef _OGLSAMPLE_PALETTE_H_ 13#define _OGLSAMPLE_PALETTE_H_ 14 15#include "wx/wx.h" 16#include "wx/string.h" 17#include "wx/deprecated/setup.h" 18#include "wx/deprecated/tbarsmpl.h" 19 20/* 21 * Object editor tool palette 22 * 23 */ 24 25// TODO for wxWin: wxToolBar95 cannot be moved to a non-0,0 position! 26// Needs to have a parent window... 27// So use a simple toolbar at present. 28// ABX: Simple toolbar is not available in default compilation 29// so I use wxToolBar anyway 30// #if 0 // def __WXGTK__ 31// #define TOOLPALETTECLASS wxToolBar 32// #else 33// #define TOOLPALETTECLASS wxToolBarSimple 34// #endif 35#define TOOLPALETTECLASS wxToolBar 36 37class EditorToolPalette: public TOOLPALETTECLASS 38{ 39 public: 40 int currentlySelected; 41 42 EditorToolPalette(wxWindow *parent, const wxPoint& pos = wxDefaultPosition, 43 const wxSize& size = wxDefaultSize, 44 long style = wxTB_VERTICAL); 45 bool OnLeftClick(int toolIndex, bool toggled); 46 void OnMouseEnter(int toolIndex); 47 void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); 48}; 49 50#define PALETTE_TOOL1 1 51#define PALETTE_TOOL2 2 52#define PALETTE_TOOL3 3 53#define PALETTE_TOOL4 4 54#define PALETTE_TOOL5 5 55#define PALETTE_TOOL6 6 56#define PALETTE_TOOL7 7 57#define PALETTE_TOOL8 8 58#define PALETTE_TOOL9 9 59#define PALETTE_ARROW 10 60 61#endif 62 // _OGLSAMPLE_PALETTE_H_ 63