Added GPLv3 headers all over the place.
[fail.git] / src / gui / gui.fidl
blob030dc57e31f011eb922c44691521b577d5b7806c
1 /*
2     Fail game engine
3     Copyright 2007 Antoine Chavasse <a.chavasse@gmail.com>
4  
5     This file is part of Fail.
7     Fail is free software; you can redistribute it and/or modify
8     it under the terms of the GNU General Public License version 3
9     as published by the Free Software Foundation.
11     Fail is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
16     You should have received a copy of the GNU General Public License
17     along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 #include "../scenegraph/scenegraph.fidl"
21 // The gui module is a set of interfaces that provide a subset of GUI widgets
22 // that are implemented both in the ingame gui and the Qt gui, allowing to
23 // create gui components that can be used both in the editor and ingame
24 // (for instance to reuse properties edition panels as ingame debugging gui)
26 // An abstract factory allows users to use either transparently.
28 // The qt sub module contains wrappers for some qt controls that have no
29 // equivalent in the ingame gui so they can be used from lua.
31 // The game sub module contains, in addition to the ingame gui implementation, 
32 // additional widgets that have no equivalent in the qt gui.
33 // It's also possible to create game gui widgets without going through
34 // the abstract factory to use some more specific features that have
35 // no equivalent in the qt wrappers (for instance, accessors to obtain the
36 // scenegraph objects generated by the game gui widgets)
38 // Both implementations will be available from within the tools and be able to be used
39 // at the same time (for instance, to display the actual ingame gui when playing directly in the
40 // 3d view)
41 // Only the game implementation will be available from within the game application.
42 namespace fail { namespace gui
44         [ Abstract=true GenericPtr=false ]
45         class Factory_i
46         {
47                 virtual Pointer< Window_i >             newWindow( Pointer< Container_i > pParent );
48                 virtual Pointer< HGroup_i >             newHGroup( Pointer< Container_i > pParent );
49                 virtual Pointer< VGroup_i >             newVGroup( Pointer< Container_i > pParent );
50                 virtual Pointer< Button_i >             newButton( Pointer< Container_i > pParent, string Label_ );
51                 virtual Pointer< RenderView_i > newRenderView(
52                         Pointer< Container_i > pParent,
53                         Pointer< scenegraph::Renderable > pRenderable,
54                         Pointer< scenegraph::ViewPort > pViewPort );
55         };
56         
57         class Widget_i
58         {
59                 virtual void show();
60         };
61         
62         class Container_i : Widget_i
63         {
64         };
65         
66         class Window_i : Container_i
67         {
68         };
69         
70         class HGroup_i : Container_i
71         {
72         };
73         
74         class VGroup_i : Container_i
75         {
76         };
77         
78         class Button_i : Widget_i
79         {
80                 Signal<> Depressed;
81                 string Label;
82         };
83         
84         class RenderView_i : Widget_i
85         {
86                 Pointer< scenegraph::Renderable >       pRenderable;
87                 Pointer< scenegraph::ViewPort >         pViewPort;
88         };