def get_ttk_style_pipeline() -> RenderingPipeline: """Returns RenderingPipeline for TtkStyle""" return RenderingPipeline([ setup_value_setter, apply_style_attributes, configure ], name='ttk style pipeline')
def get_for_pipeline() -> RenderingPipeline: """Returns setup for For node""" return RenderingPipeline(pipes=[ apply_attributes, render_for_items, rerender_on_items_change, partial(layout_parent_on_change, 'items') ], name='for pipeline')
def get_if_pipeline() -> RenderingPipeline: """Returns setup for For node""" return RenderingPipeline(pipes=[ apply_attributes, render_if, rerender_on_condition_change, partial(layout_parent_on_change, 'condition') ], name='if pipeline')
def get_root_pipeline() -> RenderingPipeline: """Returns setup for root""" return RenderingPipeline(pipes=[ setup_widget_setter, setup_widget_destroy, apply_attributes, render_widget_children ], name='root pipeline')
def get_view_pipeline() -> RenderingPipeline: """Returns setup for container""" return RenderingPipeline(pipes=[ apply_attributes, render_view_content, rerender_on_view_change, partial(layout_parent_on_change, 'name') ], name='view pipeline')
def use_wx_pipelines(): """Returns resolver for RenderingPipeline""" add_singleton(get_child_context, get_wx_child_context) use_pipeline(get_wx_pipeline(), 'wx') use_pipeline(get_app_pipeline(), 'wx.App') use_pipeline(get_frame_pipeline(), 'wx.Frame') use_pipeline(get_container_pipeline(), 'wxviews.Container') use_pipeline(get_view_pipeline(), 'wxviews.View') use_pipeline(get_for_pipeline(), 'wxviews.For') use_pipeline(get_if_pipeline(), 'wxviews.If') use_pipeline(get_sizer_pipeline(), 'wx.GridSizer') use_pipeline(get_sizer_pipeline(), 'wx.FlexGridSizer') use_pipeline(get_sizer_pipeline(), 'wx.GridBagSizer') use_pipeline(get_sizer_pipeline(), 'wx.BoxSizer') use_pipeline(get_sizer_pipeline(), 'wx.StaticBoxSizer') use_pipeline(get_growable_row_pipeline(), 'wxviews.GrowableRow') use_pipeline(get_growable_col_pipeline(), 'wxviews.GrowableCol') use_pipeline(get_menu_bar_pipeline(), 'wx.MenuBar') use_pipeline(get_menu_pipeline(), 'wx.Menu') use_pipeline(get_menu_item_pipeline(), 'wx.MenuItem') use_pipeline(get_style_pipeline(), 'wxviews.Style') use_pipeline(get_styles_view_pipeline(), 'wxviews.StylesView') use_pipeline(RenderingPipeline(pipes=[run_code]), 'wxviews.Code') use_pipeline(get_presenter_pipeline(), 'wxviews.PresenterNode')
def get_canvas_pipeline() -> RenderingPipeline: """Returns setup for canvas""" return RenderingPipeline(pipes=[ setup_temp_setter, setup_temp_binding, apply_attributes, create_item, setup_config_setter, setup_event_binding, apply_temp_events, clear_temp ], create_node=create_canvas_node)
def get_style_pipeline() -> RenderingPipeline: """Returns pipeline for style node""" return RenderingPipeline(pipes=[ setup_node_styles, apply_style_items, apply_parent_items, store_to_node_styles, render_child_styles ], name='style pipeline')
def get_frame_pipeline(): """Returns rendering pipeline for Frame""" return RenderingPipeline(pipes=[ apply_attributes, render_wx_children, lambda node, ctx: node.instance.Show() ], create_node=_create_widget_node)
def get_styles_view_pipeline() -> RenderingPipeline: """Returns setup for container""" return RenderingPipeline(pipes=[ apply_attributes, render_view_content, store_to_globals ], name='styles view pipeline')
def get_sizer_pipeline() -> RenderingPipeline: """Returns rendering pipeline for SizerNode""" return RenderingPipeline(pipes=[ apply_attributes, add_to_sizer, render_sizer_children, set_sizer_to_parent ], create_node=_create_sizer_node, name='sizer pipeline')
def get_widget_pipeline() -> RenderingPipeline: """Returns setup for widget""" return RenderingPipeline(pipes=[ setup_widget_setter, setup_widget_destroy, apply_attributes, apply_text, render_widget_children ], create_node=_create_widget_node, name='widget pipeline')
def get_app_pipeline(): """Returns rendering pipeline for App""" return RenderingPipeline(pipes=[ store_root, apply_attributes, render_app_children, ], create_node=_create_widget_node)
def use_tkviews_pipelines(): """Adds rendering pipelines for tkviews""" add_singleton(get_child_context, get_tk_child_context) use_pipeline(get_root_pipeline(), 'tkviews.Root') use_pipeline(get_widget_pipeline(), 'tkinter') use_pipeline(get_widget_pipeline(), 'tkinter.ttk') use_pipeline(get_presenter_pipeline(), 'tkviews.PresenterNode') use_pipeline(get_container_pipeline(), 'tkviews.Container') use_pipeline(get_view_pipeline(), 'tkviews.View') use_pipeline(get_for_pipeline(), 'tkviews.For') use_pipeline(get_if_pipeline(), 'tkviews.If') use_pipeline(get_style_pipeline(), 'tkviews.Style') use_pipeline(get_styles_view_pipeline(), 'tkviews.StylesView') use_pipeline(get_ttk_style_pipeline(), 'tkviews.TtkStyle') use_pipeline(get_canvas_pipeline(), 'tkviews.canvas') use_pipeline(RenderingPipeline(pipes=[run_code]), 'tkviews.Code')
def get_growable_col_pipeline() -> RenderingPipeline: """Returns rendering pipeline for GrowableRow""" return RenderingPipeline( pipes=[apply_attributes, add_growable_col_to_sizer], name='growable col pipeline')
def get_container_pipeline() -> RenderingPipeline: """Returns setup for container""" return RenderingPipeline( pipes=[apply_attributes, render_container_children], name='container pipeline')
def get_menu_pipeline() -> RenderingPipeline: """Return render pipeline for Menu""" return RenderingPipeline( pipes=[apply_attributes, render_menu_children, set_to_menu_bar], create_node=create_menu_node, name='menu pipeline')
def get_wx_pipeline() -> RenderingPipeline: """Returns rendering pipeline for WidgetNode""" return RenderingPipeline( pipes=[apply_attributes, add_to_sizer, render_wx_children], create_node=_create_widget_node)
def get_listboxitem_pipeline() -> RenderingPipeline: """Returns setup for canvas""" return RenderingPipeline(pipes=[ apply_attributes, insert_item, setup_on_updated, setup_on_destroy ])
def get_menu_item_pipeline() -> RenderingPipeline: """Returns rendering pipeline for menu item""" return RenderingPipeline(pipes=[apply_attributes, set_to_menu], create_node=create_menu_node, name='menu item pipeline')