]> git.tdb.fi Git - libs/gltk.git/blob - source/userinterface.cpp
Add UserInterface class
[libs/gltk.git] / source / userinterface.cpp
1 /* $Id$
2
3 This file is part of libmspgltk
4 Copyright © 2008  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #include "userinterface.h"
9
10 namespace Msp {
11 namespace GLtk {
12
13 UserInterface::UserInterface(Resources &r, Graphics::Window &w):
14         root(r, w)
15 { }
16
17
18 UserInterface::Loader::Loader(UserInterface &u):
19         ui(u)
20 {
21         add("logic", &Loader::logic);
22         add("root",  &Loader::root);
23 }
24
25 void UserInterface::Loader::logic()
26 {
27         load_sub(ui.logic, ui.widgets);
28 }
29
30 void UserInterface::Loader::root()
31 {
32         load_sub(ui.root, ui.widgets);
33 }
34
35 } // namespace GLtk
36 } // namespace Msp