draftguitools.gui_edit_base_object.GuiTools Class Reference

Public Member Functions

def get_edit_obj_context_menu (self, edit_command, obj, position)
 
def get_edit_point_context_menu (self, edit_command, obj, node_idx)
 
def get_edit_points (self, obj)
 
def get_object_style (self, obj)
 
def init_preview_object (self, obj)
 
def restore_object_style (self, obj, modes)
 
def set_object_editing_style (self, obj)
 
def update_object_from_edit_points (self, obj, node_idx, v, alt_edit_mode=0)
 
def update_preview_object (self, edit_command, obj, node_idx, v)
 

Detailed Description

 Base class for object editing tools

Member Function Documentation

◆ get_edit_obj_context_menu()

def draftguitools.gui_edit_base_object.GuiTools.get_edit_obj_context_menu (   self,
  edit_command,
  obj,
  position 
)
 Get the context menu associated to edited object (user is over the object)

Return a list of tuples containing menu labels and associated functions:
    return [
        ("action label", lambda: self.handle_action_label(edit_command, obj, position)),
    ]

Parameters:
edit_command: running Draft_Edit command
obj: the edited object
position: position of the cursor on the screen (x, y)

Reimplemented in draftguitools.gui_edit_draft_objects.DraftWireGuiTools, draftguitools.gui_edit_draft_objects.DraftCircleGuiTools, and draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.

◆ get_edit_point_context_menu()

def draftguitools.gui_edit_base_object.GuiTools.get_edit_point_context_menu (   self,
  edit_command,
  obj,
  node_idx 
)
 Get the context menu associated to edit points (user is over an editpoint)

Return a list of tuples containing menu labels and associated functions:
    return [
        ("action label", lambda: self.handle_action_label(edit_command, obj, node_idx)),
    ]

Parameters:
edit_command: running Draft_Edit command
obj: the edited object
node_idx: number of the edited node

Reimplemented in draftguitools.gui_edit_draft_objects.DraftWireGuiTools, draftguitools.gui_edit_draft_objects.DraftCircleGuiTools, and draftguitools.gui_edit_draft_objects.DraftBezCurveGuiTools.

◆ get_edit_points()

◆ get_object_style()

def draftguitools.gui_edit_base_object.GuiTools.get_object_style (   self,
  obj 
)

◆ init_preview_object()

◆ restore_object_style()

def draftguitools.gui_edit_base_object.GuiTools.restore_object_style (   self,
  obj,
  modes 
)

◆ set_object_editing_style()

def draftguitools.gui_edit_base_object.GuiTools.set_object_editing_style (   self,
  obj 
)

◆ update_object_from_edit_points()

def draftguitools.gui_edit_base_object.GuiTools.update_object_from_edit_points (   self,
  obj,
  node_idx,
  v,
  alt_edit_mode = 0 
)

◆ update_preview_object()

def draftguitools.gui_edit_base_object.GuiTools.update_preview_object (   self,
  edit_command,
  obj,
  node_idx,
  v 
)

The documentation for this class was generated from the following file: