REMI包¶
子模块¶
remi.gui模块¶
根据版本2.0(“许可证”)获得许可;除非遵守许可证,否则您不能使用此文件。您可以在
除非适用法律要求或书面同意,否则根据许可证分发的软件将按原样分发,不提供任何明示或默示的担保或条件。请参阅许可证下管理权限和限制的特定语言的许可证。
- class remi.gui.AsciiContainer(*args, **kwargs)[源代码]¶
基类:
Container- append(widget, key='')[源代码]¶
添加子小部件,如果未提供,则生成并返回密钥
为了以这种方式访问特定的孩子容器。孩子 [key] 。
- 参数:
value (Widget, or iterable of Widgets) -- 要追加的子项。在词典的情况下,每个条目的键被用作单个追加的‘key’参数。
key (str) -- 子项的唯一字符串标识符。如果是可迭代的‘Value’参数,则忽略该参数。
- 返回:
用于引用将来所有交互的子项的键,或者在可迭代的‘Value’参数的情况下的键列表
- 返回类型:
str
- set_from_asciiart(asciipattern, gap_horizontal=0, gap_vertical=0)[源代码]¶
- Asciipattern(Str):表示布局的多行字符串
- 窗口小部件1窗口小部件1Widget2|Widget3
Gap_Horizular(Int):百分比值Gap_Vertical(Int):百分比值
- widget_layout_map = None¶
- class remi.gui.BODY(*args, **kwargs)[源代码]¶
基类:
Container- EVENT_ONERROR = 'onerror'¶
- EVENT_ONLOAD = 'onload'¶
- EVENT_ONONLINE = 'ononline'¶
- EVENT_ONPAGEHIDE = 'onpagehide'¶
- EVENT_ONPAGESHOW = 'onpageshow'¶
- EVENT_ONRESIZE = 'onresize'¶
- class remi.gui.Button(text='', *args, **kwargs)[源代码]¶
基类:
Widget,_MixinTextualWidget按钮小工具。必须与其事件onClick一起使用。使用Widget.onclick.Connect注册监听器。
- class remi.gui.CheckBox(checked=False, user_data='', **kwargs)[源代码]¶
基类:
Input作为数字输入字段的复选框小部件实现onChange事件。
- class remi.gui.CheckBoxLabel(label='checkbox', checked=False, user_data='', **kwargs)[源代码]¶
基类:
HBox- property text¶
- class remi.gui.ClassEventConnector(event_source_instance, event_name, event_method_bound)[源代码]¶
基类:
object此类允许管理事件。用来修饰方法 decorate_event 修饰符,该方法获取__is_Event标志。在运行时,具有此标志的方法将被ClassEventConnector替换。此类将重载 __call__ 方法,在其中调用事件方法,之后也调用侦听器方法。
- callback = None¶
- kwuserdata = None¶
- userdata = None¶
- class remi.gui.Container(children=None, *args, **kwargs)[源代码]¶
基类:
Widget容器可以用作通用容器。可以通过Append(Value,Key)函数添加子项。集装箱可以绝对定位排列(分配样式 ['top'] 和风格 ['left'] 属性赋予子级或以简单的自动对齐方式。可以通过函数SET_LAYOUT_ORIENTATION(Layout_Orientation)作为参数Container.LAYOUT_Horizular或Container.LAYOUT_VERIAL传递来决定水平或垂直排列。
提示:在html中,它是一个DIV标记。self.type属性指定表示self.Attributes的HTML标记 [] attribute specifies the HTML attributes like 'style' 'class' 'id' The self.style[] 属性指定类似于‘Font’‘COLOR’的css样式内容。它将与‘self.Attributes’打包在一起。
- LAYOUT_HORIZONTAL = True¶
- LAYOUT_VERTICAL = False¶
- class remi.gui.DatalistItem(text='', *args, **kwargs)[源代码]¶
基类:
Widget,_MixinTextualWidget下拉列表的Item小部件
- class remi.gui.DropDown(*args, **kwargs)[源代码]¶
基类:
Container下拉选择小工具。实现onChange(Value)事件。通过函数DropDown.onchange.Connect为其选择更改注册一个监听器。
- append(value, key='')[源代码]¶
添加子小部件,如果未提供,则生成并返回密钥
为了以这种方式访问特定的孩子容器。孩子 [key] 。
- 参数:
value (Widget, or iterable of Widgets) -- 要追加的子项。在词典的情况下,每个条目的键被用作单个追加的‘key’参数。
key (str) -- 子项的唯一字符串标识符。如果是可迭代的‘Value’参数,则忽略该参数。
- 返回:
用于引用将来所有交互的子项的键,或者在可迭代的‘Value’参数的情况下的键列表
- 返回类型:
str
- class remi.gui.DropDownItem(text='', *args, **kwargs)[源代码]¶
基类:
Widget,_MixinTextualWidget下拉列表的Item小部件
- property value¶
- class remi.gui.FileDownloader(text, filename, path_separator='/', *args, **kwargs)[源代码]¶
基类:
Container,_MixinTextualWidgetFileDownLoader构件。允许开始文件下载。
- class remi.gui.FileFolderItem(path_and_filename, text, is_folder=False, *args, **kwargs)[源代码]¶
基类:
ContainerFileFolderNavigator的FileFolderItem小部件
- path_and_filename = None¶
基类:
GridBoxFileFolderNavigator小部件。
此事件在单击文件夹元素时发生。返回单击的FileFolderItem类型的元素。
当选择列表中的某个元素时,将返回新选择的FileFolderItem类型的元素(如果不可选,则返回None),则会发生此事件
以及类型为str的选定元素的列表。
- class remi.gui.FileSelectionDialog(title='File dialog', message='Select files and folders', multiple_selection=True, selection_folder='.', allow_file_selection=True, allow_folder_selection=True, **kwargs)[源代码]¶
-
文件选择对话框中,它打开一个新的网页,允许使用OK/Cancel功能实现“CONFIRM_VALUE”和“CANCEL_DIALOG”事件。
- class remi.gui.FileUploader(savepath='./', multiple_selection_allowed=False, accepted_files='*.*', *args, **kwargs)[源代码]¶
基类:
Container- FileUploader小部件:
允许将多个文件上传到指定文件夹。实现onSuccess和onFailure事件。
- property multiple_selection_allowed¶
- property savepath¶
- class remi.gui.GenericDialog(title='', message='', *args, **kwargs)[源代码]¶
基类:
Container通用对话框小工具。可以对其进行定制以创建个性化的对话框窗口。您可以使用函数ADD_FIELD或ADD_FIELD_WITH_LABEL设置内容添加内容小部件。用户可以使用常用按钮Cancel/OK确认或关闭该对话框。添加到对话框中的每个字段都可以通过其键进行检索,以便取回编辑值。使用函数
GET_FIELD(键)以检索该字段。
确定按钮发出‘CONFIRM_DIALOG’事件。使用SET_ON_CONFIRM_DIALOG_LISTENER向其注册监听程序。取消按钮发出‘CANCEL_DIALOG’事件。使用SET_ON_CANCEL_DIALOG_LISTENER向其注册监听程序。
- add_field(key, field)[源代码]¶
将具有唯一标识符的字段添加到对话框中。
注意:您可以调用函数GenericDialog.get_field(Key)来访问字段内容。
- 参数:
key (str) -- 该字段的唯一标识符。
field (Widget) -- 要添加到对话框中的小部件,例如TextInput或任何小部件。
- add_field_with_label(key, label_description, field)[源代码]¶
将字段与描述性标签和唯一标识符一起添加到对话框中。
注意:您可以调用函数GenericDialog.get_field(Key)来访问字段内容。
- 参数:
key (str) -- 该字段的唯一标识符。
label_description (str) -- 描述标签的字符串内容。
field (Widget) -- 字段小部件的实例。例如,它可以是TextInput或可能
widget. (a custom) --
- class remi.gui.GridBox(*args, **kwargs)[源代码]¶
基类:
Container它包含自动将它们与网格对齐的小部件。不允许儿童绝对定位。
要将子项添加到该容器中,请使用append(Child,key)函数。键必须是字符串,并确定子项在布局中的位置。
注:如果要绝对定位,请改用容器。
- append(value, key='')[源代码]¶
添加子小部件,如果未提供,则生成并返回密钥
为了以这种方式访问特定的孩子容器。孩子 [key] 。
- 参数:
value (Widget, or iterable of Widgets) -- 要追加的子项。在词典的情况下,每个条目的键被用作单个追加的‘key’参数。
key (str) -- 子项的唯一字符串标识符。如果是可迭代的‘Value’参数,则忽略该参数。键必须对应于‘Define_Grid’方法参数中提供的an元素。
- 返回:
用于引用将来所有交互的子项的键,或者在可迭代的‘Value’参数的情况下的键列表
- 返回类型:
str
- property css_grid_gap¶
- property css_grid_template_areas¶
- property css_grid_template_columns¶
- property css_grid_template_rows¶
- set_from_asciiart(asciipattern, column_gap=0, row_gap=0)[源代码]¶
从简单直观的ascii美术表定义GridBox布局。
竖线“|”是列分隔符。行之间用
- 。
相同的行将被视为唯一的较大行。单个表单元格必须包含所包含小工具的‘key’字符串值。柱尺寸将按比例应用于定义的轴网。列必须在行之间对齐。最终由SET_COLUMN_GAP和SET_ROW_GAP定义的间隔值将被覆盖。
- 艾斯。
“| |label| 按钮|||文本||“
- 参数:
Asciipattern(Str):ascii定义的网格COLUMN_GAP(Int):用作列间距的总宽度的百分比值ROW_GAP(Int):用作行间距的总高度的百分比值
- class remi.gui.HBox(*args, **kwargs)[源代码]¶
基类:
Container- 此小部件的用途是自动水平对齐
附加到它的小部件。
不允许儿童绝对定位。
要将子项添加到该容器中,请使用append(Child,key)函数。键必须是数字,并确定布局中的子项顺序。
注:如果要绝对定位,请改用容器。
- class remi.gui.HEAD(title, *args, **kwargs)[源代码]¶
基类:
Tag- repr(changed_widgets=None)[源代码]¶
它被用来自动将对象表示为Html格式的所有属性、子类等。
- 参数:
changed_widgets (dict) -- 包含必须更新的标签集合的词典。必须更新的标记是键,值是它的文本epr。
- set_icon_data(base64_data, mimetype='image/png', rel='icon')[源代码]¶
允许为应用程序定义图标
- 参数:
base64_data (str) -- Base64编码的图像数据(即“数据:图像/x图标;Base64,AAABAAEAEBA...”)
mimetype (str) -- 图像的MIMETYPE(“IMAGE/PNG”或“IMAGE/x-ICON”...)
rel (str) -- 保持不变(标准“图标”)
- set_icon_file(filename, rel='icon')[源代码]¶
允许为应用程序定义图标
- 参数:
filename (str) -- 资源文件名(即“/res:myicon.png”)
rel (str) -- 保持不变(标准“图标”)
- class remi.gui.InputDialog(title='Title', message='Message', initial_value='', *args, **kwargs)[源代码]¶
-
输入对话框小工具。它可以用来向用户查询简单而简短的文本输入。用户可以使用常用按钮Cancel/OK确认或关闭该对话框。点击OK按钮或按Enter键都会发出‘确认_对话’事件。使用SET_ON_CONFIRM_DIALOG_LISTENER向其注册监听程序。取消按钮发出‘CANCEL_DIALOG’事件。使用SET_ON_CANCEL_DIALOG_LISTENER向其注册监听程序。
- class remi.gui.Label(text='', *args, **kwargs)[源代码]¶
基类:
Widget,_MixinTextualWidget不可编辑的文本标签小工具。通过SET_TEXT函数设置其内容,并使用函数GET_TEXT检索其内容。
- class remi.gui.Link(url='', text='', open_new_window=True, *args, **kwargs)[源代码]¶
基类:
Container,_MixinTextualWidget- property attr_href¶
- class remi.gui.ListItem(text='', *args, **kwargs)[源代码]¶
基类:
Widget,_MixinTextualWidgetListView的List Item小部件。
ListItems的特征是文本内容。可以从ListView中选择它们。不要通过注册Set_on_Click_Listener来直接管理其选择,而是使用ListView的事件。
- class remi.gui.ListView(selectable=True, *args, **kwargs)[源代码]¶
基类:
ContainerList小工具它可以包含ListItems。使用标准的Append(Item,Key)函数向其添加项目,或通过函数new_from_list从字符串列表生成填充列表。将该列表与其onSelection事件结合使用。使用ListView.onseltion.Connect注册一个监听程序。
- append(value, key='')[源代码]¶
将子项追加到ListView。这些项目可以通过list访问。 [key] 。
- 参数:
value (ListItem, or iterable of ListItems) -- 要追加的子项。在词典的情况下,每个条目的键被用作单个追加的‘key’参数。
key (str) -- 子项的唯一字符串标识符。如果是可迭代的‘Value’参数,则忽略该参数。
- class remi.gui.MenuItem(text='', *args, **kwargs)[源代码]¶
基类:
Container,_MixinTextualWidgetMenuItem小工具可以包含其他MenuItem。
- class remi.gui.Progress(value=0, _max=100, *args, **kwargs)[源代码]¶
基类:
Widget进度条小工具。
- property attr_max¶
- property attr_value¶
- class remi.gui.SelectionInput(default_value='', input_type='text', *args, **kwargs)[源代码]¶
基类:
Input选择输入小部件有用的列表选择字段实现oninput事件。Https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist
- property attr_datalist_identifier¶
- property attr_input_type¶
- property attr_value¶
- class remi.gui.SelectionInputWidget(iterable_of_str=None, default_value='', input_type='text', *args, **kwargs)[源代码]¶
基类:
Container- property attr_input_type¶
- property attr_value¶
- datalist = None¶
- selection_input = None¶
- class remi.gui.Slider(default_value=0, min=0, max=65535, step=1, **kwargs)[源代码]¶
基类:
Input- property attr_max¶
- property attr_min¶
- property attr_step¶
- property attr_value¶
- class remi.gui.SpinBox(default_value=0, min_value=0, max_value=65535, step=1, allow_editing=True, **kwargs)[源代码]¶
基类:
Input作为数字输入字段的数字显示框小部件实现onChange事件。
- property attr_max¶
- property attr_min¶
- property attr_step¶
- property attr_value¶
- class remi.gui.Svg(*args, **kwargs)[源代码]¶
基类:
ContainerSVG小部件-是SvgCircle、SvgLine等图形小部件的容器。
- property attr_preserveAspectRatio¶
- property attr_viewBox¶
- class remi.gui.SvgCircle(x=0, y=0, radius=50, *args, **kwargs)[源代码]¶
基类:
Widget,_MixinSvgStroke,_MixinSvgFill,_MixinTransformable- property attr_cx¶
- property attr_cy¶
- property attr_r¶
- class remi.gui.SvgEllipse(x=0, y=0, rx=50, ry=30, *args, **kwargs)[源代码]¶
基类:
Widget,_MixinSvgStroke,_MixinSvgFill,_MixinTransformable- property attr_cx¶
- property attr_cy¶
- property attr_rx¶
- property attr_ry¶
- class remi.gui.SvgGradientLinear(x1, y1, x2, y2, *args, **kwargs)[源代码]¶
基类:
Tag- property attr_x1¶
- property attr_x2¶
- property attr_y1¶
- property attr_y2¶
- class remi.gui.SvgGradientRadial(cx='20%', cy='30%', r='30%', fx='50%', fy='50%', *args, **kwargs)[源代码]¶
基类:
Tag- property attr_cx¶
- property attr_cy¶
- property attr_fx¶
- property attr_fy¶
- property attr_r¶
- class remi.gui.SvgGroup(*args, **kwargs)[源代码]¶
基类:
Container,_MixinSvgStroke,_MixinSvgFill,_MixinTransformableSVG组-SVG小部件的不可见容器,必须将其附加到SVG元素中。
- class remi.gui.SvgImage(image_data='', x=0, y=0, w=100, h=100, *args, **kwargs)[源代码]¶
基类:
Widget,_MixinSvgPosition,_MixinSvgSize,_MixinTransformableSVG图像-用于SVG图形的栅格图像元素,它必须被附加到SVG元素中。
- property attr_preserveAspectRatio¶
- property image_data¶
- class remi.gui.SvgLine(x1=0, y1=0, x2=50, y2=50, *args, **kwargs)[源代码]¶
基类:
Widget,_MixinSvgStroke,_MixinTransformable- property attr_x1¶
- property attr_x2¶
- property attr_y1¶
- property attr_y2¶
- class remi.gui.SvgPath(path_value='', *args, **kwargs)[源代码]¶
基类:
Widget,_MixinSvgStroke,_MixinSvgFill,_MixinTransformable- property attr_d¶
- class remi.gui.SvgPolygon(_maxlen=1000, *args, **kwargs)[源代码]¶
基类:
SvgPolyline,_MixinSvgStroke,_MixinSvgFill,_MixinTransformable
- class remi.gui.SvgPolyline(_maxlen=1000, *args, **kwargs)[源代码]¶
基类:
Widget,_MixinSvgStroke,_MixinSvgFill,_MixinTransformable- property maxlen¶
- class remi.gui.SvgRectangle(x=0, y=0, w=100, h=100, *args, **kwargs)[源代码]¶
基类:
Widget,_MixinSvgPosition,_MixinSvgSize,_MixinSvgStroke,_MixinSvgFill,_MixinTransformable- property attr_round_corners_h¶
- property attr_round_corners_y¶
- class remi.gui.SvgStop(offset='0%', color='rgb(255,255,0)', opacity=1.0, *args, **kwargs)[源代码]¶
基类:
Tag- property attr_offset¶
- property css_stop_color¶
- property css_stop_opactity¶
- class remi.gui.SvgSubcontainer(x=0, y=0, width=100, height=100, *args, **kwargs)[源代码]¶
基类:
Svg,_MixinSvgPosition,_MixinSvgSize嵌套在另一个SVG元素中的SVG小部件--是SvgCircle、SvgLine等图形小部件的容器。
- class remi.gui.SvgText(x=10, y=10, text='svg text', *args, **kwargs)[源代码]¶
基类:
Widget,_MixinSvgPosition,_MixinSvgStroke,_MixinSvgFill,_MixinTextualWidget,_MixinTransformable- property attr_dominant_baseline¶
- property attr_lengthAdjust¶
- property attr_rotate¶
- property attr_textLength¶
- property attr_text_anchor¶
- class remi.gui.TabBox(*args, **kwargs)[源代码]¶
基类:
Container多页容器。通过执行追加来添加选项卡。也就是说。Tabbox.append(小部件,“Tab name”)小部件可以是与其他子小部件一起的容器。
- class remi.gui.Table(*args, **kwargs)[源代码]¶
基类:
Container表格小部件-它将包含TableRow
- append(value, key='')[源代码]¶
添加子小部件,如果未提供,则生成并返回密钥
为了以这种方式访问特定的孩子容器。孩子 [key] 。
- 参数:
value (Widget, or iterable of Widgets) -- 要追加的子项。在词典的情况下,每个条目的键被用作单个追加的‘key’参数。
key (str) -- 子项的唯一字符串标识符。如果是可迭代的‘Value’参数,则忽略该参数。
- 返回:
用于引用将来所有交互的子项的键,或者在可迭代的‘Value’参数的情况下的键列表
- 返回类型:
str
- append_from_list(content, fill_title=False)[源代码]¶
追加从所提供的字符串元组列表中包含的数据创建的行。列表的第一个元组可以设置为表格标题。
- 参数:
content (list) -- 字符串元组的列表。每个元组都是一行。
fill_title (bool) -- 如果为True,则列表中的第一个元组将设置为标题。
- class remi.gui.TableEditableItem(text='', *args, **kwargs)[源代码]¶
基类:
Container,_MixinTextualWidgetTableRow的项目构件。
- class remi.gui.TableItem(text='', *args, **kwargs)[源代码]¶
基类:
Container,_MixinTextualWidgetTableRow的项目构件。
- class remi.gui.TableRow(*args, **kwargs)[源代码]¶
基类:
Container表的行小部件-它将包含TableItem
- class remi.gui.TableTitle(text='', *args, **kwargs)[源代码]¶
基类:
TableItem,_MixinTextualWidget表的标题小工具。
- class remi.gui.TableWidget(n_rows=2, n_columns=2, use_title=True, editable=False, *args, **kwargs)[源代码]¶
基类:
Table基本表格模型小工具。每个条目都由子词典中的字符串化整数键来寻址。
- property column_count¶
- item_coords(table_item)[源代码]¶
返回TABLE_ITEM(行、列)的坐标。如果未找到项,则返回None。
- 参数:
table_item (TableItem) -- Item实例
- on_item_changed(item, new_value, row, column)[源代码]¶
项更改的事件。
- 参数:
emitter (TableWidget) -- 事件的发射器。
item (TableItem) -- TableItem实例。
new_value (str) -- 新文本内容。
row (int) -- 行索引。
column (int) -- 列索引。
- property row_count¶
- property use_title¶
- class remi.gui.Tag(attributes=None, _type='', _class=None, **kwargs)[源代码]¶
基类:
object标签是框架的基类。它表示可以添加到图形用户界面中的元素,但不一定是可用图形表示的。
- add_child(key, value)[源代码]¶
将子项添加到标记
要检索子对象,请调用GET_CHILD或访问Tag.Child [key] 字典。
- 参数:
key (str) -- 子项的唯一标识符,或键的可迭代
value (Tag, str) -- 可以是标记、可迭代的标记或字符串。在可迭代的标签是词典的情况下,每个项目的键被设置为‘key’参数
- property identifier¶
- class remi.gui.TextInput(single_line=True, hint='', *args, **kwargs)[源代码]¶
基类:
Widget,_MixinTextualWidget可编辑的多行/单行文本区域小工具。您可以通过函数SET_TEXT设置内容,或者使用GET_TEXT检索其内容。
- property attr_maxlength¶
- onchange(new_value)[源代码]¶
在用户更改TextInput内容时调用。如果SINGLE_LINE=True,它将在焦点丢失并按下Enter键的情况下触发。当SINGLE_LINE=FALSE时,它会在每个释放的键时触发。
- 参数:
new_value (str) -- TextInput的新字符串内容。
- onkeydown(new_value, keycode)[源代码]¶
当用户在TextInput中键入一个键时调用。
注意:此事件不能与Widget.onchange一起注册。
- 参数:
new_value (str) -- TextInput的新字符串内容。
keycode (str) -- 数字字符代码
- class remi.gui.TreeItem(text='', *args, **kwargs)[源代码]¶
基类:
Container,_MixinTextualWidgetTreeItem构件可以包含其他TreeItem。
- class remi.gui.VBox(*args, **kwargs)[源代码]¶
基类:
HBox- 此小部件的用途是自动垂直对齐
附加到它的小部件。
不允许儿童绝对定位。
要将子项添加到该容器中,请使用append(Child,key)函数。键必须是数字,并确定布局中的子项顺序。
注:如果要绝对定位,请改用容器。
- class remi.gui.VideoPlayer(video='', poster=None, autoplay=False, loop=False, *args, **kwargs)[源代码]¶
基类:
Widget- property attr_autoplay¶
- property attr_loop¶
- property attr_poster¶
- property attr_src¶
- property attr_type¶
- class remi.gui.Widget(style=None, *args, **kwargs)[源代码]¶
基类:
Tag,EventSource图形gui小工具的基类。小部件具有图形化的CSS样式,并从网页接收事件
- EVENT_ONBLUR = 'onblur'¶
- EVENT_ONCHANGE = 'onchange'¶
- EVENT_ONCLICK = 'onclick'¶
- EVENT_ONCONTEXTMENU = 'oncontextmenu'¶
- EVENT_ONDBLCLICK = 'ondblclick'¶
- EVENT_ONFOCUS = 'onfocus'¶
- EVENT_ONINPUT = 'oninput'¶
- EVENT_ONKEYDOWN = 'onkeydown'¶
- EVENT_ONKEYPRESS = 'onkeypress'¶
- EVENT_ONKEYUP = 'onkeyup'¶
- EVENT_ONMOUSEDOWN = 'onmousedown'¶
- EVENT_ONMOUSELEAVE = 'onmouseleave'¶
- EVENT_ONMOUSEMOVE = 'onmousemove'¶
- EVENT_ONMOUSEOUT = 'onmouseout'¶
- EVENT_ONMOUSEOVER = 'onmouseover'¶
- EVENT_ONMOUSEUP = 'onmouseup'¶
- EVENT_ONTOUCHCANCEL = 'ontouchcancel'¶
- EVENT_ONTOUCHEND = 'ontouchend'¶
- EVENT_ONTOUCHENTER = 'ontouchenter'¶
- EVENT_ONTOUCHLEAVE = 'ontouchleave'¶
- EVENT_ONTOUCHMOVE = 'ontouchmove'¶
- EVENT_ONTOUCHSTART = 'ontouchstart'¶
- EVENT_ONUPDATE = 'onupdate'¶
- property attr_class¶
- property attr_editor_newclass¶
- property attr_title¶
- property css_align_content¶
- property css_align_items¶
- property css_align_self¶
- property css_background_color¶
- property css_background_image¶
- property css_background_position¶
- property css_background_repeat¶
- property css_border_color¶
- property css_border_radius¶
- property css_border_style¶
- property css_border_width¶
- property css_bottom¶
- property css_color¶
- property css_display¶
- property css_flex¶
- property css_flex_direction¶
- property css_flex_flow¶
- property css_flex_wrap¶
- property css_float¶
- property css_font_family¶
- property css_font_size¶
- property css_font_style¶
- property css_font_weight¶
- property css_height¶
- property css_justify_content¶
- property css_left¶
- property css_letter_spacing¶
- property css_line_height¶
- property css_margin¶
- property css_opacity¶
- property css_order¶
- property css_overflow¶
- property css_position¶
- property css_right¶
- property css_top¶
- property css_visibility¶
- property css_white_space¶
- property css_width¶
当用户用鼠标右键单击小工具时调用。
- onkeydown(key, keycode, ctrl, shift, alt)[源代码]¶
当用户键入并释放键时调用。小部件应该能够接收焦点才能发出事件。分配一个“tabindex”属性以使其可聚焦。
- 参数:
key (str) -- 该字符值
keycode (str) -- 数字字符代码
- onkeyup(key, keycode, ctrl, shift, alt)[源代码]¶
当用户键入并释放键时调用。小部件应该能够接收焦点才能发出事件。分配一个“tabindex”属性以使其可聚焦。
- 参数:
key (str) -- 该字符值
keycode (str) -- 数字字符代码
- onmouseleave()[源代码]¶
当鼠标光标移出小工具时调用。
- 注意:此事件通常与Widget.onouseenter事件一起使用,后者在鼠标指针
被移到了一个小工具上。
- 注意:Widget.onouse seleave事件类似于Widget.onouseout事件。唯一的区别是
OnMouseleave事件不会冒泡(不会沿小部件树向上传播)。
- onquery_client_result(**kwargs)[源代码]¶
警告:这是一项新功能,可能会更改。此事件允许取回‘Query’方法获取的值。:返回:包含所有请求参数的名称:值的字典:rtype:VALUES_DICTIONARY(Dict)
- query_client(app_instance, attribute_list, style_property_list)[源代码]¶
警告:这是一项新功能,可能会更改。此方法允许查询小部件的客户端呈现属性和样式属性。为了取回值,用户必须为事件‘onQuery_CLIENT_RESULT’注册侦听器。用法:param APP_INSTANCE:应用程序实例:类型APP_INSTANCE:APP:参数ATTRIBUTE_LIST:属性名称列表:TYPE ATTRIBUTE_LIST:LIST:参数STYLE_PROPERTY_LIST:样式属性名称列表:TYPE STYLE_PROPERTY_LIST:LIST
- repr(changed_widgets=None)[源代码]¶
将小部件表示为HTML格式,打包所有属性、子项等。
- 参数:
changed_widgets (dict) -- 包含必须更新的小部件集合的词典。必须更新的Widget是关键字,值是它的文本epr。
- set_size(width, height)[源代码]¶
设置小部件大小。
- 参数:
width (int or str) -- 小工具的可选宽度(ES。宽度=10或宽度=‘10px’或宽度=‘10%’)。
height (int or str) -- 微件的可选高度(ES。高度=10或高度=‘10px’或高度=‘10%’)。
- property variable_name¶
- remi.gui.decorate_event_js(js_code)[源代码]¶
将方法设置为事件,并添加要生成的
- 参数:
js_code (str) -- javascript code to generate the event client-side. js_code is added to the widget html as widget.attributes['onclick'] = js_code%{'emitter_identifier':widget.identifier, 'event_name':'onclick'}
- remi.gui.decorate_set_on_listener(prototype)[源代码]¶
在编辑器中使用的私有装饰器。允许编辑器创建侦听器方法。
- 参数:
params (str) -- 侦听器方法的参数列表。“(self,new_Value)”)
remi.server模块¶
根据版本2.0(“许可证”)获得许可;除非遵守许可证,否则您不能使用此文件。您可以在
除非适用法律要求或书面同意,否则根据许可证分发的软件将按原样分发,不提供任何明示或默示的担保或条件。请参阅许可证下管理权限和限制的特定语言的许可证。
- class remi.server.App(request, client_address, server, **app_args)[源代码]¶
基类:
BaseHTTPRequestHandler,object此类将处理来自浏览器的任何传入请求。主应用程序类可以在do_POST和do_Get方法中将其子类化,以接收请求,例如:
带参数的函数调用
文件请求
- notification_message(title, content, icon='')[源代码]¶
此函数向执行其内容的客户端发送“javascript”消息。在这个特定的代码中,显示了一条通知消息
- re_attr_call = re.compile('^/*(\\w+)\\/(\\w+)\\?{0,1}(\\w*\\={1}([^&])+\\&{0,1})*$')¶
- re_static_file = re.compile("^([\\/]*[\\w\\d]+:[-_. $@?#£'%=()\\/\\[\\]!+°§^,\\w\\d]+)")¶
- class remi.server.Server(gui_class, title='', start=True, address='127.0.0.1', port=0, username=None, password=None, multiple_instance=False, enable_file_cache=True, update_interval=0.1, start_browser=True, websocket_timeout_timer_ms=1000, pending_messages_queue_length=1000, certfile=None, keyfile=None, ssl_version=None, userdata=())[源代码]¶
基类:
object- property address¶
- property title¶
- class remi.server.StandaloneServer(gui_class, title='', width=800, height=600, resizable=True, fullscreen=False, start=True, userdata=())[源代码]¶
基类:
Server
- class remi.server.ThreadedHTTPServer(server_address, RequestHandlerClass, auth, multiple_instance, enable_file_cache, update_interval, websocket_timeout_timer_ms, pending_messages_queue_length, title, server_starter_instance, certfile, keyfile, ssl_version, *userdata)[源代码]¶
基类:
ThreadingMixIn,HTTPServer- daemon_threads = False¶
- class remi.server.WebSocketsHandler(headers, request, client_address, server, *args, **kwargs)[源代码]¶
基类:
StreamRequestHandler- magic = b'258EAFA5-E914-47DA-95CA-C5AB0DC85B11'¶