source: abuse/trunk/src/imlib/include/status.hpp @ 2

Last change on this file since 2 was 2, checked in by Sam Hocevar, 14 years ago
  • imported original 0.7.0 tarball
File size: 880 bytes
Line 
1#ifndef __STATUS_HPP_
2#define __STATUS_HPP_
3
4#include "visobj.hpp"      // get visual object declaration
5
6
7class status_manager
8{
9  public :
10  virtual void push(char *name, visual_object *show) = 0;
11  virtual void update(int percentage) = 0;
12  virtual void pop() = 0;
13  virtual void force_display() { ; }
14} ;
15
16
17class text_status_node;
18
19class text_status_manager : public status_manager
20{
21  public :
22  int level;
23  text_status_node *first;
24  text_status_manager();
25  virtual void push(char *name, visual_object *show);
26  virtual void update(int percentage);
27  virtual void pop();
28} ;
29
30
31extern status_manager *stat_man;
32
33class stack_stat  // something you can declare on the stact that is sure to get cleaned up
34{
35  public :
36  stack_stat(char *st, visual_object *show=NULL) { if (stat_man) stat_man->push(st,show); }
37  ~stack_stat() { if (stat_man) stat_man->pop(); }
38} ;
39
40
41#endif
42
Note: See TracBrowser for help on using the repository browser.