Home | Trees | Indices | Help |
|
---|
|
The `otk` is a python binding for the otk tool kit.
|
|||
OtkTabbedPanel Proxy of C OtkTabbedPanel struct |
|||
OtkColor_record Proxy of C OtkColor_record struct |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
int |
|
||
int |
|
||
int |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
double |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
_newclass = 1
|
|||
Otk_Flat = 0
|
|||
Otk_Raised = 1
|
|||
Otk_Recessed = 2
|
|||
Otk_Invisible = 10
|
|||
Otk_ImagePanel = 20
|
|||
Otk_SC_Panel = 1
|
|||
Otk_SC_TextLabel = 2
|
|||
Otk_SC_Button = 3
|
|||
Otk_SC_FormBox = 4
|
|||
Otk_SC_Line = 5
|
|||
Otk_SC_Box = 500
|
|||
Otk_SC_hSlider = 6
|
|||
Otk_SC_vSlider = 7
|
|||
Otk_SC_textscrollbar = 8
|
|||
Otk_SC_Window = 10
|
|||
Otk_SC_WindowPane = 11
|
|||
Otk_SC_Menu_DropDown_Button = 12
|
|||
Otk_SC_Menu_Item = 14
|
|||
Otk_SC_Menu_Submenu = 15
|
|||
Otk_SC_RadioButton = 20
|
|||
Otk_SC_ToggleButton = 30
|
|||
Otk_SC_Select_List = 40
|
|||
Otk_SC_Select_List_Item = 41
|
|||
Otk_SC_Select_List_SubList = 42
|
|||
Otk_SC_TabHandle = 300
|
|||
Otk_class_panel = 1
|
|||
Otk_class_text = 2
|
|||
Otk_class_button = 3
|
|||
Otk_class_line = 5
|
|||
Otk_class_box = 500
|
|||
Otk_class_radiobutton1 = 20
|
|||
Otk_class_radiobutton2 = 21
|
|||
Otk_class_togglebutton = 30
|
|||
Otk_class_triangle = 100
|
|||
Otk_class_disk = 200
|
|||
Otk_class_circle = 250
|
|||
Otk_class_userdefd = 1000
|
|||
Otk_class_other = 2000
|
|||
Otk_subtype_plane = 0
|
|||
Otk_subtype_raised = 1
|
|||
Otk_subtype_recessed = 2
|
|||
Otk_subtype_moveable = 3
|
|||
Otk_subtype_recessed_diamond = 4
|
|||
Otk_subtype_raised_diamond = 5
|
|||
Otk_hover_mask = 1
|
|||
Otk_MouseCursor_Arrow = 0
|
|||
Otk_MouseCursor_Cross = 1
|
|||
Otk_MouseCursor_Hand = 2
|
|||
Otk_MouseCursor_Wait = 3
|
|||
Otk_Font_Vect = 0
|
|||
Otk_Font_Helv = 1
|
|||
Otk_FontDefault = 1
|
|||
Otk_FontSpacing_Mono = 0
|
|||
Otk_FontSpacing_Proportional = 1
|
|||
Otk_FontSpacingDefault = 0
|
|||
Otk_SC_Gauge1 = 2001
|
|||
Otk_SC_Gauge2 = 2002
|
|||
Otk_SC_LEDmeter = 2100
|
|||
Otk_SC_BarMeter = 2200
|
|||
Otk_SC_XYgraph = 2300
|
|||
Otk_SC_XYaxis = 2301
|
|||
Otk_SC_XYdata = 2302
|
|||
OTK_SC_IndicatorLight = 2400
|
|||
Otk_White = <otk.otk.OtkColor_record; proxy of <Swig Object of
|
|||
Otk_LightGray = <otk.otk.OtkColor_record; proxy of <Swig Objec
|
|||
Otk_Gray = <otk.otk.OtkColor_record; proxy of <Swig Object of
|
|||
Otk_DarkGray = <otk.otk.OtkColor_record; proxy of <Swig Object
|
|||
Otk_Black = <otk.otk.OtkColor_record; proxy of <Swig Object of
|
|||
Otk_Red = <otk.otk.OtkColor_record; proxy of <Swig Object of t
|
|||
Otk_Green = <otk.otk.OtkColor_record; proxy of <Swig Object of
|
|||
Otk_Blue = <otk.otk.OtkColor_record; proxy of <Swig Object of
|
|||
Otk_Cyan = <otk.otk.OtkColor_record; proxy of <Swig Object of
|
|||
Otk_Yellow = <otk.otk.OtkColor_record; proxy of <Swig Object o
|
|||
Otk_Orange = <otk.otk.OtkColor_record; proxy of <Swig Object o
|
|||
Otk_Violet = <otk.otk.OtkColor_record; proxy of <Swig Object o
|
|||
cvar = <Swig global variables>
|
|||
OtkOuterWindow = None
|
|||
Otk_MouseX = -1.0
|
|||
Otk_MouseY = -1.0
|
|||
__package__ =
|
|
OtkMakePanel(OtkWidget container, int panel_type, OtkColor panel_color, float left, float top, float horiz_size, float vert_size) -> OtkWidget This function makes a rectangular panel, either flat, raised, or recessed, within the parent window or panel. The concept of the panel, also called a container widget, is a very important aspect of Otk. All other widgets and sub-panels must be placed on a container/panel. The OtkOuterWindow is the first container/panel, and is provided by default. Placing sub-panels on a panel provides a method of dividing-up the parent panel. Returns OtkWidget. Container - is the parent container-panel, onto which the new panel is placed, and to whose frame the coordinates will be relative. Panel types currently include: Otk_Flat = Plan flat rectangle. Otk_Raised = Raised rectangle. Otk_Recessed = Recessed Rectangle. (In the future, more panel types could be added.) Color is an OtkColor record. The left, top, coordinates are relative to the parent window/container origin. All coordinates are in percentage of outer window size, where the upper left corner is (0.0,0.0) and the lower right corner is (100.0,100.0). The following related functions set additional attributes or change default settings: Otk_Set_Object_Border_Thickness( OtkWidget panel, float thickness ) Otk_Set_Default_Border_Thickness( float thickness ) OtkResizePanel( OtkWidget panel, float left, float top, float horiz_size, float vert_size ) Otk_Tabbed_Panel_New( parent, num, **names, color, left, top, width, height, button_height ) See Panel Functions for more on panel-related functions. |
OtkResizePanel(OtkWidget panel, float left, float top, float horiz_size, float vert_size) |
OtkMakeImagePanel(OtkWidget container, char file_name, float left, float top, float horiz_size, float vert_size) -> OtkWidget |
Otk_Dispose_Image(char file_name) Removes all resources associated with the named image, from the graphics-card, when an image is no longer needed. This is to be used after an image was loaded via OtkMakeImagePanel, and/or related image functions, and later the object is removed and it is known the image is no longer needed. (Normally, one copy of each image is retained in graphics memory that can be referenced by many object instances, and for rapid re-use.) |
Otk_Add_Line(OtkWidget container, OtkColor tmpcolor, float thickness, float x1, float y1, float x2, float y2) -> OtkWidget Often it is useful to add lines or separators to a GUI panel. General purpose lines can be added with the Otk_Add_Line function. Specify the window/container, line color, thickness, and the coordinates to draw the line from (x1,y1) and to (x2,y2). The coordinates are in percentages of the container-window. Boxes can be drawn as a set of four lines. |
Otk_Add_BoundingBox(OtkWidget container, OtkColor tmpcolor, float thickness, float x1, float y1, float x2, float y2) -> OtkWidget Makes a rectangular separating boundary outline, whose upper left corner is (x1,y1) and lower right corner is (x2,y2). |
OtkMakeTextLabel(OtkWidget container, char text, OtkColor text_color, float scale, float thickness, float x, float y) -> OtkWidget This function places text onto a panel or window. Returns OtkWidget. Panel - is the container-panel, or parent widget, on which the label is attached/placed. And to whose frame the coordinates will be relative! Text - is the character string array to make the label out of. Fontcolor - an OtkColor record. fontsize - A float scaling factor. 1.0 is normal size, with each character being 12.0% high by 8.0% wide in Otk coordinates. fontweight - 1.0 is normal. 2.0 is bold (double-thick). x, y - Coordinates of the origin of the label. Upper left edge relative to containing panel's upper left origin. The following related functions set additional attributes or change default settings: Otk_Modify_Text( OtkWidget label, char *text ) Otk_Modify_Text_Aspect( OtkWidget label, float aspect ) Otk_Modify_Text_Scale( OtkWidget label, float scale ) Otk_Modify_Text_Color( OtkWidget label, OtkColor text_color ) Otk_Modify_Text_Slant( OtkWidget label, float slant ) Otk_Modify_Text_Thickness( OtkWidget label, float thickness ) Otk_Modify_Text_Position( OtkWidget label, float x, float y ) Otk_Set_Text_Aspect( float aspect ) Otk_Get_Character_Size( OtkWidget label, float *width, float *height ) Otk_Get_Text_Size( OtkWidget label, float *width, float *height ) Otk_FitTextInPanel( OtkWidget label ) |
OtkMakeButton(OtkWidget container, float left, float top, float horiz_size, float vert_size, char text, PyFunctionObject func=None, PyObject parameter=None) -> OtkWidget This function makes a push-button that will call the named user's function when pressed. Returns OtkWidget. Panel - is the container-panel, or parent widget, on which the button is attached/placed. And to whose frame the coordinates will be relative! x, y - Coordinates of the button's upper-left corner on the containing panel (in %). Relative to containing panel's upper left origin. horiz_size, vert_size - Horizontal and vertical size of the button, in % of the containing window's size. Text - is the character string array to put onto the button. CallBack - Function which gets called back when button is pressed. CallParam - Parameter passed to callback function. |
OtkMakeToggleButton(OtkWidget container, float left, float top, float horiz_size, float vert_size, PyFunctionObject func=None, PyObject parameter=None) -> OtkWidget This function makes a simple toggle-button on the panel. When pressed, it toggles it's state, and calls the named user function while passing the given parameter. The parameter, such as an integer, can be used to identify which button was pressed. Returns OtkWidget handle. Where: container - is the container-panel, or parent widget, on which the button is attached/placed. And to whose frame the coordinates will be relative! x, y - Coordinates of the button's upper-left corner on the containing panel (in %). Relative to containing panel's upper left origin. horiz_size, vert_size - The horizontal and vertical size of the button in percentage of the containing window. callback - User function called when toggled. parameter - parameter passed to user function. The following are related functions: void Otk_Set_Button_State( OtkWidget button, int state ) Causes named button to assume the specified state of: 0 = not toggled, not depressed. 1 = toggled on, depressed. int Otk_Get_Button_State( OtkWidget button) Returns the named button's state as 0=not-depressed, or 1=depressed. |
OtkMakeRadioButton(OtkWidget container, float left, float top, float horiz_size, float vert_size, PyFunctionObject func=None, PyObject parameter=None) -> OtkWidget This function places a radio-button onto the panel. The first radio-button of a set must name the parent-panel/window as the container. The remaining radio-buttons in a set must name one of the other buttons in the set as their parent-container. When pressed, the pressed radio button is set, and the others are un-set. Only one radio-button in a set has the depressed state at a time. The named user function is called when pressed, and the given parameter value is passed. The parameter, such as an integer, can be used to identify which button was pressed. Returns OtkWidget handle. Where: container - is the container-panel, or parent widget, on which the button is attached/placed. And to whose frame the coordinates will be relative! x, y - Coordinates of the button's upper-left corner on the containing panel (in %). Relative to containing panel's upper left origin. horiz_size, vert_size - The horizontal and vertical size of the button in percentage of the containing window. callback - User function called when toggled. parameter - parameter passed to user function. The following are related functions: void Otk_SetRadioButton( OtkWidget radiobutton ) Causes named button to be depressed, while releasing all others in the set. int Otk_Get_Button_State( OtkWidget button) Returns the named button's state as 0=not-depressed, or 1=depressed. |
OtkMakeWindow(int panel_type, OtkColor tab_color, OtkColor panel_color, float left, float top, float horiz_size, float vert_size) -> OtkWidget This function makes a floating sub-window which can be closed by the user. Widgets can then be added to this window, like any other container-window. |
OtkSetWindowTitle(OtkWidget window, OtkColor text_color, char title) This function sets a sub-window's title. It places text in the window title-bar. |
OtkMakeTextFormBox(OtkWidget container, char text, int ncols, float x, float y, float horiz_size, float vert_size, PyFunctionObject func=None, PyObject parameter=None) -> OtkWidget This function places a text fill-in box on the panel. Initial text can be placed in the box, or it can be initialized blank (). Your own call-back function is called when <Enter> is pressed. The text can also be read from the box by the Otk_Get_Text function below. Returns OtkWidget handle. Where: container - is the container-panel, or parent widget, on which the form-box is attached/placed. And to whose frame the coordinates will be relative! text - any initial text to place in the fill-in box. Can be empty string, . ncols - number of characters to fit in the box. (Note that the width of the box is specified by the horiz_size parameters, so the ncols really sets the horizontal size of the characters to fit in the box of that size.) x, y - Location of the fill-in box's upper-left corner on the containing panel (in %). Relative to containing panel's upper left origin. horiz_size, vert_size - The horizontal and vertical size of the fill-in box in percentage of the containing window. callback - Your function to call when <enter> is pressed. parameter - arbitrary parameter to pass to your callback function. The following are related functions: void Otk_Modify_Text( OtkWidget textbox, char *text ) Places the specified text in the form box. void *Otk_Get_Text( OtkWidget textbox, char *text, int n ) Returns any text from the specified form-box into the character-array in the second parameter. The third parameter should be specified as the maximum length of the character array for safety. |
OtkMakeTextEditBox(OtkWidget container, char text, int nrows, int ncols, float left, float top, float horiz_size, float vert_size) -> OtkWidget This function places a multi-row text-edit box on the panel. Initial text can be placed in the box, or it can be initialized blank (''). The text can be read from the box by the Otk_Get_Text function below. Much like the simple text-box above, but enables more than one row, and has no callback function, since <enter> is legal character to break lines in the edit-box. Read any entered text with the Otk_Get_Text (below), perhaps initiated by an 'ok' button callback.. Returns OtkWidget handle. Where: container - is the container-panel, or parent widget, on which the edit-box is attached/placed. And to whose frame the coordinates will be relative! text - any initial text to place in the edit-box. Can be empty string, ''. ncols - number of character columns to fit in the box. (Note that the size of the box is specified by the horiz_size and vert_size parameters, so ncols and nrows really set the horizontal and vertical size of the characters to fit in the box.) nrows - number of character rows to fit in the box. x, y - Location of the edit-box's upper-left corner on the containing panel (in %). Relative to containing panel's upper left origin. horiz_size, vert_size - The horizontal and vertical size of the edit-box in percentage of the containing window. The following are related functions: OtkAddTextScrollbar( OtkWidget container, float width ) Otk_Get_Text( OtkWidget textbox, char *text, int n ) |
Otk_Browse_Files(char prompt, int maxlength, char directory, char wildcards, char filename, PyFunctionObject func=None) -> OtkWidget This is a higher level convenience widget that is useful for helping the user find files to open, save-as, import, or etc.. You can indicate the intended operation to the user through the prompt argument. The Otk_Browse_Files widget allows navigation of the file system by showing the files in the directory, and by going up and down into other directories. It allows filtering the displayed files. Defaults can be supplied for the file name, directory, and filter (wildcards), which the user can also change. The Otk_Browse_Files routine will call the user-supplied call-back routine when a file is selected. It passes the selected file's name as a character string into the call-back function, where you can open the file for reading/writing, or whatever. Where: prompt - Input (can be constant literal string). The 'title' string or purpose of the browser window. For example: 'Open' 'Save-As' 'Import' etc.. maxlength - The minimum array size of the next three character string parameters, (directory, wildcard, filename). If any strings to be returned are longer than or equal to maxlength, then the returned string is truncated to maxlength-1 characters for safety. directory - Input/Output. Must point to an allocated[*] character string array variable of size maxlength or greater. This specifies the starting directory for browsing. Often set to '.' (local directory) initially. If user browses to other directories, then last visited directory path is copied to this string. Path may be relative or absolute. filetype_filter - Input/Output. Must point to an allocated[*] character string array variable of size maxlength or greater. This specifies the type of files to filter and list, much like file-wildcards, such as *.doc . For example, '*.txt *.dat', or for everything '*'. If the user changes the file-type setting, the new setting is returned in this string. filename - Input/Output. Must point to an allocated[*] character string array variable of size maxlength or greater. This specifies any initial file-name to place in the file-name box, if any. Often, an empty file-name string is passed in. The selected file name is copied into this string. The whole purpose of this widget is to select the file-name, so this is the primary output of the routine. At most maxlength-1 characters will be copied into the file-name array. callback - The user's callback function. Function will called when file is selected. The selected file is passed as the argument. For complete example, see: File Browser Example. |
Otk_Browse_Dirs(char prompt, int maxlength, char directory, char wildcards, char dirname, PyFunctionObject func=None) -> OtkWidget Sometimes your application needs to locate a directory; not a particular file. In this case, is the Otk_Browse_Dirs function, instead of Otk_Browse_Files. This function displays only directories. Users can navigate directories by double-clicking them. The final directory is selected by clicking the OK button. |
Otk_fb_add_optional_dirfile(char dir_or_file) You can provide a pull-down menu to the right of the file-name entry, for the purpose of suggesting alternate, or recently visited, directory(s) or files |
Otk_fbrowse_size_hint(float width, float height, float horiz_center_offset, float vert_center_offset) The file and directory-browser gadgets attempt to display themselves at a reasonable size and aspect ratio, depending on the application window's size. For various reasons, you may wish to have the broswer be a different size, aspect ratio, or screen position. You can control these things with the Otk_fbrowse_size_hint function. The coordinates are all in percent of the outer window. |
Otk_Make_Menu(OtkWidget container, float left, float top, float horiz_size, float vert_size, char text) -> OtkWidget This function creates a menu pull-down. This forms the top-level entry-point to a pull-down menu. Items are then added to the menu with the Otk_Add_Menu_Item and/or Otk_Add_SubMenu functions described below. |
Otk_Add_Menu_Item(OtkWidget container, char text, PyFunctionObject func=None, PyObject parameter=None) -> OtkWidget This function adds a menu item to a pull-down menu. |
Otk_Add_SubMenu(OtkWidget container, char text) -> OtkWidget This function creates a sub-menu pull-down on an existing menu. |
Otk_Set_Menu_Selectable(OtkWidget tmpobj, int on_notoff) This function deativates (0) or activates (1) a menu-item. |
Otk_Make_Selection_List(OtkWidget container, int rows, int cols, float left, float top, float horiz_size, float vert_size) -> OtkWidget This function creates a scrollable selection-list container at the specified location and size. Use Otk_Add_Selection_Item to add items to the list. If more than rows items are added, a scroll-bar is automatically added to the list. |
Otk_Add_Selection_Item(OtkWidget container, char text, PyFunctionObject func=None, PyObject parameter=None) -> OtkWidget This function adds the specified text string to the referenced selection-list. If selected by the user, the named callback function will be called and the specified parameter will be passed. In actual usage, often, all entries are assigned a common callback function with parameters assigned sequentially to identify the selected item in the callback. |
Otk_Coordinate_Selection_Lists(OtkWidget master_list, OtkWidget subordinate_list) This function links multiple selection lists together, so that all are controlled by a single scroll-bar, and all scroll together. It is a convenient way to create multiple-column scrolling selection lists. This function is to be called after the list widgets have been created with Otk_Make_Selection_List, but before any items have been added to the lists. One list is designated as the master-list, since it will have the scroll-bar. Usually, all lists in a group are created next to each other, at equal height and size. The right-most list is usually designated as the master, since the scroll-bar attaches to the right side, when there are sufficient items in the list. It is assumed that all lists in such a group will always hold an equal number of items. See example application: multiple_selection_lists.py. |
Otk_MakeDisk(OtkWidget container, float x, float y, float radius, OtkColor disk_color) -> OtkWidget Places a solid disk of the specified color and radius centered at (x,y). |
Otk_MakeCircle(OtkWidget container, float x, float y, float radius, OtkColor circ_color, float thickness) -> OtkWidget Places an empty circular ring of the specified color, radius, and line-thickness, centered at (x,y). Normal thickness is 1.0, while 2.0 is double thickness, etc.. |
OtkMakeSliderVertical(OtkWidget container, float left, float top, float vertical_size, PyFunctionObject func=None, PyObject parameter=None) -> OtkWidget This function places a vertical slider onto the named panel. See OtkMakeSliderHorizontal above. |
OtkMakeSliderHorizontal(OtkWidget container, float left, float top, float horiz_size, PyFunctionObject func=None, PyObject parameter=None) -> OtkWidget This function places a horizontal slider onto the named panel. The named user function is called when the slider is moved. The new slider position is passed as the first value in the range 0.0 to 1.0. The given parameter is passed as the second value. The parameter can be used for a variety of purposes, and it can be a pointer to a larger data structure. One usage of the parameter is to uniquely identify which slider moved, when a single call-back routine is used to handle multiple sliders. |
Otk_SetSlider(OtkWidget slider, float position, float sz) This function places the slider knob at the specified position, from 0.0 to 1.0. For vertical sliders, 0.0 is the bottom, and 1.0 is the top. For horizontal sliders, 0.0 is the left side, and 1.0 is the right side. These values also correspond to the values returned from the slider. This function can also set the size of the slider knob. The default knob size is 1.0. |
Otk_Register_Hover_Box(OtkWidget obj, char text) Hover-boxes, sometimes called Tool-Tips, are useful to provide hints about buttons or other controls. They pop-up a small text-message when the mouse hovers over the given item for a prolonged period. This function associates the given widget, usually a button or menu, with the text message. The message will pop-up when the mouse hovers over the given widget. |
This function enables all hover-boxes. Hover-boxes are initially enabled by default. |
This function disable all hover-boxes. Hover-boxes are initially enabled by default. |
OtkInitWindow(int WinWidth, int WinHeight, int argc=0) This function is one of the most important. It produces the initial outer window, called OtkOuterWindow, You specify the initial size of the window in pixels for width and height. You can pass command-line arguments as argc and argv. It must be called first, before any other Otk calls. OtkInitWindow is intended for stand-alone applications. |
This function is the alternative to OtkInitWindow above, for applications that are part of another OpenGL application which already opened the outer-window. It initializes the Otk global variables and establishes the OtkOuterWindow widget within the existing window. It must be called first, before any other Otk calls. Often used with OtkUpdateCheck(). |
Check-for and handle any screen updates or user interaction events. Normally, this is handled by the OtkMainLoop() function. However, some applications may either be busy for a long while, or do not wish to have Otk be the main routine. (OtkMainLoop never returns, it just calls other routines.) In such situations, call OtkUpdateCheck() periodically. It allows your application to respond to user interactions or screen updates. OtkUpdateCheck simply returns if there are no pending events, or handles them and returns, but never blocks. |
Otk_RemoveObject(OtkWidget objt) -> OtkWidget Removes the referenced object, and it's children. |
Otk_Tabbed_Panel_New(OtkWidget parent, int num, OtkColor color, float left, float top, float width, float height, float button_height) -> OtkTabbedPanel |
Otk_Snapshot(char fname) Captures an image snapshot of the current screen window to the specified filename. It saves it as a PPM color image, which can be converted to other formats by a variety of means, such as the NetPBM utilities. |
Otk_SnapShot_Size(int sz) -> int Sets snap-shot size: 1=full-size, 2=half-size. Half-size images require less time to save, and are automatically anti-aliased for improved image appearance. Useful for rapid repeated saves, such as capturing making frames. |
Otk_MakeMovie(int on_notoff) A value of 1, begins capturing frames at a regular rate. The snapshot frames are sequentially numbered, and can be combined into MPEG or AVI movies, via tools such as mencoder or ppmtompeg. |
Otk_Set_Mouse_Cursor(int cursor_style) Sometimes it is useful to change the mouse-cursor to a different shape. Where the cursor_style can be one of the following: Otk_MouseCursor_Arrow - Default pointer. Otk_MouseCursor_Cross - Useful when ready to mark a location. Otk_MouseCursor_Hand - Useful when in grabbing mode. Otk_MouseCursor_Wait - Useful while waiting for something (ex. Hour-glass) |
Otk_Register_MouseClick_Callback(PyFunctionObject func=None) The state value of the MouseClick_Callback function passes in 0 when the left mouse-button is down, and 1 when the mouse-button is up. When your callback function is called, the value of the global variables, cvar.Otk_MouseX and cvar.Otk_MouseY, hold the mouse position in OTK coordinates, which are the percentage of the window from 0.0 to 100.0 horizontally and vertically, respectively. |
Otk_Register_MouseMove_Callback(PyFunctionObject func=None) When your callback function is called, the value of the global variables, cvar.Otk_MouseX and cvar.Otk_MouseY, hold the mouse position in OTK coordinates, which are the percentage of the window from 0.0 to 100.0 horizontally and vertically, respectively. |
Otk_Set_Window_Name(char name) This function sets the outer-window's name in the window's title-bar. It must be called before calling: OtkInitWindow. |
This function is one of the most important. It is the Otk event-loop. It makes everything happen. You need to call this once, usually near the end of your application's main() routine. It does not return until the application exits. The OtkMainLoop routine is an infinite while loop that waits for keyboard or mouse input, then calls appropriate handlers, and then waits for more input. Otk is single-threaded. This function is called last, after the Otk calls which set up the initial window. See also OtkUpdateCheck(). OtkMainLoop is equivalent to a while(1) loop around OtkUpdateCheck(). |
Otk_MakeGauge2(OtkWidget container, float left, float top, float horiz_size, float vert_size, char title) -> OtkWidget |
Otk_SetLEDmeter(OtkWidget container, float value, OtkColor offcolor, OtkColor oncolor) |
Otk_MakeLEDmeter(OtkWidget container, float left, float top, float horiz_size, float vert_size, int nbars, char orientation, OtkColor tmpcolor) -> OtkWidget |
Otk_MakeBarMeter(OtkWidget container, float left, float top, float horiz_size, float vert_size, char orientation, OtkColor tmpcolor) -> OtkWidget |
Otk_Plot_Init(OtkWidget container, char xlabel, char ylabel, float xpos, float ypos, float width, float height, OtkColor fgcolor, OtkColor bgcolor) -> OtkWidget |
Otk_Plot_Set_Axes(OtkWidget plotbox, float xmin, float xmax, int xgrids, float ymin, float ymax, int ygrids, OtkColor tcolor, OtkColor gcolor) |
Otk_Plot_Data_AutoScaled(OtkWidget plotbox, int npoints, OtkColor dcolor, OtkColor tcolor, OtkColor gcolor, int xgrids, int ygrids) |
Otk_StripChart_Init(OtkWidget plotbox, int xrange, float ymin, float ymax, OtkColor text_color, OtkColor grid_color, OtkColor data_color) |
Otk_AddIndicatorLight(OtkWidget container, float x, float y, float radius, OtkColor color) -> OtkWidget |
|
Otk_White
|
Otk_LightGray
|
Otk_Gray
|
Otk_DarkGray
|
Otk_Black
|
Otk_Red
|
Otk_Green
|
Otk_Blue
|
Otk_Cyan
|
Otk_Yellow
|
Otk_Orange
|
Otk_Violet
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Jun 15 08:56:58 2009 | http://epydoc.sourceforge.net |