Back to index

texmacs  1.0.7.15
aqua_gui.h
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : aqua_gui.hpp
00004 * DESCRIPTION: Aqua GUI class
00005 * COPYRIGHT  : (C) 2006 Massimiliano Gubinelli
00006 *******************************************************************************
00007 * This software falls under the GNU general public license version 3 or later.
00008 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00009 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00010 ******************************************************************************/
00011 
00012 #ifndef AQUA_GUI_H
00013 #define AQUA_GUI_H
00014 #include "mac_cocoa.h"
00015 #include "timer.hpp"
00016 #include "gui.hpp"
00017 #include "font.hpp"
00018 #include "widget.hpp" 
00019 #include "array.hpp"
00020 #include "hashmap.hpp"
00021 
00022 /******************************************************************************
00023 * The aqua_gui class
00024 ******************************************************************************/
00025 
00026 typedef class aqua_gui_rep* aqua_gui;
00027 extern aqua_gui the_gui;
00028 
00029 class aqua_gui_rep {
00030 public:
00031   bool interrupted;
00032   time_t interrupt_time;
00033   
00034     char*                        selection;
00035   hashmap<string,tree>         selection_t;
00036   hashmap<string,string>       selection_s;
00037 
00038 public:
00039   aqua_gui_rep(int& argc, char **argv);
00040   virtual ~aqua_gui_rep();
00041   
00042   
00043   /********************* extents, grabbing, selections ***********************/
00044   void   get_extents (SI& width, SI& height);
00045   void   get_max_size (SI& width, SI& height);
00046  // void   set_button_state (unsigned int state);
00047 
00048   /* important routines */
00049    void event_loop ();
00050   
00051   /* interclient communication */
00052   virtual bool get_selection (string key, tree& t, string& s);
00053   virtual bool set_selection (string key, tree t, string s);
00054   virtual void clear_selection (string key);
00055   
00056   /* miscellaneous */
00057   void image_gc (string name= "*");
00058   void set_mouse_pointer (string name);
00059   void set_mouse_pointer (string curs_name, string mask_name);
00060   void show_wait_indicator (widget w, string message, string arg);
00061   bool check_event (int type);
00062   
00063   void update();
00064   void update_fast ();
00065 
00066 };
00067 
00068 #endif // defined AQUA_GUI_H