]> git.saurik.com Git - wxWidgets.git/blame - contrib/samples/ogl/studio/symbols.h
stub for wxOS2 region ctor from points.
[wxWidgets.git] / contrib / samples / ogl / studio / symbols.h
CommitLineData
1fc25a89 1/////////////////////////////////////////////////////////////////////////////
f4ec6bd2 2// Name: contrib/samples/ogl/studio/symbols.h
1fc25a89
JS
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
f4ec6bd2 9// Licence: wxWindows licence
1fc25a89
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _STUDIO_SYMBOLS_H_
13#define _STUDIO_SYMBOLS_H_
14
f4ec6bd2
WS
15#include "wx/docview.h"
16#include "wx/string.h"
3b69115c 17
f4ec6bd2 18#include "wx/ogl/ogl.h" // base header of OGL, includes and adjusts wx/deprecated/setup.h
1fc25a89
JS
19
20/*
21 * csSymbol
22 * Represents information about a symbol.
23 */
24
25class csSymbol: public wxObject
26{
27public:
28 csSymbol(const wxString& name, wxShape* shape);
29 ~csSymbol();
30
31 inline void SetName(const wxString& name) { m_name = name; }
32 inline wxString GetName() const { return m_name; }
33
34 inline void SetShape(wxShape* shape) { m_shape = shape; }
35 inline wxShape* GetShape() const { return m_shape; }
36
37 inline void SetToolId(int id) { m_toolId = id; }
38 inline int GetToolId() const { return m_toolId; }
39protected:
40 wxString m_name;
41 wxShape* m_shape;
42 int m_toolId;
43};
44
45/*
46 * A table of all possible shapes.
47 * We can use this to construct a palette, etc.
48 */
49class csSymbolDatabase: public wxObject
50{
51public:
52 csSymbolDatabase();
53 ~csSymbolDatabase();
54
55// Accessors
56 inline wxList& GetSymbols() const { return (wxList&) m_symbols; }
57
58// Operations
59 void AddSymbol(csSymbol* symbol);
60 void ClearSymbols();
61 csSymbol* FindSymbol(const wxString& name) const;
62 csSymbol* FindSymbol(int toolId) const;
0a0352f2 63 wxBitmap* CreateToolBitmap(csSymbol* symbol, const wxSize& sz);
1fc25a89
JS
64
65protected:
66 wxList m_symbols;
67 int m_currentId;
68};
69
70#endif
71 // _STUDIO_SYMBOLS_H_