def fl_create_bitmap_cursor(source, maskstr, width, height, hotx, hoty): """fl_create_bitmap_cursor(source, maskstr, width, height, hotx, hoty) -> cursornum Creates a bitmap cursor, using cursors other than those defined by the standard cursor font. Parameters ---------- source : str of ubytes bitmap to be used as cursor. maskstr : str of ubytes bitmap defining the shape of the cursor. The pixels set to 1 define which source pixels are displayed. If it is empty ("") all bits in source are displayed. width : int width of cursor height : int height of cursor hotx : int horizontal hotspot of the cursor (relative to the source origin) hoty : int vertical hotspot of the cursor (relative to the source origin) Returns ------- cursornum : int cursor id Examples -------- >>> *todo* Notes ----- Status: NA-UTest + Doc + Demo = OK """ _fl_create_bitmap_cursor = library.cfuncproto( library.load_so_libforms(), "fl_create_bitmap_cursor", cty.c_int, [xfdata.STRING, xfdata.STRING, cty.c_int, cty.c_int, cty.c_int, cty.c_int], """int fl_create_bitmap_cursor(const char * source, const char * mask, int w, int h, int hotx, int hoty)""") library.check_if_flinitialized() s_source = library.convert_to_bytestrc(source) if not maskstr: # if it is empty s_maskstr = cty.cast(maskstr, cty.c_void_p) else: s_maskstr = library.convert_to_bytestrc(maskstr) i_width = library.convert_to_intc(width) i_height = library.convert_to_FL_Coord(height) i_hotx = library.convert_to_intc(hotx) i_hoty = library.convert_to_intc(hoty) library.keep_elem_refs(source, maskstr, width, height, hotx, hoty, \ s_source, s_maskstr, i_width, i_height, i_hotx, i_hoty) retval = _fl_create_bitmap_cursor(s_source, s_maskstr, i_width, \ i_height, i_hotx, i_hoty) return retval
def fl_set_pixmap_align(ptr_flobject, align, xmargin, ymargin): """fl_set_pixmap_align(ptr_flobject, align, xmargin, ymargin) Changes alignment of a pixmap. By default it is displayed centered inside the bounding box; although you can place a pixmap outside of the bounding box, it probably is not a good idea. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT pixmap flobject align : int alignment of pixmap. Values (from xfdata.py) - FL_ALIGN_CENTER (In the middle of the box, inside it), - FL_ALIGN_TOP (To the top of the box, outside it), - FL_ALIGN_BOTTOM (To the bottom of the box, outside it), - FL_ALIGN_LEFT (To the left of the box, outside it), - FL_ALIGN_RIGHT (To the right of the box, outside it), - FL_ALIGN_LEFT_TOP (To the left and top of the box, outside it), - FL_ALIGN_RIGHT_TOP (To the right and top of the box, outside it), - FL_ALIGN_LEFT_BOTTOM (To the left and bottom of box, outside), - FL_ALIGN_RIGHT_BOTTOM (To the right and bottom of box, outside), - FL_ALIGN_INSIDE (places the text inside the box), - FL_ALIGN_VERT (not functional yet). Bitwise OR with FL_ALIGN_INSIDE is allowed. xmargin : int extra margin to leave in addition to the flobject border width. By default it is 3. ymargin : int extra margin to leave in addition to the flobject border height. By default it is 3. Examples -------- >>> fl_set_pixmap_align(xpmobj, xfdata.FL_ALIGN_CENTER, 10, 10) Notes ----- Status: UnitTest + Doc + Demo = OK """ _fl_set_pixmap_align = library.cfuncproto( library.load_so_libforms(), "fl_set_pixmap_align", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int, cty.c_int, cty.c_int], """void fl_set_pixmap_align(FL_OBJECT * ob, int align, int xmargin, int ymargin)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) library.checkfatal_allowed_value_in_list(align, xfdata.ALIGN_list) i_align = library.convert_to_intc(align) i_xmargin = library.convert_to_intc(xmargin) i_ymargin = library.convert_to_intc(ymargin) library.keep_elem_refs(ptr_flobject, align, xmargin, ymargin, \ i_align, i_xmargin, i_ymargin) _fl_set_pixmap_align(ptr_flobject, i_align, i_xmargin, i_ymargin)
def fl_set_chart_baseline(ptr_flobject, yesno): """fl_set_chart_baseline(ptr_flobject, yesno) Turns on or off the chart's baseline. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT chart flobject yesno : int flag for baseline. Values 0 (if disabled) or 1 (if enabled) Examples -------- >>> fl_set_chart_baseline(pchrtobj, 1) Notes ----- Status: NA-UTest + Doc + NoDemo = Maybe """ _fl_set_chart_baseline = library.cfuncproto( library.load_so_libforms(), "fl_set_chart_baseline", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_chart_baseline(FL_OBJECT * ob, int iYesNo)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_yesno = library.convert_to_intc(yesno) library.keep_elem_refs(ptr_flobject, yesno, i_yesno) _fl_set_chart_baseline(ptr_flobject, i_yesno)
def fl_set_input_scroll(ptr_flobject, yesno): """fl_set_input_scroll(ptr_flobject, yesno) Turn on or off scrolling for an input field (for both multiline and single line input field). Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT input flobject yesno : int flag to enable/disable scrolling. Values 0 (disabled) or 1 (enabled) Examples -------- >>> fl_set_input_scroll(pinpobj, 1) Notes ----- Status: NA-UTest + NoDoc + NoDemo = Maybe """ _fl_set_input_scroll = library.cfuncproto( library.load_so_libforms(), "fl_set_input_scroll", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_input_scroll(FL_OBJECT * ob, int yes)""", ) library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_yesno = library.convert_to_intc(yesno) library.keep_elem_refs(ptr_flobject, yesno, i_yesno) _fl_set_input_scroll(ptr_flobject, i_yesno)
def fl_set_chart_autosize(ptr_flobject, yesno): """fl_set_chart_autosize(ptr_flobject, yesno) Defines whether the chart should autosize along the x-axis. Normally width of the bars and distance between the points in a line-chart are normally scaled. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT chart flobject yesno : int autosize flag. Values 1 (if enabled) or 0 (if disabled). If it is set to 0 the width of the bars will be such that the maximum number of items fits in the box. Examples -------- >>> fl_set_chart_autosize(pchrtobj, 1) Notes ----- Status: NA-UTest + Doc + Demo = OK """ _fl_set_chart_autosize = library.cfuncproto( library.load_so_libforms(), "fl_set_chart_autosize", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_chart_autosize(FL_OBJECT * ob, int autosize)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_yesno = library.convert_to_intc(yesno) library.keep_elem_refs(ptr_flobject, yesno, i_yesno) _fl_set_chart_autosize(ptr_flobject, i_yesno)
def fl_set_timer_countup(ptr_flobject, yesno): """fl_set_timer_countup(ptr_flobject, yesno) Changes timer behavior so the timer counts up and shows elapsed time. By default, a timer counts down toward zero and the value shown (for xfdata.FL_VALUE_TIMERs) is the time left until the timer expires. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT timer flobject yesno : int flag to set count up or down. Values 0 (counts down and shows time left) or 1 (counts up and shows elapsed time) Examples -------- >>> fl_set_timer_countup(ptimerobj, 1) Notes ----- Status: NA-UTest + Doc + Demo = OK """ _fl_set_timer_countup = library.cfuncproto( library.load_so_libforms(), "fl_set_timer_countup", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_timer_countup(FL_OBJECT * ob, int yes)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_yesno = library.convert_to_intc(yesno) library.keep_elem_refs(ptr_flobject, yesno, i_yesno) _fl_set_timer_countup(ptr_flobject, i_yesno)
def fl_set_pixmapbutton_focus_outline(ptr_flobject, yesno): """fl_set_pixmapbutton_focus_outline(ptr_flobject, yesno) Enables or disables the focus outline of the pixmap button. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT button flobject yesno : int flag to enable (1) or disable (0) the focus outline Examples -------- >>> fl_set_pixmapbutton_focus_outline(pmapobj, 1) Notes ----- Status: NA-UTest + Doc + NoDemo = Maybe """ _fl_set_pixmapbutton_focus_outline = library.cfuncproto( library.load_so_libforms(), "fl_set_pixmapbutton_focus_outline", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_pixmapbutton_focus_outline(FL_OBJECT * ob, int yes)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_yesno = library.convert_to_intc(yesno) library.keep_elem_refs(ptr_flobject, yesno, i_yesno) _fl_set_pixmapbutton_focus_outline(ptr_flobject, i_yesno)
def fl_set_folder_bynumber(ptr_flobject, seqnum): """fl_set_folder_bynumber(ptr_flobject, seqnum) Defines which folder to show by its sequence number. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT tabfolder flobject seqnum : int sequence number of folder to show. The first tab on the left has a sequence number 1, the second 2 etc.. Examples -------- >>> fl_set_floder_bynumber(ptbfobj, 2) Notes ----- Status: NA-UTest + Doc + Demo = OK """ _fl_set_folder_bynumber = library.cfuncproto( library.load_so_libforms(), "fl_set_folder_bynumber", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_folder_bynumber(FL_OBJECT * ob, int num)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_seqnum = library.convert_to_intc(seqnum) library.keep_elem_refs(ptr_flobject, seqnum, i_seqnum) _fl_set_folder_bynumber(ptr_flobject, i_seqnum)
def fl_set_canvas_depth(ptr_flobject, depth): """fl_set_canvas_depth(ptr_flobject, depth) Defines the depth of canvas flobject. Changing depth does not generally make sense once the canvas window is created (which happens when the parent form is shown). Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT canvas flobject depth : int depth value of canvas. Values e.g. 8, 16, 24?, 32, ... Examples -------- >>> fl_set_canvas_depth(pcanvobj, 32) Notes ----- Status: NA-UTest + Doc + NoDemo = Maybe """ _fl_set_canvas_depth = library.cfuncproto( library.load_so_libforms(), "fl_set_canvas_depth", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_canvas_depth(FL_OBJECT * obj, int depth)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_depth = library.convert_to_intc(depth) library.keep_elem_refs(ptr_flobject, depth, i_depth) _fl_set_canvas_depth(ptr_flobject, i_depth)
def fl_set_counter_min_repeat(ptr_flobject, fdelay): """fl_set_counter_min_repeat(ptr_flobject, fdelay) Defines the final delay of a counter. By default the counter value changes first slowly and the rate of change then accelerates until a final speed is reached. The default final delay is 50 ms. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT counter flobject fdelay : int final delay in milliseconds Examples -------- >>> fl_set_counter_min_repeat(pcntrobj, 100) Notes ----- Status: NA-UTest + Doc + NoDemo = Maybe """ _fl_set_counter_min_repeat = library.cfuncproto( library.load_so_libforms(), "fl_set_counter_min_repeat", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_counter_min_repeat(FL_OBJECT * ob, int millisec)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_fdelay = library.convert_to_intc(fdelay) library.keep_elem_refs(ptr_flobject, fdelay, i_fdelay) _fl_set_counter_min_repeat(ptr_flobject, i_fdelay)
def fl_set_counter_speedjump(ptr_flobject, yesno): """fl_set_counter_speedjump(ptr_flobject, yesno) Makes only the first change of the counter has a different delay from all the following ones. The delay for the first change of the counter value will then be the one set by fl_set_counter_repeat() and the following delays last as long as set by fl_set_counter_min_repeat(). Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT counter flobject yesno : int flag. Values 1 (to set speedjump) or 0 (to unset speedjump) Examples -------- >>> fl_set_counter_speedjump(pcntrobj, 1) Notes ----- Status: NA-UTest + Doc + NoDemo = Maybe """ _fl_set_counter_speedjump = library.cfuncproto( library.load_so_libforms(), "fl_set_counter_speedjump", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_counter_speedjump(FL_OBJECT * ob, int yes_no)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_yesno = library.convert_to_intc(yesno) library.keep_elem_refs(ptr_flobject, yesno, i_yesno) _fl_set_counter_speedjump(ptr_flobject, i_yesno)
def fl_set_input_cursor_visible(ptr_flobject, yesno): """fl_set_input_cursor_visible(ptr_flobject, yesno) Turns on or off the cursor of the input field. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT input flobject yesno : int flag to set/unset cursor visibility. Values 1 (visible) or 0 (not visible) Examples -------- >>> fl_set_input_cursor_visible(pinpobj, 1) Notes ----- Status: NA-UTest + Doc + NoDemo = Maybe """ _fl_set_input_cursor_visible = library.cfuncproto( library.load_so_libforms(), "fl_set_input_cursor_visible", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_input_cursor_visible(FL_OBJECT * ob, int visible)""", ) library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_yesno = library.convert_to_intc(yesno) library.keep_elem_refs(ptr_flobject, yesno, i_yesno) _fl_set_input_cursor_visible(ptr_flobject, i_yesno)
def fl_set_counter_precision(ptr_flobject, precis): """fl_set_counter_precision(ptr_flobject, precis) Defines the precision (number of digits after the dot) with which the counter value is displayed. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT counter flobject precis : int precision to be set Examples -------- >>> fl_set_counter_precision(pcntrobj, 2) Notes ----- Status: NA-UTest + Doc + Demo = OK """ _fl_set_counter_precision = library.cfuncproto( library.load_so_libforms(), "fl_set_counter_precision", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_counter_precision(FL_OBJECT * ob, int prec)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_precis = library.convert_to_intc(precis) library.keep_elem_refs(ptr_flobject, precis, i_precis) _fl_set_counter_precision(ptr_flobject, i_precis)
def fl_set_input_xoffset(ptr_flobject, offset): """fl_set_input_xoffset(ptr_flobject, offset) Scrolls programmatically horizontally (to the left). Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT input flobject offset : int positive number of pixels to scroll to the left relative to the nominal position of the text lines. Examples -------- >>> *todo* Notes ----- Status: NA-UTest + Doc + NoDemo = Maybe """ _fl_set_input_xoffset = library.cfuncproto( library.load_so_libforms(), "fl_set_input_xoffset", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_input_xoffset(FL_OBJECT * ob, int xoff)""", ) library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_offset = library.convert_to_intc(offset) library.keep_elem_refs(ptr_flobject, offset, i_offset) _fl_set_input_xoffset(ptr_flobject, i_offset)
def fl_set_input_topline(ptr_flobject, linenum): """fl_set_input_topline(ptr_flobject, linenum) Scrolls vertically an input flobject (for input fields of type xfdata.FL_MULTILINE_INPUT only). Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT input flobject linenum : int the new top line id (starting from 1) in the input field. Examples -------- >>> fl_set_input_topline(ptr_flobject, 3) Notes ----- Status: NA-UTest + Doc + NoDemo = Maybe """ _fl_set_input_topline = library.cfuncproto( library.load_so_libforms(), "fl_set_input_topline", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_input_topline(FL_OBJECT * ob, int top)""", ) library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_linenum = library.convert_to_intc(linenum) library.keep_elem_refs(ptr_flobject, linenum, i_linenum) _fl_set_input_topline(ptr_flobject, i_linenum)
def fl_set_input_selected(ptr_flobject, yesno): """fl_set_input_selected(ptr_flobject, yesno) Selects or deselects the current input. It places the cursor at the end of the string when selected. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT input flobject yesno : int flag to deselect/select input. Values 0 (deselected) or 1 (selected) Examples -------- >>> fl_set_input_selected(pinpobj, 1) Notes ----- Status: NA-UTest + NoDoc + NoDemo = Maybe """ _fl_set_input_selected = library.cfuncproto( library.load_so_libforms(), "fl_set_input_selected", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_input_selected(FL_OBJECT * ob, int yes)""", ) library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_yesno = library.convert_to_intc(yesno) library.keep_elem_refs(ptr_flobject, yesno, i_yesno) _fl_set_input_selected(ptr_flobject, i_yesno)
def fl_set_clock_ampm(ptr_flobject, yesno): """fl_set_clock_ampm(ptr_flobject, yesno) Switches the display to 12hr system (am-pm). By default, the digital clock uses 24hr system. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT clock flobject yesno : int flag. Values 1 (12hr system used) or 0 (24hr system used) Examples -------- >>> fl_set_clock_ampm(pclkobj, 1) Notes ----- Status: NA-UTest + Doc + NoDemo = Maybe """ _fl_set_clock_ampm = library.cfuncproto( library.load_so_libforms(), "fl_set_clock_ampm", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_clock_ampm(FL_OBJECT * ob, int y)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_yesno = library.convert_to_intc(yesno) library.keep_elem_refs(ptr_flobject, yesno, i_yesno) _fl_set_clock_ampm(ptr_flobject, i_yesno)
def fl_set_slider_precision(ptr_flobject, precis): """fl_set_slider_precision(ptr_flobject, precis) Defines the precision which value a valslider is shown with. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT slider flobject precis : int precision number of shown value after the dot. Examples -------- >>> fl_set_slider_precision(sldobj, 3) Notes ----- Status: NA-UTest + Doc + Demo = OK """ _fl_set_slider_precision = library.cfuncproto( library.load_so_libforms(), "fl_set_slider_precision", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_slider_precision(FL_OBJECT * ob, int prec)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_precis = library.convert_to_intc(precis) library.keep_elem_refs(ptr_flobject, precis, i_precis) _fl_set_slider_precision(ptr_flobject, i_precis)
def fl_delete_folder_bynumber(ptr_flobject, seqnum): """fl_delete_folder_bynumber(ptr_flobject, seqnum) Removes a folder from a tabfolder flobject by its sequence number. After deletion, the number of folders in the tabfolder as well as the sequence numbers are updated. This means if you want to delete all folders after the second folder, you can do that by deleting the third folder repeatedly. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT tabfolder flobject seqnum : int sequence number of folder to be deleted Examples -------- >>> *todo* Notes ----- Status: NA-UTest + Doc + NoDemo = Maybe """ _fl_delete_folder_bynumber = library.cfuncproto( library.load_so_libforms(), "fl_delete_folder_bynumber", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_delete_folder_bynumber(FL_OBJECT * ob, int num)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_seqnum = library.convert_to_intc(seqnum) library.keep_elem_refs(ptr_flobject, seqnum, i_seqnum) _fl_delete_folder_bynumber(ptr_flobject, i_seqnum)
def fl_set_slider_repeat(ptr_flobject, tdelay): """fl_set_slider_repeat(ptr_flobject, tdelay) Defines the time delay between jumps of the scrollbar knob when the mouse button is kept pressed down on the scrollbar outside of the knobs area. The delay for the very first jump is twice that long in order to avoid jumping to start too soon when only a single click was intended but the user is a bit slow in releasing the mouse button. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT slider flobject tdelay : int time delay (in milliseconds) to be set. Default value is 100 ms Examples -------- >>> fl_set_slider_repeat(pslobj, 200) Notes ----- Status: NA-UTest + Doc + NoDemo = Maybe """ _fl_set_slider_repeat = library.cfuncproto( library.load_so_libforms(), "fl_set_slider_repeat", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_get_slider_repeat(FL_OBJECT * obj, int)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_tdelay = library.convert_to_intc(tdelay) library.keep_elem_refs(ptr_flobject, tdelay, i_tdelay) _fl_set_slider_repeat(ptr_flobject, i_tdelay)
def fl_set_default_tabfolder_corner(numpixels): """fl_set_default_tabfolder_corner(numpixels) -> oldnumpixels Adjusts the corner pixels, changing appearance of the tabs. Parameters ---------- numpixels : int number of corner pixels. By default it is 3. Returns ------- oldnumpixels : int old number of corner pixels Examples -------- >>> *todo* Notes ----- Status: NA-UTest + Doc + NoDemo = Maybe """ _fl_set_default_tabfolder_corner = library.cfuncproto( library.load_so_libforms(), "fl_set_default_tabfolder_corner", cty.c_int, [cty.c_int], """int fl_set_default_tabfolder_corner(int n):""") library.check_if_flinitialized() i_numpixels = library.convert_to_intc(numpixels) library.keep_elem_refs(numpixels, i_numpixels) retval = _fl_set_default_tabfolder_corner(i_numpixels) return retval
def fl_add_pixmap(pixmaptype, xpos, ypos, width, height, label): """fl_add_pixmap(pixmaptype, xpos, ypos, width, height, label) -> ptr_flobject Adds a pixmap flobject (plain text multi-color image format). The label is by default placed below the pixmap. The pixmap is empty on creation. Parameters ---------- pixmaptype : int type of pixmap to be added. Values (from xfdata.py) FL_NORMAL_PIXMAP (normal pixmap flobject type) xpos : int horizontal position (upper-left corner) ypos : int vertical position of bitmap (upper-left corner) width : int width in coord units height : int height in coord units label : str text label of pixmap Returns ------- ptr_flobject : pointer to xfdata.FL_OBJECT flobject created Examples -------- >>> fl_add_pixmap(xfdata.FL_NORMAL_PIXMAP, 320, 200, 100, 100, "MyPixmap") Notes ----- Status: UnitTest + Doc + Demo = OK """ _fl_add_pixmap = library.cfuncproto( library.load_so_libforms(), "fl_add_pixmap", cty.POINTER(xfdata.FL_OBJECT), [cty.c_int, xfdata.FL_Coord, xfdata.FL_Coord, xfdata.FL_Coord, xfdata.FL_Coord, xfdata.STRING], """FL_OBJECT * fl_add_pixmap(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label)""") library.check_if_flinitialized() library.checkfatal_allowed_value_in_list(pixmaptype, \ xfdata.PIXMAPTYPE_list) i_pixmaptype = library.convert_to_intc(pixmaptype) i_xpos = library.convert_to_FL_Coord(xpos) i_ypos = library.convert_to_FL_Coord(ypos) i_width = library.convert_to_FL_Coord(width) i_height = library.convert_to_FL_Coord(height) s_label = library.convert_to_bytestrc(label) library.keep_elem_refs(pixmaptype, xpos, ypos, width, height, \ label, i_pixmaptype, i_xpos, i_ypos, i_width, i_height, \ s_label) retval = _fl_add_pixmap(i_pixmaptype, i_xpos, i_ypos, i_width, \ i_height, s_label) return retval
def fl_canvas_yield_to_shortcut(ptr_flobject, yesno): """fl_canvas_yield_to_shortcut(ptr_flobject, yesno) Enables or disables keyboard input's stealing by canvas. By default, flobjects with shortcuts appearing on the same form as the canvas will "steal" keyboard inputs if they match the shortcuts. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT canvas flobject yesno : int flag to enable/disable keyboard input's stealing by canvas. Values 0 (to disable) or 1 (to enable) Examples -------- >>> fl_canvas_yield_to_shortcut(pcanvobj, 1) Notes ----- Status: NA-UTest + Doc + NoDemo = Maybe """ _fl_canvas_yield_to_shortcut = library.cfuncproto( library.load_so_libforms(), "fl_canvas_yield_to_shortcut", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_canvas_yield_to_shortcut(FL_OBJECT * ob, int yes)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_yesno = library.convert_to_intc(yesno) library.keep_elem_refs(ptr_flobject, yesno, i_yesno) _fl_canvas_yield_to_shortcut(ptr_flobject, i_yesno)
def fl_get_positioner_numb(ptr_flobject): """fl_get_positioner_numb(ptr_flobject) -> mousebtn Retrieves the number of the last used mouse button. It is returned by flbasic.fl_mouse_button, too. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT positioner flobject Returns ------- mousebtn : int *todo* Example ------- >>> *todo* Notes ----- Status: NA-UTest + Doc + NoDemo = OK """ _fl_get_positioner_numb = library.cfuncproto( library.load_so_libforms(), "fl_get_positioner_numb", cty.c_int, [cty.POINTER(xfdata.FL_OBJECT)], """int fl_get_positioner_numb(FL_OBJECT * ob)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_mousebtn = library.convert_to_intc(mousebtn) library.keep_elem_refs(ptr_flobject, mousebtn, i_mousebtn) retval = _fl_get_positioner_numb(ptr_flobject, i_mousebtn) return retval
def fl_set_glcanvas_direct(ptr_flobject, yesno): """fl_set_glcanvas_direct(ptr_flobject, yesno) Changes the rendering context created by a glcanvas flobject. By default it uses direct rendering (i.e. by-passing the Xserver). Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT glcanvas flobject yesno : int flag to use direct or through-Xserver rendering. Values 0 (to use Xserver rendering) or 1 (to use direct rendering) Examples -------- >>> fl_set_glcanvas_direct(pglcnvobj, 0) Notes ----- Status: NA-UTest + Doc + NoDemo = Maybe """ _fl_set_glcanvas_direct = library.cfuncproto( library.load_so_libformsgl(), "fl_set_glcanvas_direct", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_glcanvas_direct(FL_OBJECT * ob, int direct)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_yesno = library.convert_to_intc(yesno) library.keep_elem_refs(ptr_flobject, yesno, i_yesno) _fl_set_glcanvas_direct(ptr_flobject, i_yesno)
def fl_set_formbrowser_scroll(ptr_flobject, howscroll): """fl_set_formbrowser_scroll(ptr_flobject, howscroll) Changes the vertical scrollbar so each action of the scrollbar scrolls to the next forms. By default it scrolls a fixed number of pixels. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT formbrowser flobject howscroll : int How it scrolls. Values (from xfdata.py) - FL_SMOOTH_SCROLL (Default scroll), - FL_JUMP_SCROLL (Scrolls in form increments). Examples -------- >>> fl_set_formbrowser_scroll(pfrmbrobj, xfdata.FL_JUMP_SCROLL) Notes ----- Status: NA-UTest + Doc + NoDemo = Maybe """ _fl_set_formbrowser_scroll = library.cfuncproto( library.load_so_libforms(), "fl_set_formbrowser_scroll", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_formbrowser_scroll(FL_OBJECT * ob, int how)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) library.checkfatal_allowed_value_in_list(howscroll, \ xfdata.FORMBRWSSCROLL_list) i_howscroll = library.convert_to_intc(howscroll) library.keep_elem_refs(ptr_flobject, howscroll, i_howscroll) _fl_set_formbrowser_scroll(ptr_flobject, i_howscroll)
def fl_set_button(ptr_flobject, yesno): """fl_set_button(ptr_flobject, yesno) Defines the button state (not pushed, or pushed). Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT button flobject yesno : int state of button to be set. Values 0 (if not pushed) or 1 (if pushed) Examples -------- >>> fl_set_button(btnobj, 1) Notes ----- Status: NA-UTest + Doc + Demo = OK """ _fl_set_button = library.cfuncproto( library.load_so_libforms(), "fl_set_button", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_button(FL_OBJECT * ob, int pushed)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_yesno = library.convert_to_intc(yesno) library.keep_elem_refs(ptr_flobject, yesno, i_yesno) _fl_set_button(ptr_flobject, yesno)
def fl_add_formbrowser(frmbrwstype, xpos, ypos, width, height, label): """fl_add_formbrowser(frmbrwstype, xpos, ypos, width, height, label) -> ptr_flform Adds a formbrowser flobject. It is a container class that is capable of holding multiple forms, the height of which in aggregate may exceed the screen height. The formbrowser also works obviously for a single form that has a height that is larger than the screen height. Parameters ---------- frmbrwstype : int type of formbrowser to be added. Values (from xfdata.py) FL_NORMAL_FORMBROWSER (normal formbrowser type) xpos : int horizontal position (upper-left corner) ypos : int vertical position (upper-left corner) width : int width in coord units height : int height in coord units label : str text label of formbrowser Returns ------- ptr_flobject : pointer to xfdata.FL_OBJECT formbrowser flobject added Examples -------- >>> pfrmbrobj = fl_add_formbrowser(xfdata.FL_NORMAL_FORMBROWSER, 110, 60, 550, 750, "My Formbrowser) Notes ----- Status: NA-UTest + Doc + NoDemo = Maybe """ _fl_add_formbrowser = library.cfuncproto( library.load_so_libforms(), "fl_add_formbrowser", cty.POINTER(xfdata.FL_OBJECT), [cty.c_int, xfdata.FL_Coord, xfdata.FL_Coord, xfdata.FL_Coord, xfdata.FL_Coord, xfdata.STRING], """FL_OBJECT * fl_add_formbrowser(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label)""") library.check_if_flinitialized() library.checkfatal_allowed_value_in_list(frmbrwstype, \ xfdata.FORMBRWSTYPE_list) i_frmbrwstype = library.convert_to_intc(frmbrwstype) i_xpos = library.convert_to_FL_Coord(xpos) i_ypos = library.convert_to_FL_Coord(ypos) i_width = library.convert_to_FL_Coord(width) i_height = library.convert_to_FL_Coord(height) s_label = library.convert_to_bytestrc(label) library.keep_elem_refs(frmbrwstype, xpos, ypos, width, height, label, \ i_frmbrwstype, i_xpos, i_ypos, i_width, i_height, s_label) retval = _fl_add_formbrowser(i_frmbrwstype, i_xpos, i_ypos, i_width, \ i_height, s_label) return retval
def fl_set_spinner_precision(ptr_flobject, precis): """fl_set_spinner_precision(ptr_flobject, precis) Defines the precision number of values in a spinner flobject. It has no effect on xfdata.FL_INT_SPINNER flobjects. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT spinner flobject precis : int precision value to be set after the decimal point. By default it is set to 6 digits. Examples -------- >>> fl_set_spinner_precision(pspnobj, 2) Notes ----- Status: NA-UTest + Doc + Demo = OK """ _fl_set_spinner_precision = library.cfuncproto( library.load_so_libforms(), "fl_set_spinner_precision", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_spinner_precision(FL_OBJECT * obj, int prec)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_precis = library.convert_to_intc(precis) library.keep_elem_refs(ptr_flobject, precis, i_precis) _fl_set_spinner_precision(ptr_flobject, i_precis)
def fl_set_chart_maxnumb(ptr_flobject, maxnumvals): """fl_set_chart_maxnumb(ptr_flobject, maxnumvals) Defines the maximum number of values displayed in the chart. Defaults is xfdata.FL_CHART_MAX; maximum set cannot be more than that. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT chart flobject maxnumvals : int maximum number of values to display Examples -------- >>> fl_set_chart_maxnumb(pchrtobj, 12) Notes ----- Status: NA-UTest + Doc + Demo = OK """ _fl_set_chart_maxnumb = library.cfuncproto( library.load_so_libforms(), "fl_set_chart_maxnumb", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], """void fl_set_chart_maxnumb(FL_OBJECT * ob, int maxnumb)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_maxnumvals = library.convert_to_intc(maxnumvals) library.keep_elem_refs(ptr_flobject, maxnumvals, i_maxnumvals) _fl_set_chart_maxnumb(ptr_flobject, i_maxnumvals)