Last change
on this file since 351 was
351,
checked in by epyon, 10 years ago
|
- gui hover and selected support
- minor changes
|
File size:
1.1 KB
|
Line | |
---|
1 | // Copyright (C) 2012-2014 ChaosForge Ltd
|
---|
2 | // http://chaosforge.org/
|
---|
3 | //
|
---|
4 | // This file is part of NV Libraries.
|
---|
5 | // For conditions of distribution and use, see copyright notice in nv.hh
|
---|
6 |
|
---|
7 | /**
|
---|
8 | * @file gui_common.hh
|
---|
9 | * @author Kornel Kisielewicz
|
---|
10 | * @brief common GUI
|
---|
11 | */
|
---|
12 |
|
---|
13 | #ifndef NV_GUI_COMMON_HH
|
---|
14 | #define NV_GUI_COMMON_HH
|
---|
15 |
|
---|
16 | #include <nv/core/common.hh>
|
---|
17 | #include <nv/core/handle.hh>
|
---|
18 | #include <nv/core/flags.hh>
|
---|
19 |
|
---|
20 | namespace nv
|
---|
21 | {
|
---|
22 | namespace gui
|
---|
23 | {
|
---|
24 | enum flag
|
---|
25 | {
|
---|
26 | ENABLED, //!< GUI element accepts events
|
---|
27 | VISIBLE, //!< GUI element visible
|
---|
28 | DIRTY, //!< GUI element needs redraw
|
---|
29 | SELECTED, //!< GUI element selected
|
---|
30 | HOVER, //!< GUI element in hover zone
|
---|
31 | };
|
---|
32 |
|
---|
33 | enum alignment
|
---|
34 | {
|
---|
35 | ALIGN_TOP,
|
---|
36 | ALIGN_BOTTOM,
|
---|
37 | ALIGN_CENTER,
|
---|
38 | ALIGN_SCALE,
|
---|
39 | ALIGN_LEFT = ALIGN_TOP,
|
---|
40 | ALIGN_RIGHT = ALIGN_BOTTOM,
|
---|
41 | };
|
---|
42 |
|
---|
43 | class render_data
|
---|
44 | {
|
---|
45 | public:
|
---|
46 | virtual ~render_data(){}
|
---|
47 | };
|
---|
48 |
|
---|
49 | class element;
|
---|
50 | class environment;
|
---|
51 | class renderer;
|
---|
52 |
|
---|
53 | typedef nv::handle<> handle;
|
---|
54 |
|
---|
55 | typedef nv::flags< 32, flag > flags;
|
---|
56 |
|
---|
57 | } // namespace gui
|
---|
58 |
|
---|
59 | } // namespace nv
|
---|
60 |
|
---|
61 | #endif // NV_GUI_ELEMENT_HH
|
---|
Note: See
TracBrowser
for help on using the repository browser.