Back to index

texmacs  1.0.7.15
Classes | Functions | Variables
aqua_gui.mm File Reference
#include "iterator.hpp"
#include "dictionary.hpp"
#include "aqua_gui.h"
#include "analyze.hpp"
#include <locale.h>
#include "language.hpp"
#include "message.hpp"
#include "aqua_renderer.h"

Go to the source code of this file.

Classes

class  TMHelper
class  TMInterposer

Functions

static bool check_mask (int mask)
void gui_interpose (void(*r)(void))
void update ()
void gui_open (int &argc2, char **argv2)
void gui_start_loop ()
void gui_close ()
void gui_root_extents (SI &width, SI &height)
void gui_maximal_extents (SI &width, SI &height)
void gui_refresh ()
void set_default_font (string name)
font get_default_font (bool tt, bool mini, bool bold)
void load_system_font (string family, int size, int dpi, font_metric &fnm, font_glyphs &fng)
bool set_selection (string key, tree t, string s, string format)
bool get_selection (string key, tree &t, string &s, string format)
void clear_selection (string key)
void beep ()
void needs_update ()
bool check_event (int type)
void image_gc (string name)
void show_help_balloon (widget balloon, SI x, SI y)
void show_wait_indicator (widget base, string message, string argument)
void external_event (string type, time_t t)
font x_font (string family, int size, int dpi)

Variables

aqua_gui_repthe_gui = NULL
int nr_windows = 0
bool aqua_update_flag = false
int time_credit
int timeout_time
void(* the_interpose_handler )(void) = NULL
static NSAutoreleasePool * pool = nil
int char_clip = 0

Function Documentation

void beep ( )

Definition at line 486 of file aqua_gui.mm.

        {
  // Issue a beep
  NSBeep();
}
bool check_event ( int  type)

Definition at line 496 of file aqua_gui.mm.

{ return the_gui->check_event(type); }

Here is the call graph for this function:

static bool check_mask ( int  mask) [static]

Definition at line 151 of file aqua_gui.mm.

{
  NSEvent * event = [NSApp nextEventMatchingMask:mask
                             untilDate:nil
                                inMode:NSDefaultRunLoopMode 
                               dequeue:NO];
 // if (event != nil) NSLog(@"%@",event);
  return (event != nil);
  
}
void clear_selection ( string  key)

Definition at line 475 of file aqua_gui.mm.

                             {
  the_gui->clear_selection (key);
}

Here is the call graph for this function:

void external_event ( string  type,
time_t  t 
)

Definition at line 524 of file aqua_gui.mm.

                                       {
  // External events, such as pushing a button of a remote infrared commander
#if 0
  QTMWidget *tm_focus = qobject_cast<QTMWidget*>(qApp->focusWidget());
  if (tm_focus) {
    simple_widget_rep *wid = tm_focus->tm_widget();
    if (wid) the_gui -> process_keypress (wid, type, t);
  }
#endif
}

Here is the call graph for this function:

font get_default_font ( bool  tt,
bool  mini,
bool  bold 
)

Definition at line 432 of file aqua_gui.mm.

                                                 {
  (void) tt; (void) mini;
  // get the default font or monospaced font (if tt is true)
       
  // return a null font since this function is not called in the Qt port.
  if (DEBUG_EVENTS) cout << "get_default_font(): SHOULD NOT BE CALLED\n";
  return NULL;
  //return tex_font (this, "ecrm", 10, 300, 0);
}
bool get_selection ( string  key,
tree t,
string s,
string  format 
)

Definition at line 468 of file aqua_gui.mm.

                                                              { 
  (void) format;
  return the_gui->get_selection (key, t, s);
}

Here is the call graph for this function:

void gui_close ( )

Definition at line 392 of file aqua_gui.mm.

{
  ASSERT (the_gui != NULL, "gui not yet open");
  [pool release];
  tm_delete (the_gui);
  the_gui=NULL;
}

Here is the call graph for this function:

void gui_interpose ( void(*)(void)  r)

Definition at line 211 of file aqua_gui.mm.

void gui_maximal_extents ( SI width,
SI height 
)

Definition at line 407 of file aqua_gui.mm.

                                            {
  // get the maximal size of a window (can be larger than the screen size)
  the_gui->get_max_size (width, height);
}

