]>
git.saurik.com Git - wxWidgets.git/blob - contrib/samples/ogl/studio/symbols.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: contrib/samples/ogl/studio/symbols.h
3 // Purpose: Symbol classes (symbol database)
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _STUDIO_SYMBOLS_H_
13 #define _STUDIO_SYMBOLS_H_
15 #include "wx/docview.h"
16 #include "wx/string.h"
18 #include "wx/ogl/ogl.h" // base header of OGL, includes and adjusts wx/deprecated/setup.h
22 * Represents information about a symbol.
25 class csSymbol
: public wxObject
28 csSymbol(const wxString
& name
, wxShape
* shape
);
31 inline void SetName(const wxString
& name
) { m_name
= name
; }
32 inline wxString
GetName() const { return m_name
; }
34 inline void SetShape(wxShape
* shape
) { m_shape
= shape
; }
35 inline wxShape
* GetShape() const { return m_shape
; }
37 inline void SetToolId(int id
) { m_toolId
= id
; }
38 inline int GetToolId() const { return m_toolId
; }
46 * A table of all possible shapes.
47 * We can use this to construct a palette, etc.
49 class csSymbolDatabase
: public wxObject
56 inline wxList
& GetSymbols() const { return (wxList
&) m_symbols
; }
59 void AddSymbol(csSymbol
* symbol
);
61 csSymbol
* FindSymbol(const wxString
& name
) const;
62 csSymbol
* FindSymbol(int toolId
) const;
63 wxBitmap
* CreateToolBitmap(csSymbol
* symbol
, const wxSize
& sz
);