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
|
Rev | Line | |
---|
[319] | 1 | // Copyright (C) 2012-2014 ChaosForge Ltd
|
---|
[66] | 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 |
|
---|
[319] | 16 | #include <nv/core/common.hh>
|
---|
| 17 | #include <nv/core/handle.hh>
|
---|
[351] | 18 | #include <nv/core/flags.hh>
|
---|
[66] | 19 |
|
---|
| 20 | namespace nv
|
---|
| 21 | {
|
---|
| 22 | namespace gui
|
---|
| 23 | {
|
---|
[351] | 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 |
|
---|
[66] | 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 |
|
---|
[69] | 43 | class render_data
|
---|
| 44 | {
|
---|
| 45 | public:
|
---|
[108] | 46 | virtual ~render_data(){}
|
---|
[69] | 47 | };
|
---|
| 48 |
|
---|
| 49 | class element;
|
---|
| 50 | class environment;
|
---|
[108] | 51 | class renderer;
|
---|
[69] | 52 |
|
---|
[270] | 53 | typedef nv::handle<> handle;
|
---|
| 54 |
|
---|
[351] | 55 | typedef nv::flags< 32, flag > flags;
|
---|
| 56 |
|
---|
[66] | 57 | } // namespace gui
|
---|
| 58 |
|
---|
| 59 | } // namespace nv
|
---|
| 60 |
|
---|
| 61 | #endif // NV_GUI_ELEMENT_HH
|
---|
Note: See
TracBrowser
for help on using the repository browser.