Here is the call graph for this function:

void gui_open ( int &  argc2,
char **  argv2 
)

Definition at line 370 of file aqua_gui.mm.

{
  if (!NSApp) {
    // initialize app
    [NSApplication sharedApplication];
    [NSBundle loadNibNamed:@"MainMenu" owner:NSApp];
  }
  if (!pool) {
    // create autorelease pool 
    pool = [[NSAutoreleasePool alloc] init];
  } else [pool retain];
  
  the_gui = tm_new <aqua_gui_rep> (argc2, argv2);
}
void gui_refresh ( )

Definition at line 412 of file aqua_gui.mm.

{
  // update and redraw all windows (e.g. on change of output language)
  // FIXME: add suitable code
}
void gui_root_extents ( SI width,
SI height 
)

Definition at line 401 of file aqua_gui.mm.

                                         {   
       // get the screen size
  the_gui->get_extents (width, height);
}

Here is the call graph for this function:

void gui_start_loop ( )

Definition at line 386 of file aqua_gui.mm.

{
  the_gui->event_loop ();
}

Here is the call graph for this function:

void image_gc ( string  name)

Definition at line 501 of file aqua_gui.mm.

                            {
  // Garbage collect images of a given name (may use wildcards)
  // This routine only needs to be implemented if you use your own image cache
  the_aqua_renderer()->image_gc(name); 
}

Here is the call graph for this function:

void load_system_font ( string  family,
int  size,
int  dpi,
font_metric fnm,
font_glyphs &  fng 
)

Definition at line 446 of file aqua_gui.mm.

{
       (void) family; (void) size; (void) dpi; (void) fnm; (void) fng;
       if (DEBUG_EVENTS) cout << "load_system_font(): SHOULD NOT BE CALLED\n";
}
void needs_update ( )

Definition at line 492 of file aqua_gui.mm.

                {
  aqua_update_flag= true;
}
void set_default_font ( string  name)

Definition at line 425 of file aqua_gui.mm.

                               {
       (void) name;
  // set the name of the default font
  // this is ignored since Qt handles fonts for the widgets
}
bool set_selection ( string  key,
tree  t,
string  s,
string  format 
)

Definition at line 460 of file aqua_gui.mm.

                                                            {
  (void) format;
  return the_gui->set_selection (key, t, s);
}

Here is the call graph for this function:

void show_help_balloon ( widget  balloon,
SI  x,
SI  y 
)

Definition at line 508 of file aqua_gui.mm.

                                               { 
  // Display a help balloon at position (x, y); the help balloon should
  // disappear as soon as the user presses a key or moves the mouse
  (void) balloon; (void) x; (void) y;
}
void show_wait_indicator ( widget  base,
string  message,
string  argument 
)

Definition at line 515 of file aqua_gui.mm.

                                                                   {
  // Display a wait indicator with a message and an optional argument
  // The indicator might for instance be displayed at the center of
  // the base widget which triggered the lengthy operation;
  // the indicator should be removed if the message is empty
  the_gui->show_wait_indicator(base,message,argument); 
}

Here is the call graph for this function:

void update ( )

Definition at line 213 of file aqua_gui.mm.

Here is the caller graph for this function:

font x_font ( string  family,
int  size,
int  dpi 
)

Definition at line 535 of file aqua_gui.mm.

{
  (void) family; (void) size; (void) dpi;
  if (DEBUG_EVENTS) cout << "x_font(): SHOULD NOT BE CALLED\n";
  return NULL;
}

Variable Documentation

bool aqua_update_flag = false

Definition at line 29 of file aqua_gui.mm.

int char_clip = 0

Definition at line 483 of file aqua_gui.mm.

int nr_windows = 0

Definition at line 27 of file aqua_gui.mm.

NSAutoreleasePool* pool = nil [static]

Definition at line 361 of file aqua_gui.mm.

Definition at line 25 of file aqua_gui.mm.

void(* the_interpose_handler)(void) = NULL

Definition at line 209 of file aqua_gui.mm.

Definition at line 31 of file aqua_gui.mm.

Definition at line 32 of file aqua_gui.mm.