]>
git.saurik.com Git - wxWidgets.git/blob - contrib/samples/ogl/studio/cspalette.h
8583f85d5aaa5265b3979076315e45f4cc658805
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: OGL sample palette
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _STUDIO_CSPALETTE_H_
13 #define _STUDIO_CSPALETTE_H_
15 #if defined(__GNUG__) && !defined(__APPLE__)
20 #include <wx/string.h>
21 #include <wx/deprecated/tbarsmpl.h>
24 * Object editor tool palette
28 // TODO for wxWin: wxToolBar95 cannot be moved to a non-0,0 position!
29 // Needs to have a parent window...
30 // So use a simple toolbar at present.
31 // ABX: Simple toolbar is not available in default compilation and is deprecated
32 // so I use wxToolBar anyway
33 // #define TOOLPALETTECLASS wxToolBarSimple
34 #define TOOLPALETTECLASS wxToolBar
36 class csEditorToolPalette
: public TOOLPALETTECLASS
40 csEditorToolPalette(wxWindow
*parent
, wxWindowID id
= wxID_ANY
, const wxPoint
& pos
= wxDefaultPosition
,
41 const wxSize
& size
= wxDefaultSize
,
42 long style
= wxTB_VERTICAL
);
44 bool OnLeftClick(int toolIndex
, bool toggled
);
45 void OnMouseEnter(int toolIndex
);
47 inline int GetSelection() const { return m_currentlySelected
; }
48 void SetSelection(int sel
);
50 void SetSize(int x
, int y
, int width
, int height
, int sizeFlags
= wxSIZE_AUTO
);
53 int m_currentlySelected
;
56 #define PALETTE_ARROW 200
57 #define PALETTE_TEXT_TOOL 201
60 // _STUDIO_CSPALETTE_H_