1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
/*
$Id: gui_manager.h,v 1.31 2001/12/11 21:48:59 mbn Exp $
------------------------------------------------------------------------
ClanLib, the platform independent game SDK.
This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
version 2. See COPYING for details.
For a total list of contributers see CREDITS.
See http://www.clanlib.org
------------------------------------------------------------------------
*/
//! clanGUI="Framework"
//! header=gui.h
#ifndef header_gui_manager
#define header_gui_manager
#include <stddef.h>
#include "component.h"
class CL_ComponentManager;
class CL_StyleManager;
class CL_GUIManager_Generic;
//: Root component.
// The GUI manager component is the 'root component' of any GUI system. It
// is responsible channeling input and output from the general clanlib display
// API and into the GUI system.
// The GUI manager must to be the top-level component in any component tree.
// Modal dialog interfaces in clanGUI is archived by constructing a GUI manager
// with a parent component. This will disable the input of the previous GUI, but
// will keep calling its painting signals.
class CL_GUIManager : public CL_Component
{
//! Construction:
public:
//: GUI Manager Constructor
CL_GUIManager(CL_StyleManager *style);
//: GUI Manager Constructor
CL_GUIManager(CL_Component *parent, CL_StyleManager *style);
//: GUI Manager Destructor
virtual ~CL_GUIManager();
//! Attributes:
public:
//: Returns the currently focused component.
CL_Component *get_focus();
//! Operations:
public:
//: Sets the focus component of the gui.
void set_focus(CL_Component *component);
//: Draws the GUI once.
void show();
//: Redraws the GUI continuosly.
void run();
//: Break run loop.
void quit();
//: Tells the GUI to start accepting input.
void enable_input();
//: Tells the GUI to stop accepting input.
void disable_input();
//: Sets the GUI in capture mode. [should we move this out of API space? -- mbn]
void gui_capture_mouse(CL_Component *component);
//: Takes GUI out of capture mode. [should we move this out of API space? -- mbn]
void gui_release_mouse();
//! Implementation:
private:
CL_GUIManager_Generic *impl;
};
#endif
|