]> git.saurik.com Git - wxWidgets.git/blame - contrib/samples/ogl/studio/symbols.h
Fixed stream test.
[wxWidgets.git] / contrib / samples / ogl / studio / symbols.h
CommitLineData
1fc25a89
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: symbols.h
3// Purpose: Symbol classes (symbol database)
4// Author: Julian Smart
5// Modified by:
6// Created: 12/07/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
9// Licence:
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _STUDIO_SYMBOLS_H_
13#define _STUDIO_SYMBOLS_H_
14
ab7ce33c 15#if defined(__GNUG__) && !defined(__APPLE__)
1fc25a89
JS
16// #pragma interface
17#endif
18
19#include <wx/docview.h>
20#include <wx/string.h>
3b69115c
JS
21
22#include <wx/deprecated/setup.h>
23#include <wx/deprecated/wxexpr.h>
1fc25a89
JS
24
25#include <wx/ogl/ogl.h>
26
27/*
28 * csSymbol
29 * Represents information about a symbol.
30 */
31
32class csSymbol: public wxObject
33{
34public:
35 csSymbol(const wxString& name, wxShape* shape);
36 ~csSymbol();
37
38 inline void SetName(const wxString& name) { m_name = name; }
39 inline wxString GetName() const { return m_name; }
40
41 inline void SetShape(wxShape* shape) { m_shape = shape; }
42 inline wxShape* GetShape() const { return m_shape; }
43
44 inline void SetToolId(int id) { m_toolId = id; }
45 inline int GetToolId() const { return m_toolId; }
46protected:
47 wxString m_name;
48 wxShape* m_shape;
49 int m_toolId;
50};
51
52/*
53 * A table of all possible shapes.
54 * We can use this to construct a palette, etc.
55 */
56class csSymbolDatabase: public wxObject
57{
58public:
59 csSymbolDatabase();
60 ~csSymbolDatabase();
61
62// Accessors
63 inline wxList& GetSymbols() const { return (wxList&) m_symbols; }
64
65// Operations
66 void AddSymbol(csSymbol* symbol);
67 void ClearSymbols();
68 csSymbol* FindSymbol(const wxString& name) const;
69 csSymbol* FindSymbol(int toolId) const;
0a0352f2 70 wxBitmap* CreateToolBitmap(csSymbol* symbol, const wxSize& sz);
1fc25a89
JS
71
72protected:
73 wxList m_symbols;
74 int m_currentId;
75};
76
77#endif
78 // _STUDIO_SYMBOLS_H_