Package otk :: Module otk
[hide private]
[frames] | no frames]

Source Code for Module otk.otk

   1  # This file was automatically generated by SWIG (http://www.swig.org). 
   2  # Version 1.3.36 
   3  # 
   4  # Don't modify this file, modify the SWIG interface instead. 
   5   
   6  """ 
   7  The `otk` is a python binding for the otk tool kit. 
   8  """ 
   9   
  10  import _otk 
  11  import new 
  12  new_instancemethod = new.instancemethod 
  13  try: 
  14      _swig_property = property 
  15  except NameError: 
  16      pass # Python < 2.2 doesn't have 'property'. 
17 -def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
18 if (name == "thisown"): return self.this.own(value) 19 if (name == "this"): 20 if type(value).__name__ == 'PySwigObject': 21 self.__dict__[name] = value 22 return 23 method = class_type.__swig_setmethods__.get(name,None) 24 if method: return method(self,value) 25 if (not static) or hasattr(self,name): 26 self.__dict__[name] = value 27 else: 28 raise AttributeError("You cannot add attributes to %s" % self)
29
30 -def _swig_setattr(self,class_type,name,value):
31 return _swig_setattr_nondynamic(self,class_type,name,value,0)
32
33 -def _swig_getattr(self,class_type,name):
34 if (name == "thisown"): return self.this.own() 35 method = class_type.__swig_getmethods__.get(name,None) 36 if method: return method(self) 37 raise AttributeError,name
38
39 -def _swig_repr(self):
40 try: strthis = "proxy of " + self.this.__repr__() 41 except: strthis = "" 42 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
43 44 import types 45 try: 46 _object = types.ObjectType 47 _newclass = 1 48 except AttributeError:
49 - class _object : pass
50 _newclass = 0 51 del types 52 53
54 -def _swig_setattr_nondynamic_method(set):
55 def set_attr(self,name,value): 56 if (name == "thisown"): return self.this.own(value) 57 if hasattr(self,name) or (name == "this"): 58 set(self,name,value) 59 else: 60 raise AttributeError("You cannot add attributes to %s" % self)
61 return set_attr 62 63
64 -class OtkTabbedPanel(object):
65 """Proxy of C OtkTabbedPanel struct""" 66 thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') 67 __repr__ = _swig_repr 68 num = _swig_property(_otk.OtkTabbedPanel_num_get)
69 - def getPanel(*args):
70 """getPanel(self, int num) -> OtkWidget""" 71 return _otk.OtkTabbedPanel_getPanel(*args)
72
73 - def __init__(self, *args):
74 """__init__(self) -> OtkTabbedPanel""" 75 _otk.OtkTabbedPanel_swiginit(self,_otk.new_OtkTabbedPanel(*args))
76 __swig_destroy__ = _otk.delete_OtkTabbedPanel 77 OtkTabbedPanel.getPanel = new_instancemethod(_otk.OtkTabbedPanel_getPanel,None,OtkTabbedPanel) 78 OtkTabbedPanel_swigregister = _otk.OtkTabbedPanel_swigregister 79 OtkTabbedPanel_swigregister(OtkTabbedPanel) 80
81 -class OtkColor_record(object):
82 """Proxy of C OtkColor_record struct""" 83 thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') 84 __repr__ = _swig_repr 85 r = _swig_property(_otk.OtkColor_record_r_get) 86 g = _swig_property(_otk.OtkColor_record_g_get) 87 b = _swig_property(_otk.OtkColor_record_b_get)
88 - def __init__(self, *args):
89 """__init__(self) -> OtkColor_record""" 90 _otk.OtkColor_record_swiginit(self,_otk.new_OtkColor_record(*args))
91 __swig_destroy__ = _otk.delete_OtkColor_record 92 OtkColor_record_swigregister = _otk.OtkColor_record_swigregister 93 OtkColor_record_swigregister(OtkColor_record) 94 95 Otk_Flat = _otk.Otk_Flat 96 Otk_Raised = _otk.Otk_Raised 97 Otk_Recessed = _otk.Otk_Recessed 98 Otk_Invisible = _otk.Otk_Invisible 99 Otk_ImagePanel = _otk.Otk_ImagePanel 100 Otk_SC_Panel = _otk.Otk_SC_Panel 101 Otk_SC_TextLabel = _otk.Otk_SC_TextLabel 102 Otk_SC_Button = _otk.Otk_SC_Button 103 Otk_SC_FormBox = _otk.Otk_SC_FormBox 104 Otk_SC_Line = _otk.Otk_SC_Line 105 Otk_SC_Box = _otk.Otk_SC_Box 106 Otk_SC_hSlider = _otk.Otk_SC_hSlider 107 Otk_SC_vSlider = _otk.Otk_SC_vSlider 108 Otk_SC_textscrollbar = _otk.Otk_SC_textscrollbar 109 Otk_SC_Window = _otk.Otk_SC_Window 110 Otk_SC_WindowPane = _otk.Otk_SC_WindowPane 111 Otk_SC_Menu_DropDown_Button = _otk.Otk_SC_Menu_DropDown_Button 112 Otk_SC_Menu_Item = _otk.Otk_SC_Menu_Item 113 Otk_SC_Menu_Submenu = _otk.Otk_SC_Menu_Submenu 114 Otk_SC_RadioButton = _otk.Otk_SC_RadioButton 115 Otk_SC_ToggleButton = _otk.Otk_SC_ToggleButton 116 Otk_SC_Select_List = _otk.Otk_SC_Select_List 117 Otk_SC_Select_List_Item = _otk.Otk_SC_Select_List_Item 118 Otk_SC_Select_List_SubList = _otk.Otk_SC_Select_List_SubList 119 Otk_SC_TabHandle = _otk.Otk_SC_TabHandle 120 Otk_class_panel = _otk.Otk_class_panel 121 Otk_class_text = _otk.Otk_class_text 122 Otk_class_button = _otk.Otk_class_button 123 Otk_class_line = _otk.Otk_class_line 124 Otk_class_box = _otk.Otk_class_box 125 Otk_class_radiobutton1 = _otk.Otk_class_radiobutton1 126 Otk_class_radiobutton2 = _otk.Otk_class_radiobutton2 127 Otk_class_togglebutton = _otk.Otk_class_togglebutton 128 Otk_class_triangle = _otk.Otk_class_triangle 129 Otk_class_disk = _otk.Otk_class_disk 130 Otk_class_circle = _otk.Otk_class_circle 131 Otk_class_userdefd = _otk.Otk_class_userdefd 132 Otk_class_other = _otk.Otk_class_other 133 Otk_subtype_plane = _otk.Otk_subtype_plane 134 Otk_subtype_raised = _otk.Otk_subtype_raised 135 Otk_subtype_recessed = _otk.Otk_subtype_recessed 136 Otk_subtype_moveable = _otk.Otk_subtype_moveable 137 Otk_subtype_recessed_diamond = _otk.Otk_subtype_recessed_diamond 138 Otk_subtype_raised_diamond = _otk.Otk_subtype_raised_diamond 139 Otk_hover_mask = _otk.Otk_hover_mask 140 Otk_MouseCursor_Arrow = _otk.Otk_MouseCursor_Arrow 141 Otk_MouseCursor_Cross = _otk.Otk_MouseCursor_Cross 142 Otk_MouseCursor_Hand = _otk.Otk_MouseCursor_Hand 143 Otk_MouseCursor_Wait = _otk.Otk_MouseCursor_Wait 144 Otk_Font_Vect = _otk.Otk_Font_Vect 145 Otk_Font_Helv = _otk.Otk_Font_Helv 146 Otk_FontDefault = _otk.Otk_FontDefault 147 Otk_FontSpacing_Mono = _otk.Otk_FontSpacing_Mono 148 Otk_FontSpacing_Proportional = _otk.Otk_FontSpacing_Proportional 149 Otk_FontSpacingDefault = _otk.Otk_FontSpacingDefault 150
151 -def Otk_Set_Default_Border_Thickness(*args):
152 """Otk_Set_Default_Border_Thickness(float thickness)""" 153 return _otk.Otk_Set_Default_Border_Thickness(*args)
154
155 -def Otk_Set_Object_Border_Thickness(*args):
156 """Otk_Set_Object_Border_Thickness(OtkWidget obj, float thickness)""" 157 return _otk.Otk_Set_Object_Border_Thickness(*args)
158
159 -def OtkSetColor(*args):
160 """OtkSetColor(float r, float g, float b) -> OtkColor""" 161 return _otk.OtkSetColor(*args)
162
163 -def OtkMakePanel(*args):
164 """ 165 OtkMakePanel(OtkWidget container, int panel_type, OtkColor panel_color, 166 float left, float top, float horiz_size, 167 float vert_size) -> OtkWidget 168 169 This function makes a rectangular panel, either flat, raised, or recessed, within the 170 parent window or panel. The concept of the panel, also called a container widget, 171 is a very important aspect of Otk. All other widgets and sub-panels must be placed on a 172 container/panel. The OtkOuterWindow is the first container/panel, and is provided by default. 173 Placing sub-panels on a panel provides a method of dividing-up the parent panel. 174 175 Returns OtkWidget. 176 177 Container - is the parent container-panel, onto which the new panel is placed, and to whose 178 frame the coordinates will be relative. 179 180 Panel types currently include: 181 Otk_Flat = Plan flat rectangle. 182 Otk_Raised = Raised rectangle. 183 Otk_Recessed = Recessed Rectangle. 184 (In the future, more panel types could be added.) 185 186 Color is an OtkColor record. 187 188 The left, top, coordinates are relative to the parent window/container origin. 189 All coordinates are in percentage of outer window size, where the upper left corner is (0.0,0.0) 190 and the lower right corner is (100.0,100.0). 191 192 The following related functions set additional attributes or change default settings: 193 194 Otk_Set_Object_Border_Thickness( OtkWidget panel, float thickness ) 195 Otk_Set_Default_Border_Thickness( float thickness ) 196 OtkResizePanel( OtkWidget panel, float left, float top, float horiz_size, float vert_size ) 197 Otk_Tabbed_Panel_New( parent, num, **names, color, left, top, width, height, button_height ) 198 199 See Panel Functions for more on panel-related functions. 200 201 """ 202 return _otk.OtkMakePanel(*args)
203
204 -def OtkResizePanel(*args):
205 """ 206 OtkResizePanel(OtkWidget panel, float left, float top, float horiz_size, 207 float vert_size) 208 """ 209 return _otk.OtkResizePanel(*args)
210
211 -def OtkMakeImagePanel(*args):
212 """ 213 OtkMakeImagePanel(OtkWidget container, char file_name, float left, float top, 214 float horiz_size, float vert_size) -> OtkWidget 215 """ 216 return _otk.OtkMakeImagePanel(*args)
217
218 -def Otk_Dispose_Image(*args):
219 """ 220 Otk_Dispose_Image(char file_name) 221 222 Removes all resources associated with the named image, from the 223 graphics-card, when an image is no longer needed. This is to be 224 used after an image was loaded via OtkMakeImagePanel, and/or related 225 image functions, and later the object is removed and it is known 226 the image is no longer needed. (Normally, one copy of each image 227 is retained in graphics memory that can be referenced by many 228 object instances, and for rapid re-use.) 229 230 """ 231 return _otk.Otk_Dispose_Image(*args)
232
233 -def Otk_Add_Line(*args):
234 """ 235 Otk_Add_Line(OtkWidget container, OtkColor tmpcolor, float thickness, 236 float x1, float y1, float x2, float y2) -> OtkWidget 237 238 Often it is useful to add lines or separators to a GUI panel. General purpose lines can be 239 added with the Otk_Add_Line function. Specify the window/container, line color, thickness, 240 and the coordinates to draw the line from (x1,y1) and to (x2,y2). The coordinates are in 241 percentages of the container-window. Boxes can be drawn as a set of four lines. 242 243 """ 244 return _otk.Otk_Add_Line(*args)
245
246 -def Otk_Add_BoundingBox(*args):
247 """ 248 Otk_Add_BoundingBox(OtkWidget container, OtkColor tmpcolor, float thickness, 249 float x1, float y1, float x2, float y2) -> OtkWidget 250 251 Makes a rectangular separating boundary outline, whose upper left corner is (x1,y1) and lower 252 right corner is (x2,y2). 253 254 """ 255 return _otk.Otk_Add_BoundingBox(*args)
256
257 -def Otk_Set_Line_Thickness(*args):
258 """Otk_Set_Line_Thickness(OtkWidget tmpobj, float thickness)""" 259 return _otk.Otk_Set_Line_Thickness(*args)
260
261 -def OtkMakeTextLabel(*args):
262 """ 263 OtkMakeTextLabel(OtkWidget container, char text, OtkColor text_color, 264 float scale, float thickness, float x, float y) -> OtkWidget 265 266 This function places text onto a panel or window. 267 268 Returns OtkWidget. 269 270 Panel - is the container-panel, or parent widget, on which the label is attached/placed. 271 And to whose frame the coordinates will be relative! 272 Text - is the character string array to make the label out of. 273 Fontcolor - an OtkColor record. 274 fontsize - A float scaling factor. 1.0 is normal size, with each character being 12.0% high 275 by 8.0% wide in Otk coordinates. 276 fontweight - 1.0 is normal. 2.0 is bold (double-thick). 277 x, y - Coordinates of the origin of the label. Upper left edge relative to containing panel's 278 upper left origin. 279 280 The following related functions set additional attributes or change default settings: 281 Otk_Modify_Text( OtkWidget label, char *text ) 282 Otk_Modify_Text_Aspect( OtkWidget label, float aspect ) 283 Otk_Modify_Text_Scale( OtkWidget label, float scale ) 284 Otk_Modify_Text_Color( OtkWidget label, OtkColor text_color ) 285 Otk_Modify_Text_Slant( OtkWidget label, float slant ) 286 Otk_Modify_Text_Thickness( OtkWidget label, float thickness ) 287 Otk_Modify_Text_Position( OtkWidget label, float x, float y ) 288 Otk_Set_Text_Aspect( float aspect ) 289 Otk_Get_Character_Size( OtkWidget label, float *width, float *height ) 290 Otk_Get_Text_Size( OtkWidget label, float *width, float *height ) 291 Otk_FitTextInPanel( OtkWidget label ) 292 293 """ 294 return _otk.OtkMakeTextLabel(*args)
295
296 -def Otk_Modify_Text_Slant(*args):
297 """Otk_Modify_Text_Slant(OtkWidget tmpobj, float slant)""" 298 return _otk.Otk_Modify_Text_Slant(*args)
299
300 -def Otk_Modify_Text_Color(*args):
301 """Otk_Modify_Text_Color(OtkWidget tmpobj, OtkColor text_color)""" 302 return _otk.Otk_Modify_Text_Color(*args)
303
304 -def Otk_Modify_Text_Thickness(*args):
305 """Otk_Modify_Text_Thickness(OtkWidget tmpobj, float thickness)""" 306 return _otk.Otk_Modify_Text_Thickness(*args)
307
308 -def Otk_Modify_Text_Scale(*args):
309 """Otk_Modify_Text_Scale(OtkWidget tmpobj, float scale)""" 310 return _otk.Otk_Modify_Text_Scale(*args)
311
312 -def Otk_Modify_Text_Aspect(*args):
313 """Otk_Modify_Text_Aspect(OtkWidget tmpobj, float aspect)""" 314 return _otk.Otk_Modify_Text_Aspect(*args)
315
316 -def Otk_Set_Text_Aspect(*args):
317 """Otk_Set_Text_Aspect(float aspect)""" 318 return _otk.Otk_Set_Text_Aspect(*args)
319
320 -def Otk_Modify_Text_Position(*args):
321 """Otk_Modify_Text_Position(OtkWidget tmpobj, float x, float y)""" 322 return _otk.Otk_Modify_Text_Position(*args)
323
324 -def Otk_Get_Text_Size(*args):
325 """Otk_Get_Text_Size(OtkWidget tmpobj, float width, float height)""" 326 return _otk.Otk_Get_Text_Size(*args)
327
328 -def Otk_Get_Character_Size(*args):
329 """Otk_Get_Character_Size(OtkWidget tmpobj, float width, float height)""" 330 return _otk.Otk_Get_Character_Size(*args)
331
332 -def Otk_Modify_Text(*args):
333 """Otk_Modify_Text(OtkWidget tmpobj, char text)""" 334 return _otk.Otk_Modify_Text(*args)
335
336 -def Otk_FitTextInPanel(*args):
337 """Otk_FitTextInPanel(OtkWidget txtobj)""" 338 return _otk.Otk_FitTextInPanel(*args)
339
340 -def OtkMakeButton(*args):
341 """ 342 OtkMakeButton(OtkWidget container, float left, float top, float horiz_size, 343 float vert_size, char text, PyFunctionObject func=None, 344 PyObject parameter=None) -> OtkWidget 345 346 This function makes a push-button that will call the named user's function when pressed. 347 348 Returns OtkWidget. 349 350 Panel - is the container-panel, or parent widget, on which the button is attached/placed. 351 And to whose frame the coordinates will be relative! 352 353 x, y - Coordinates of the button's upper-left corner on the containing panel (in %). 354 Relative to containing panel's upper left origin. 355 356 horiz_size, vert_size - Horizontal and vertical size of the button, in % of the 357 containing window's size. 358 359 Text - is the character string array to put onto the button. 360 361 CallBack - Function which gets called back when button is pressed. 362 CallParam - Parameter passed to callback function. 363 364 """ 365 return _otk.OtkMakeButton(*args)
366
367 -def Otk_Set_Default_Button_Color(*args):
368 """Otk_Set_Default_Button_Color(float r, float g, float b)""" 369 return _otk.Otk_Set_Default_Button_Color(*args)
370
371 -def Otk_Set_Button_Color(*args):
372 """Otk_Set_Button_Color(OtkWidget button, OtkColor panel_color)""" 373 return _otk.Otk_Set_Button_Color(*args)
374
375 -def Otk_Set_Panel_Color(*args):
376 """Otk_Set_Panel_Color(OtkWidget container, OtkColor panel_color)""" 377 return _otk.Otk_Set_Panel_Color(*args)
378
379 -def Otk_Set_Default_Button_BorderThickness(*args):
380 """Otk_Set_Default_Button_BorderThickness(float x)""" 381 return _otk.Otk_Set_Default_Button_BorderThickness(*args)
382
383 -def Otk_Set_Button_BorderThickness(*args):
384 """Otk_Set_Button_BorderThickness(OtkWidget button, float x)""" 385 return _otk.Otk_Set_Button_BorderThickness(*args)
386
387 -def Otk_Set_Button_Outline_Style(*args):
388 """Otk_Set_Button_Outline_Style(int style)""" 389 return _otk.Otk_Set_Button_Outline_Style(*args)
390
391 -def Otk_Set_Button_State(*args):
392 """Otk_Set_Button_State(OtkWidget button, int state)""" 393 return _otk.Otk_Set_Button_State(*args)
394
395 -def Otk_Get_Button_State(*args):
396 """Otk_Get_Button_State(OtkWidget button) -> int""" 397 return _otk.Otk_Get_Button_State(*args)
398
399 -def OtkMakeToggleButton(*args):
400 """ 401 OtkMakeToggleButton(OtkWidget container, float left, float top, float horiz_size, 402 float vert_size, PyFunctionObject func=None, 403 PyObject parameter=None) -> OtkWidget 404 405 This function makes a simple toggle-button on the panel. When pressed, it toggles it's state, 406 and calls the named user function while passing the given parameter. The parameter, such as an 407 integer, can be used to identify which button was pressed. 408 409 Returns OtkWidget handle. 410 Where: 411 container - is the container-panel, or parent widget, on which the button is attached/placed. 412 And to whose frame the coordinates will be relative! 413 x, y - Coordinates of the button's upper-left corner on the containing panel (in %). 414 Relative to containing panel's upper left origin. 415 horiz_size, vert_size - The horizontal and vertical size of the button in percentage 416 of the containing window. 417 callback - User function called when toggled. 418 parameter - parameter passed to user function. 419 420 The following are related functions: 421 422 void Otk_Set_Button_State( OtkWidget button, int state ) 423 424 Causes named button to assume the specified state of: 425 0 = not toggled, not depressed. 426 1 = toggled on, depressed. 427 428 int Otk_Get_Button_State( OtkWidget button) 429 430 Returns the named button's state as 0=not-depressed, or 1=depressed. 431 432 """ 433 return _otk.OtkMakeToggleButton(*args)
434
435 -def OtkMakeRadioButton(*args):
436 """ 437 OtkMakeRadioButton(OtkWidget container, float left, float top, float horiz_size, 438 float vert_size, PyFunctionObject func=None, 439 PyObject parameter=None) -> OtkWidget 440 441 This function places a radio-button onto the panel. The first radio-button of a set must name the 442 parent-panel/window as the container. The remaining radio-buttons in a set must name one of the 443 other buttons in the set as their parent-container. When pressed, the pressed radio button is 444 set, and the others are un-set. Only one radio-button in a set has the depressed state at a time. 445 The named user function is called when pressed, and the given parameter value is passed. 446 The parameter, such as an integer, can be used to identify which button was pressed. 447 448 Returns OtkWidget handle. 449 Where: 450 container - is the container-panel, or parent widget, on which the button is attached/placed. 451 And to whose frame the coordinates will be relative! 452 x, y - Coordinates of the button's upper-left corner on the containing panel (in %). 453 Relative to containing panel's upper left origin. 454 horiz_size, vert_size - The horizontal and vertical size of the button in percentage 455 of the containing window. 456 callback - User function called when toggled. 457 parameter - parameter passed to user function. 458 459 The following are related functions: 460 461 void Otk_SetRadioButton( OtkWidget radiobutton ) 462 463 Causes named button to be depressed, while releasing all others in the set. 464 465 int Otk_Get_Button_State( OtkWidget button) 466 467 Returns the named button's state as 0=not-depressed, or 1=depressed. 468 469 """ 470 return _otk.OtkMakeRadioButton(*args)
471
472 -def Otk_SetRadioButton(*args):
473 """Otk_SetRadioButton(OtkWidget topobj)""" 474 return _otk.Otk_SetRadioButton(*args)
475
476 -def Otk_Set_Button_Icon(*args):
477 """Otk_Set_Button_Icon(OtkWidget button, struct Otk_image image_ptr)""" 478 return _otk.Otk_Set_Button_Icon(*args)
479
480 -def Otk_Set_Button_Icon_File(*args):
481 """Otk_Set_Button_Icon_File(OtkWidget button, char file_name)""" 482 return _otk.Otk_Set_Button_Icon_File(*args)
483
484 -def OtkMakeWindow(*args):
485 """ 486 OtkMakeWindow(int panel_type, OtkColor tab_color, OtkColor panel_color, 487 float left, float top, float horiz_size, 488 float vert_size) -> OtkWidget 489 490 This function makes a floating sub-window which can be closed by the user. 491 Widgets can then be added to this window, like any other container-window. 492 493 """ 494 return _otk.OtkMakeWindow(*args)
495
496 -def OtkSetWindowTitle(*args):
497 """ 498 OtkSetWindowTitle(OtkWidget window, OtkColor text_color, char title) 499 500 This function sets a sub-window's title. It places text in the window title-bar. 501 502 """ 503 return _otk.OtkSetWindowTitle(*args)
504
505 -def Otk_RegisterWindowKillEventFunction(*args):
506 """Otk_RegisterWindowKillEventFunction(OtkWidget topobj, PyFunctionObject func=None, PyObject parameter=None)""" 507 return _otk.Otk_RegisterWindowKillEventFunction(*args)
508
509 -def OtkMakeTextFormBox(*args):
510 """ 511 OtkMakeTextFormBox(OtkWidget container, char text, int ncols, float x, 512 float y, float horiz_size, float vert_size, 513 PyFunctionObject func=None, PyObject parameter=None) -> OtkWidget 514 515 This function places a text fill-in box on the panel. Initial text can be placed in the box, or 516 it can be initialized blank (). Your own call-back function is called when <Enter> is 517 pressed. The text can also be read from the box by the Otk_Get_Text function below. 518 519 Returns OtkWidget handle. 520 521 Where: 522 container - is the container-panel, or parent widget, on which the form-box is attached/placed. 523 And to whose frame the coordinates will be relative! 524 text - any initial text to place in the fill-in box. Can be empty string, . 525 ncols - number of characters to fit in the box. (Note that the width of the box is specified 526 by the horiz_size parameters, so the ncols really sets the horizontal size of the 527 characters to fit in the box of that size.) 528 x, y - Location of the fill-in box's upper-left corner on the containing panel (in %). 529 Relative to containing panel's upper left origin. 530 horiz_size, vert_size - The horizontal and vertical size of the fill-in box in percentage 531 of the containing window. 532 callback - Your function to call when <enter> is pressed. 533 parameter - arbitrary parameter to pass to your callback function. 534 535 The following are related functions: 536 537 void Otk_Modify_Text( OtkWidget textbox, char *text ) 538 539 Places the specified text in the form box. 540 541 void *Otk_Get_Text( OtkWidget textbox, char *text, int n ) 542 543 Returns any text from the specified form-box into the character-array in the 544 second parameter. The third parameter should be specified as the maximum length of 545 the character array for safety. 546 547 """ 548 return _otk.OtkMakeTextFormBox(*args)
549
550 -def OtkGetText(*args):
551 """OtkGetText(OtkWidget obj, int n) -> char""" 552 return _otk.OtkGetText(*args)
553
554 -def OtkMakeTextEditBox(*args):
555 """ 556 OtkMakeTextEditBox(OtkWidget container, char text, int nrows, int ncols, 557 float left, float top, float horiz_size, float vert_size) -> OtkWidget 558 559 This function places a multi-row text-edit box on the panel. Initial text can be placed in the box, or 560 it can be initialized blank (''). The text can be read from the box by the Otk_Get_Text function below. 561 Much like the simple text-box above, but enables more than one row, and has no callback function, since 562 <enter> is legal character to break lines in the edit-box. Read any entered text with the 563 Otk_Get_Text (below), perhaps initiated by an 'ok' button callback.. 564 565 Returns OtkWidget handle. 566 567 Where: 568 container - is the container-panel, or parent widget, on which the edit-box is attached/placed. 569 And to whose frame the coordinates will be relative! 570 text - any initial text to place in the edit-box. Can be empty string, ''. 571 ncols - number of character columns to fit in the box. (Note that the size of the box is 572 specified by the horiz_size and vert_size parameters, so ncols and nrows really set 573 the horizontal and vertical size of the characters to fit in the box.) 574 nrows - number of character rows to fit in the box. 575 x, y - Location of the edit-box's upper-left corner on the containing panel (in %). 576 Relative to containing panel's upper left origin. 577 horiz_size, vert_size - The horizontal and vertical size of the edit-box in percentage 578 of the containing window. 579 580 The following are related functions: 581 582 OtkAddTextScrollbar( OtkWidget container, float width ) 583 584 Otk_Get_Text( OtkWidget textbox, char *text, int n ) 585 586 """ 587 return _otk.OtkMakeTextEditBox(*args)
588
589 -def OtkAddTextScrollbar(*args):
590 """OtkAddTextScrollbar(OtkWidget container, float width)""" 591 return _otk.OtkAddTextScrollbar(*args)
592
593 -def Otk_Right_Justify_Formbox(*args):
594 """Otk_Right_Justify_Formbox(OtkWidget formbox)""" 595 return _otk.Otk_Right_Justify_Formbox(*args)
596
597 -def Otk_Browse_Files(*args):
598 """ 599 Otk_Browse_Files(char prompt, int maxlength, char directory, char wildcards, 600 char filename, PyFunctionObject func=None) -> OtkWidget 601 602 This is a higher level convenience widget that is useful for helping the user find files to open, 603 save-as, import, or etc.. You can indicate the intended operation to the user through the prompt 604 argument. The Otk_Browse_Files widget allows navigation of the file system by showing the 605 files in the directory, and by going up and down into other directories. It allows filtering the 606 displayed files. Defaults can be supplied for the file name, directory, and filter (wildcards), 607 which the user can also change. The Otk_Browse_Files routine will call the user-supplied 608 call-back routine when a file is selected. It passes the selected file's name as a character 609 string into the call-back function, where you can open the file for reading/writing, or whatever. 610 611 Where: 612 prompt - Input (can be constant literal string). The 'title' string or purpose 613 of the browser window. For example: 'Open' 'Save-As' 'Import' etc.. 614 maxlength - The minimum array size of the next three character string parameters, 615 (directory, wildcard, filename). If any strings to be returned are longer than or equal 616 to maxlength, then the returned string is truncated to maxlength-1 characters for safety. 617 directory - Input/Output. Must point to an allocated[*] character string array variable 618 of size maxlength or greater. This specifies the starting directory for browsing. 619 Often set to '.' (local directory) initially. If user browses to other directories, 620 then last visited directory path is copied to this string. Path may be relative or absolute. 621 filetype_filter - Input/Output. Must point to an allocated[*] character string array 622 variable of size maxlength or greater. This specifies the type of files to filter and 623 list, much like file-wildcards, such as *.doc . For example, '*.txt *.dat', 624 or for everything '*'. If the user changes the file-type setting, the new setting is 625 returned in this string. 626 filename - Input/Output. Must point to an allocated[*] character string array variable of 627 size maxlength or greater. This specifies any initial file-name to place in the 628 file-name box, if any. Often, an empty file-name string is passed in. 629 The selected file name is copied into this string. The whole purpose of this 630 widget is to select the file-name, so this is the primary output of the routine. 631 At most maxlength-1 characters will be copied into the file-name array. 632 callback - The user's callback function. Function will called when file is selected. 633 The selected file is passed as the argument. 634 635 For complete example, see: File Browser Example. 636 637 """ 638 return _otk.Otk_Browse_Files(*args)
639
640 -def Otk_Browse_Dirs(*args):
641 """ 642 Otk_Browse_Dirs(char prompt, int maxlength, char directory, char wildcards, 643 char dirname, PyFunctionObject func=None) -> OtkWidget 644 645 Sometimes your application needs to locate a directory; not a particular file. 646 In this case, is the Otk_Browse_Dirs function, instead of Otk_Browse_Files. 647 648 This function displays only directories. Users can navigate directories by double-clicking them. 649 The final directory is selected by clicking the OK button. 650 651 """ 652 return _otk.Otk_Browse_Dirs(*args)
653
654 -def Otk_fb_add_optional_dirfile(*args):
655 """ 656 Otk_fb_add_optional_dirfile(char dir_or_file) 657 658 You can provide a pull-down menu to the right of the file-name entry, for the purpose of 659 suggesting alternate, or recently visited, directory(s) or files 660 661 """ 662 return _otk.Otk_fb_add_optional_dirfile(*args)
663
664 -def Otk_fb_clear_optional_dirfiles(*args):
665 """ 666 Otk_fb_clear_optional_dirfiles() 667 668 All entries made by this function will be available on all future calls to the 669 file-browser, until cleared by this function. 670 671 """ 672 return _otk.Otk_fb_clear_optional_dirfiles(*args)
673
674 -def Otk_fbrowse_size_hint(*args):
675 """ 676 Otk_fbrowse_size_hint(float width, float height, float horiz_center_offset, 677 float vert_center_offset) 678 679 The file and directory-browser gadgets attempt to display themselves at a reasonable size and 680 aspect ratio, depending on the application window's size. For various reasons, you may wish 681 to have the broswer be a different size, aspect ratio, or screen position. You can control 682 these things with the Otk_fbrowse_size_hint function. 683 684 The coordinates are all in percent of the outer window. 685 686 """ 687 return _otk.Otk_fbrowse_size_hint(*args)
688
689 -def Otk_handle_key_input(*args):
690 """Otk_handle_key_input(int ks) -> int""" 691 return _otk.Otk_handle_key_input(*args)
692
693 -def Otk_handle_key_release(*args):
694 """Otk_handle_key_release(int ks)""" 695 return _otk.Otk_handle_key_release(*args)
696
697 -def Otk_UpdateMouse(*args):
698 """Otk_UpdateMouse(int x, int y, int state) -> int""" 699 return _otk.Otk_UpdateMouse(*args)
700
701 -def Otk_handle_mouse_move(*args):
702 """Otk_handle_mouse_move(int MouseDx, int MouseDy) -> int""" 703 return _otk.Otk_handle_mouse_move(*args)
704
705 -def Otk_Make_Menu(*args):
706 """ 707 Otk_Make_Menu(OtkWidget container, float left, float top, float horiz_size, 708 float vert_size, char text) -> OtkWidget 709 710 This function creates a menu pull-down. This forms the top-level entry-point to a pull-down 711 menu. Items are then added to the menu with the Otk_Add_Menu_Item and/or Otk_Add_SubMenu functions 712 described below. 713 714 """ 715 return _otk.Otk_Make_Menu(*args)
716
717 -def Otk_Add_Menu_Item(*args):
718 """ 719 Otk_Add_Menu_Item(OtkWidget container, char text, PyFunctionObject func=None, 720 PyObject parameter=None) -> OtkWidget 721 722 This function adds a menu item to a pull-down menu. 723 724 """ 725 return _otk.Otk_Add_Menu_Item(*args)
726
727 -def Otk_Add_SubMenu(*args):
728 """ 729 Otk_Add_SubMenu(OtkWidget container, char text) -> OtkWidget 730 731 This function creates a sub-menu pull-down on an existing menu. 732 733 """ 734 return _otk.Otk_Add_SubMenu(*args)
735
736 -def Otk_Set_Menu_Selectable(*args):
737 """ 738 Otk_Set_Menu_Selectable(OtkWidget tmpobj, int on_notoff) 739 740 This function deativates (0) or activates (1) a menu-item. 741 742 """ 743 return _otk.Otk_Set_Menu_Selectable(*args)
744
745 -def Otk_Make_Selection_List(*args):
746 """ 747 Otk_Make_Selection_List(OtkWidget container, int rows, int cols, float left, 748 float top, float horiz_size, float vert_size) -> OtkWidget 749 750 This function creates a scrollable selection-list container at the specified location and size. 751 Use Otk_Add_Selection_Item to add items to the list. If more than rows items are added, 752 a scroll-bar is automatically added to the list. 753 754 """ 755 return _otk.Otk_Make_Selection_List(*args)
756
757 -def Otk_Frame_Selection_List(*args):
758 """Otk_Frame_Selection_List(OtkWidget container)""" 759 return _otk.Otk_Frame_Selection_List(*args)
760
761 -def Otk_Add_Selection_Item(*args):
762 """ 763 Otk_Add_Selection_Item(OtkWidget container, char text, PyFunctionObject func=None, 764 PyObject parameter=None) -> OtkWidget 765 766 This function adds the specified text string to the referenced selection-list. If selected by the 767 user, the named callback function will be called and the specified parameter will be passed. 768 In actual usage, often, all entries are assigned a common callback function with parameters assigned 769 sequentially to identify the selected item in the callback. 770 771 """ 772 return _otk.Otk_Add_Selection_Item(*args)
773
774 -def Otk_Coordinate_Selection_Lists(*args):
775 """ 776 Otk_Coordinate_Selection_Lists(OtkWidget master_list, OtkWidget subordinate_list) 777 778 This function links multiple selection lists together, so that all are controlled 779 by a single scroll-bar, and all scroll together. It is a convenient way to create 780 multiple-column scrolling selection lists. This function is to be called after the list 781 widgets have been created with Otk_Make_Selection_List, but before any items have 782 been added to the lists. One list is designated as the master-list, since it will 783 have the scroll-bar. Usually, all lists in a group are created next to each other, 784 at equal height and size. The right-most list is usually designated as the master, 785 since the scroll-bar attaches to the right side, when there are sufficient items in 786 the list. It is assumed that all lists in such a group will always hold an equal 787 number of items. See example application: multiple_selection_lists.py. 788 789 """ 790 return _otk.Otk_Coordinate_Selection_Lists(*args)
791
792 -def Otk_MakeDisk(*args):
793 """ 794 Otk_MakeDisk(OtkWidget container, float x, float y, float radius, 795 OtkColor disk_color) -> OtkWidget 796 797 Places a solid disk of the specified color and radius centered at (x,y). 798 799 """ 800 return _otk.Otk_MakeDisk(*args)
801
802 -def Otk_MakeCircle(*args):
803 """ 804 Otk_MakeCircle(OtkWidget container, float x, float y, float radius, 805 OtkColor circ_color, float thickness) -> OtkWidget 806 807 Places an empty circular ring of the specified color, radius, and line-thickness, centered at (x,y). 808 Normal thickness is 1.0, while 2.0 is double thickness, etc.. 809 810 """ 811 return _otk.Otk_MakeCircle(*args)
812
813 -def OtkMakeSliderVertical(*args):
814 """ 815 OtkMakeSliderVertical(OtkWidget container, float left, float top, float vertical_size, 816 PyFunctionObject func=None, PyObject parameter=None) -> OtkWidget 817 818 This function places a vertical slider onto the named panel. See OtkMakeSliderHorizontal above. 819 820 """ 821 return _otk.OtkMakeSliderVertical(*args)
822
823 -def OtkMakeSliderHorizontal(*args):
824 """ 825 OtkMakeSliderHorizontal(OtkWidget container, float left, float top, float horiz_size, 826 PyFunctionObject func=None, PyObject parameter=None) -> OtkWidget 827 828 This function places a horizontal slider onto the named panel. The named user function 829 is called when the slider is moved. The new slider position is passed as the first value 830 in the range 0.0 to 1.0. The given parameter is passed as the second value. The parameter 831 can be used for a variety of purposes, and it can be a pointer to a larger data structure. 832 One usage of the parameter is to uniquely identify which slider moved, when a single 833 call-back routine is used to handle multiple sliders. 834 835 """ 836 return _otk.OtkMakeSliderHorizontal(*args)
837
838 -def Otk_SetSlider(*args):
839 """ 840 Otk_SetSlider(OtkWidget slider, float position, float sz) 841 842 This function places the slider knob at the specified position, from 0.0 to 1.0. 843 For vertical sliders, 0.0 is the bottom, and 1.0 is the top. For horizontal sliders, 844 0.0 is the left side, and 1.0 is the right side. These values also correspond to 845 the values returned from the slider. 846 847 This function can also set the size of the slider knob. The default knob size is 1.0. 848 849 """ 850 return _otk.Otk_SetSlider(*args)
851
852 -def Otk_Set_Default_Slider_Width(*args):
853 """Otk_Set_Default_Slider_Width(float x)""" 854 return _otk.Otk_Set_Default_Slider_Width(*args)
855
856 -def Otk_Register_Hover_Box(*args):
857 """ 858 Otk_Register_Hover_Box(OtkWidget obj, char text) 859 860 Hover-boxes, sometimes called Tool-Tips, are useful to provide hints about buttons 861 or other controls. They pop-up a small text-message when the mouse hovers over the given 862 item for a prolonged period. 863 864 This function associates the given widget, usually a button or menu, with the text message. 865 The message will pop-up when the mouse hovers over the given widget. 866 867 """ 868 return _otk.Otk_Register_Hover_Box(*args)
869
870 -def Otk_Unregister_Hover_Box(*args):
871 """Otk_Unregister_Hover_Box(OtkWidget obj)""" 872 return _otk.Otk_Unregister_Hover_Box(*args)
873
874 -def Otk_Set_HoverBox_Style(*args):
875 """Otk_Set_HoverBox_Style(OtkColor box_color, OtkColor text_color, float text_size)""" 876 return _otk.Otk_Set_HoverBox_Style(*args)
877
878 -def Otk_Enable_Hoverboxes(*args):
879 """ 880 Otk_Enable_Hoverboxes() 881 882 This function enables all hover-boxes. 883 Hover-boxes are initially enabled by default. 884 885 """ 886 return _otk.Otk_Enable_Hoverboxes(*args)
887
888 -def Otk_Disable_Hoverboxes(*args):
889 """ 890 Otk_Disable_Hoverboxes() 891 892 This function disable all hover-boxes. 893 Hover-boxes are initially enabled by default. 894 895 """ 896 return _otk.Otk_Disable_Hoverboxes(*args)
897
898 -def OtkInitWindow(*args):
899 """ 900 OtkInitWindow(int WinWidth, int WinHeight, int argc=0) 901 902 This function is one of the most important. It produces the initial outer window, 903 called OtkOuterWindow, You specify the initial size of the window in pixels 904 for width and height. You can pass command-line arguments as argc and argv. 905 It must be called first, before any other Otk calls. OtkInitWindow is intended for 906 stand-alone applications. 907 908 """ 909 return _otk.OtkInitWindow(*args)
910
911 -def OtkMakeOuterWindow(*args):
912 """ 913 OtkMakeOuterWindow() 914 915 This function is the alternative to OtkInitWindow above, for applications that are 916 part of another OpenGL application which already opened the outer-window. 917 It initializes the Otk global variables and establishes the OtkOuterWindow widget 918 within the existing window. It must be called first, before any other Otk calls. 919 Often used with OtkUpdateCheck(). 920 921 """ 922 return _otk.OtkMakeOuterWindow(*args)
923
924 -def OtkUpdateWindow(*args):
925 """OtkUpdateWindow(int WinWidth, int WinHeight)""" 926 return _otk.OtkUpdateWindow(*args)
927
928 -def OtkUpdateCheck(*args):
929 """ 930 OtkUpdateCheck() 931 932 Check-for and handle any screen updates or user interaction events. 933 Normally, this is handled by the OtkMainLoop() function. 934 However, some applications may either be busy for a long while, or do not 935 wish to have Otk be the main routine. (OtkMainLoop never returns, it 936 just calls other routines.) In such situations, call OtkUpdateCheck() 937 periodically. It allows your application to respond to user interactions 938 or screen updates. OtkUpdateCheck simply returns if there are no pending 939 events, or handles them and returns, but never blocks. 940 941 """ 942 return _otk.OtkUpdateCheck(*args)
943
944 -def Otk_RemoveObject(*args):
945 """ 946 Otk_RemoveObject(OtkWidget objt) -> OtkWidget 947 948 Removes the referenced object, and it's children. 949 950 """ 951 return _otk.Otk_RemoveObject(*args)
952
953 -def Otk_ClearAll(*args):
954 """Otk_ClearAll()""" 955 return _otk.Otk_ClearAll(*args)
956
957 -def Set_PermanentObjs(*args):
958 """Set_PermanentObjs()""" 959 return _otk.Set_PermanentObjs(*args)
960
961 -def OtkDrawObjectTree(*args):
962 """OtkDrawObjectTree()""" 963 return _otk.OtkDrawObjectTree(*args)
964
965 -def Otk_ReDraw_Display(*args):
966 """Otk_ReDraw_Display()""" 967 return _otk.Otk_ReDraw_Display(*args)
968
969 -def Otk_Tabbed_Panel_New(*args):
970 """ 971 Otk_Tabbed_Panel_New(OtkWidget parent, int num, OtkColor color, float left, 972 float top, float width, float height, float button_height) -> OtkTabbedPanel 973 """ 974 return _otk.Otk_Tabbed_Panel_New(*args)
975
976 -def Otk_Snapshot(*args):
977 """ 978 Otk_Snapshot(char fname) 979 980 Captures an image snapshot of the current screen window to the specified filename. 981 It saves it as a PPM color image, which can be converted to other formats by 982 a variety of means, such as the NetPBM utilities. 983 984 """ 985 return _otk.Otk_Snapshot(*args)
986
987 -def Otk_SnapShot_Size(*args):
988 """ 989 Otk_SnapShot_Size(int sz) -> int 990 991 Sets snap-shot size: 1=full-size, 2=half-size. Half-size images require less time 992 to save, and are automatically anti-aliased for improved image appearance. 993 Useful for rapid repeated saves, such as capturing making frames. 994 995 """ 996 return _otk.Otk_SnapShot_Size(*args)
997
998 -def Otk_MakeMovie(*args):
999 """ 1000 Otk_MakeMovie(int on_notoff) 1001 1002 A value of 1, begins capturing frames at a regular rate. The snapshot frames are 1003 sequentially numbered, and can be combined into MPEG or AVI movies, via 1004 tools such as mencoder or ppmtompeg. 1005 1006 """ 1007 return _otk.Otk_MakeMovie(*args)
1008
1009 -def Otk_Get_Shift_Key(*args):
1010 """Otk_Get_Shift_Key() -> int""" 1011 return _otk.Otk_Get_Shift_Key(*args)
1012
1013 -def Otk_Get_Control_Key(*args):
1014 """Otk_Get_Control_Key() -> int""" 1015 return _otk.Otk_Get_Control_Key(*args)
1016
1017 -def Otk_Get_MouseButton_Clicked(*args):
1018 """Otk_Get_MouseButton_Clicked() -> int""" 1019 return _otk.Otk_Get_MouseButton_Clicked(*args)
1020
1021 -def Otk_Set_Mouse_Cursor(*args):
1022 """ 1023 Otk_Set_Mouse_Cursor(int cursor_style) 1024 1025 Sometimes it is useful to change the mouse-cursor to a different shape. 1026 1027 Where the cursor_style can be one of the following: 1028 Otk_MouseCursor_Arrow - Default pointer. 1029 Otk_MouseCursor_Cross - Useful when ready to mark a location. 1030 Otk_MouseCursor_Hand - Useful when in grabbing mode. 1031 Otk_MouseCursor_Wait - Useful while waiting for something (ex. Hour-glass) 1032 1033 """ 1034 return _otk.Otk_Set_Mouse_Cursor(*args)
1035
1036 -def Otk_object_attach(*args):
1037 """Otk_object_attach(OtkWidget parent, OtkWidget child)""" 1038 return _otk.Otk_object_attach(*args)
1039
1040 -def Otk_object_attach_at_end(*args):
1041 """Otk_object_attach_at_end(OtkWidget parent, OtkWidget child)""" 1042 return _otk.Otk_object_attach_at_end(*args)
1043
1044 -def Otk_object_attach_hidden(*args):
1045 """Otk_object_attach_hidden(OtkWidget parent, OtkWidget child)""" 1046 return _otk.Otk_object_attach_hidden(*args)
1047
1048 -def Otk_object_attach_hidden_at_front(*args):
1049 """Otk_object_attach_hidden_at_front(OtkWidget parent, OtkWidget child)""" 1050 return _otk.Otk_object_attach_hidden_at_front(*args)
1051
1052 -def Otk_object_detach(*args):
1053 """Otk_object_detach(OtkWidget child)""" 1054 return _otk.Otk_object_detach(*args)
1055
1056 -def Otk_object_detach_hidden(*args):
1057 """Otk_object_detach_hidden(OtkWidget child)""" 1058 return _otk.Otk_object_detach_hidden(*args)
1059
1060 -def Otk_object_detach_any(*args):
1061 """Otk_object_detach_any(OtkWidget child)""" 1062 return _otk.Otk_object_detach_any(*args)
1063
1064 -def Otk_object_correct_position(*args):
1065 """Otk_object_correct_position(OtkWidget obj, int descend)""" 1066 return _otk.Otk_object_correct_position(*args)
1067
1068 -def Otk_calculate_object_position(*args):
1069 """Otk_calculate_object_position(OtkWidget container, OtkWidget obj)""" 1070 return _otk.Otk_calculate_object_position(*args)
1071
1072 -def Otk_position_object(*args):
1073 """Otk_position_object(OtkWidget objpt, int absolute, float x, float y)""" 1074 return _otk.Otk_position_object(*args)
1075
1076 -def Otk_move_object(*args):
1077 """Otk_move_object(OtkWidget objpt, int absolute, float x, float y)""" 1078 return _otk.Otk_move_object(*args)
1079
1080 -def Otk_next_word(*args):
1081 """Otk_next_word(char line, char word, char delim)""" 1082 return _otk.Otk_next_word(*args)
1083
1084 -def otk_report_time(*args):
1085 """otk_report_time() -> double""" 1086 return _otk.otk_report_time(*args)
1087
1088 -def Otk_Start_Capturing_TestFile(*args):
1089 """Otk_Start_Capturing_TestFile()""" 1090 return _otk.Otk_Start_Capturing_TestFile(*args)
1091
1092 -def Otk_Close_TestFile(*args):
1093 """Otk_Close_TestFile()""" 1094 return _otk.Otk_Close_TestFile(*args)
1095
1096 -def Otk_Apply_Test_Stimuli(*args):
1097 """Otk_Apply_Test_Stimuli(char filename)""" 1098 return _otk.Otk_Apply_Test_Stimuli(*args)
1099
1100 -def Otk_Register_MouseClick_Callback(*args):
1101 """ 1102 Otk_Register_MouseClick_Callback(PyFunctionObject func=None) 1103 1104 The state value of the MouseClick_Callback function passes in 0 when the left 1105 mouse-button is down, and 1 when the mouse-button is up. When your callback 1106 function is called, the value of the global variables, 1107 cvar.Otk_MouseX and cvar.Otk_MouseY, hold the mouse position in OTK coordinates, 1108 which are the percentage of the window from 0.0 to 100.0 horizontally and vertically, 1109 respectively. 1110 1111 """ 1112 return _otk.Otk_Register_MouseClick_Callback(*args)
1113
1114 -def Otk_Register_MouseMove_Callback(*args):
1115 """ 1116 Otk_Register_MouseMove_Callback(PyFunctionObject func=None) 1117 1118 When your callback function is called, the value of the global variables, 1119 cvar.Otk_MouseX and cvar.Otk_MouseY, hold the mouse position in OTK coordinates, 1120 which are the percentage of the window from 0.0 to 100.0 horizontally and vertically, 1121 respectively. 1122 1123 """ 1124 return _otk.Otk_Register_MouseMove_Callback(*args)
1125
1126 -def Otk_Set_Window_Name(*args):
1127 """ 1128 Otk_Set_Window_Name(char name) 1129 1130 This function sets the outer-window's name in the window's title-bar. 1131 It must be called before calling: OtkInitWindow. 1132 1133 """ 1134 return _otk.Otk_Set_Window_Name(*args)
1135
1136 -def Otk_Set_Render_Quality_Hint(*args):
1137 """Otk_Set_Render_Quality_Hint(float q) -> float""" 1138 return _otk.Otk_Set_Render_Quality_Hint(*args)
1139
1140 -def OtkMainLoop(*args):
1141 """ 1142 OtkMainLoop() 1143 1144 This function is one of the most important. It is the Otk event-loop. 1145 It makes everything happen. You need to call this once, usually near the 1146 end of your application's main() routine. It does not return 1147 until the application exits. The OtkMainLoop routine is an infinite while 1148 loop that waits for keyboard or mouse input, then calls appropriate 1149 handlers, and then waits for more input. Otk is single-threaded. 1150 This function is called last, after the Otk calls which set up the initial 1151 window. 1152 1153 See also OtkUpdateCheck(). OtkMainLoop is equivalent to a while(1) loop around OtkUpdateCheck(). 1154 1155 """ 1156 return _otk.OtkMainLoop(*args)
1157 Otk_SC_Gauge1 = _otk.Otk_SC_Gauge1 1158 Otk_SC_Gauge2 = _otk.Otk_SC_Gauge2 1159 Otk_SC_LEDmeter = _otk.Otk_SC_LEDmeter 1160 Otk_SC_BarMeter = _otk.Otk_SC_BarMeter 1161 Otk_SC_XYgraph = _otk.Otk_SC_XYgraph 1162 Otk_SC_XYaxis = _otk.Otk_SC_XYaxis 1163 Otk_SC_XYdata = _otk.Otk_SC_XYdata 1164 OTK_SC_IndicatorLight = _otk.OTK_SC_IndicatorLight 1165
1166 -def Otk_MakeGauge2(*args):
1167 """ 1168 Otk_MakeGauge2(OtkWidget container, float left, float top, float horiz_size, 1169 float vert_size, char title) -> OtkWidget 1170 """ 1171 return _otk.Otk_MakeGauge2(*args)
1172
1173 -def Otk_SetGauge2(*args):
1174 """Otk_SetGauge2(OtkWidget container, float value, OtkColor tmpcolor)""" 1175 return _otk.Otk_SetGauge2(*args)
1176
1177 -def Otk_SetLEDmeter(*args):
1178 """ 1179 Otk_SetLEDmeter(OtkWidget container, float value, OtkColor offcolor, 1180 OtkColor oncolor) 1181 """ 1182 return _otk.Otk_SetLEDmeter(*args)
1183
1184 -def Otk_MakeLEDmeter(*args):
1185 """ 1186 Otk_MakeLEDmeter(OtkWidget container, float left, float top, float horiz_size, 1187 float vert_size, int nbars, char orientation, 1188 OtkColor tmpcolor) -> OtkWidget 1189 """ 1190 return _otk.Otk_MakeLEDmeter(*args)
1191
1192 -def Otk_MakeBarMeter(*args):
1193 """ 1194 Otk_MakeBarMeter(OtkWidget container, float left, float top, float horiz_size, 1195 float vert_size, char orientation, 1196 OtkColor tmpcolor) -> OtkWidget 1197 """ 1198 return _otk.Otk_MakeBarMeter(*args)
1199
1200 -def Otk_SetBarMeter(*args):
1201 """Otk_SetBarMeter(OtkWidget container, float value)""" 1202 return _otk.Otk_SetBarMeter(*args)
1203
1204 -def Otk_Plot_Init(*args):
1205 """ 1206 Otk_Plot_Init(OtkWidget container, char xlabel, char ylabel, float xpos, 1207 float ypos, float width, float height, 1208 OtkColor fgcolor, OtkColor bgcolor) -> OtkWidget 1209 """ 1210 return _otk.Otk_Plot_Init(*args)
1211
1212 -def Otk_Plot_Set_Axes(*args):
1213 """ 1214 Otk_Plot_Set_Axes(OtkWidget plotbox, float xmin, float xmax, int xgrids, 1215 float ymin, float ymax, int ygrids, OtkColor tcolor, 1216 OtkColor gcolor) 1217 """ 1218 return _otk.Otk_Plot_Set_Axes(*args)
1219
1220 -def Otk_Plot_Data(*args):
1221 """Otk_Plot_Data(OtkWidget plotbox, int npoints, OtkColor color)""" 1222 return _otk.Otk_Plot_Data(*args)
1223
1224 -def Otk_Plot_Data_AutoScaled(*args):
1225 """ 1226 Otk_Plot_Data_AutoScaled(OtkWidget plotbox, int npoints, OtkColor dcolor, OtkColor tcolor, 1227 OtkColor gcolor, int xgrids, int ygrids) 1228 """ 1229 return _otk.Otk_Plot_Data_AutoScaled(*args)
1230
1231 -def Otk_StripChart_Init(*args):
1232 """ 1233 Otk_StripChart_Init(OtkWidget plotbox, int xrange, float ymin, float ymax, 1234 OtkColor text_color, OtkColor grid_color, 1235 OtkColor data_color) 1236 """ 1237 return _otk.Otk_StripChart_Init(*args)
1238
1239 -def Otk_StripChart_AddPoint(*args):
1240 """Otk_StripChart_AddPoint(OtkWidget plotbox, float value)""" 1241 return _otk.Otk_StripChart_AddPoint(*args)
1242
1243 -def Otk_AddIndicatorLight(*args):
1244 """ 1245 Otk_AddIndicatorLight(OtkWidget container, float x, float y, float radius, 1246 OtkColor color) -> OtkWidget 1247 """ 1248 return _otk.Otk_AddIndicatorLight(*args)
1249
1250 -def Otk_SetIndicatorLight(*args):
1251 """Otk_SetIndicatorLight(OtkWidget indlght, OtkColor color)""" 1252 return _otk.Otk_SetIndicatorLight(*args)
1253
1254 -def Otk_SetIndicatorLightBorder(*args):
1255 """Otk_SetIndicatorLightBorder(OtkWidget indlght, OtkColor color)""" 1256 return _otk.Otk_SetIndicatorLightBorder(*args)
1257 Otk_White = OtkSetColor( 1.0, 1.0, 1.0 ) 1258 Otk_LightGray = OtkSetColor( 0.8, 0.8, 0.8 ) 1259 Otk_Gray = OtkSetColor( 0.5, 0.5, 0.5 ) 1260 Otk_DarkGray = OtkSetColor( 0.25, 0.25, 0.25 ) 1261 Otk_Black = OtkSetColor( 0.0, 0.0, 0.0 ) 1262 Otk_Red = OtkSetColor( 1.0, 0.0, 0.0 ) 1263 Otk_Green = OtkSetColor( 0.0, 1.0, 0.0 ) 1264 Otk_Blue = OtkSetColor( 0.0, 0.0, 1.0 ) 1265 Otk_Cyan = OtkSetColor( 0.0, 1.0, 1.0 ) 1266 Otk_Yellow = OtkSetColor( 1.0, 1.0, 0.0 ) 1267 Otk_Orange = OtkSetColor( 1.0, 0.5, 0.0 ) 1268 Otk_Violet = OtkSetColor( 1.0, 0.0, 1.0 ) 1269 1270 1271 cvar = _otk.cvar 1272 OtkOuterWindow = cvar.OtkOuterWindow 1273 Otk_MouseX = cvar.Otk_MouseX 1274 Otk_MouseY = cvar.Otk_MouseY 1275