Back to index

texmacs  1.0.7.15
Functions
aqua_utilities.mm File Reference
#include "aqua_utilities.h"
#include "dictionary.hpp"
#include "converter.hpp"
#include "analyze.hpp"

Go to the source code of this file.

Functions

NSRect to_nsrect (coord4 p)
NSPoint to_nspoint (coord2 p)
NSSize to_nssize (coord2 p)
coord4 from_nsrect (NSRect rect)
coord2 from_nspoint (NSPoint pt)
coord2 from_nssize (NSSize s)
NSString * to_nsstring (string s)
string from_nsstring (NSString *s)
NSString * to_nsstring_utf8 (string s)
string aqua_translate (string s)

Function Documentation

Definition at line 87 of file aqua_utilities.mm.

                          {
  string out_lan= get_output_language ();
  return tm_var_encode (translate (s, "english", out_lan));
}

Here is the call graph for this function:

coord2 from_nspoint ( NSPoint  pt)

Definition at line 46 of file aqua_utilities.mm.

{
       SI c1, c2;
       c1 = pt.x*PIXEL;
       c2 = -pt.y*PIXEL;
       return coord2 (c1,c2)       ;
}

Here is the caller graph for this function:

coord4 from_nsrect ( NSRect  rect)

Definition at line 35 of file aqua_utilities.mm.

{
       SI c1, c2, c3, c4;
       
       c1 = rect.origin.x*PIXEL;
       c2 = rect.origin.y*PIXEL;
       c3 = (rect.origin.x+rect.size.width)*PIXEL;
       c4 = (rect.origin.y+rect.size.height)*PIXEL;     
       return coord4 (c1, c2, c3, c4);
}
coord2 from_nssize ( NSSize  s)

Definition at line 54 of file aqua_utilities.mm.

{
       SI c1, c2;
       c1 = s.width*PIXEL;
       c2 = s.height*PIXEL;
       return coord2 (c1,c2)       ;
}
string from_nsstring ( NSString *  s)

Definition at line 70 of file aqua_utilities.mm.

{
       const char *cstr = [s cStringUsingEncoding:NSUTF8StringEncoding];
       return utf8_to_cork(string((char*)cstr));
}

Here is the call graph for this function:

Here is the caller graph for this function:

NSPoint to_nspoint ( coord2  p)

Definition at line 23 of file aqua_utilities.mm.

{
       float c = 1.0/PIXEL;
       return NSMakePoint(p.x1*c,-p.x2*c);
}

Here is the caller graph for this function:

NSRect to_nsrect ( coord4  p)

Definition at line 17 of file aqua_utilities.mm.

{
       float c = 1.0/PIXEL;
       return NSMakeRect(p.x1*c, -p.x4*c, (p.x3-p.x1)*c, (p.x4-p.x2)*c);
}

Here is the caller graph for this function:

NSSize to_nssize ( coord2  p)

Definition at line 29 of file aqua_utilities.mm.

{
       float c = 1.0/PIXEL;
       return NSMakeSize(p.x1*c,p.x2*c);
}
NSString* to_nsstring ( string  s)

Definition at line 62 of file aqua_utilities.mm.

{
       char *p = as_charp(s);
       NSString *nss = [NSString stringWithCString:p encoding:NSUTF8StringEncoding];
       tm_delete_array (p); 
       return nss;
}

Here is the call graph for this function:

NSString* to_nsstring_utf8 ( string  s)

Definition at line 77 of file aqua_utilities.mm.

{
  s = cork_to_utf8 (s);
  char *p = as_charp(s);
  NSString *nss = [NSString stringWithCString:p encoding:NSUTF8StringEncoding];
  tm_delete_array (p);      
  return nss;
}

Here is the call graph for this function:

Here is the caller graph for this function: