rfm2  22.0
A python-based rewrite of RenderMan for Maya
rfm2.ui.script_editor.ScriptEditor Class Reference
+ Inheritance diagram for rfm2.ui.script_editor.ScriptEditor:
+ Collaboration diagram for rfm2.ui.script_editor.ScriptEditor:

Public Member Functions

def __init__ (self, name=None, parent=None, syntax=None, fontSize=None, nattr=None)
 
def __del__ (self)
 
def createUI (self)
 
def setText (self, text)
 
def getText (self)
 
def on_attr_changed (self)
 
def setNodeAttr (self, nattr)
 
def setDirty (self)
 
def setClean (self)
 
def eventFilter (self, obj, event)
 
def focusOutEvent (self, event)
 
def focusInEvent (self, event)
 
def highlightCurrentLine (self)
 
def lineNumberAreaWidth (self)
 
def updateLineNumberAreaWidth (self)
 
def updateLineNumberArea (self, rect, dy)
 
def resizeEvent (self, event)
 
def lineNumberAreaPaintEvent (self, event)
 

Public Attributes

 nattr
 
 dirty
 
 script_job
 
 syntax
 
 font_size
 
 qfont
 
 line_number_area
 
 ui
 
 ctlname
 
 cursor_pos
 
 focus_stolen
 
 mod_down
 
 line_bg_color
 
 clean_palette
 
 dirty_palette
 
 highlighter
 

Detailed Description

Multi-line Maya text editor with configurable syntax highlighting.

Constructor & Destructor Documentation

◆ __init__()

def rfm2.ui.script_editor.ScriptEditor.__init__ (   self,
  name = None,
  parent = None,
  syntax = None,
  fontSize = None,
  nattr = None 
)

◆ __del__()

def rfm2.ui.script_editor.ScriptEditor.__del__ (   self)
+ Here is the call graph for this function:

Member Function Documentation

◆ createUI()

def rfm2.ui.script_editor.ScriptEditor.createUI (   self)
Build the widget.
+ Here is the call graph for this function:

◆ eventFilter()

def rfm2.ui.script_editor.ScriptEditor.eventFilter (   self,
  obj,
  event 
)
The whole purpose of this event filter is to prevent focus stealing
when the widget is in the HyperShade.
See code for more infos.
+ Here is the call graph for this function:

◆ focusInEvent()

def rfm2.ui.script_editor.ScriptEditor.focusInEvent (   self,
  event 
)
Event handler called when this widgets receives the focus.
We redefine it to restore the previous cursor position when the focus
was stolen by the hypershade.
+ Here is the call graph for this function:

◆ focusOutEvent()

def rfm2.ui.script_editor.ScriptEditor.focusOutEvent (   self,
  event 
)
Re-implements qtw.QWidget.focusOutEvent(). Will be called when the
widget looses focus. This will be our signal to save a dirty buffer.
+ Here is the call graph for this function:

◆ getText()

def rfm2.ui.script_editor.ScriptEditor.getText (   self)
Return the contents of the editor
+ Here is the caller graph for this function:

◆ highlightCurrentLine()

def rfm2.ui.script_editor.ScriptEditor.highlightCurrentLine (   self)
Highlight the current line on cursorPositionChanged event.

◆ lineNumberAreaPaintEvent()

def rfm2.ui.script_editor.ScriptEditor.lineNumberAreaPaintEvent (   self,
  event 
)
Write the line numbers in the line number area.

◆ lineNumberAreaWidth()

def rfm2.ui.script_editor.ScriptEditor.lineNumberAreaWidth (   self)
Return the width in pixels of the line number area, taking the
current font into account
+ Here is the caller graph for this function:

◆ on_attr_changed()

def rfm2.ui.script_editor.ScriptEditor.on_attr_changed (   self)
method called by scriptJobs to refresh the editor's contents.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resizeEvent()

def rfm2.ui.script_editor.ScriptEditor.resizeEvent (   self,
  event 
)
Handle line number updating on rezise event.
+ Here is the call graph for this function:

◆ setClean()

def rfm2.ui.script_editor.ScriptEditor.setClean (   self)
Clear the disty flag and re-instate the clean palette.
+ Here is the caller graph for this function:

◆ setDirty()

def rfm2.ui.script_editor.ScriptEditor.setDirty (   self)
Marks the contents of the editor as dirty so we know it should be
saved next time it looses focus.
+ Here is the caller graph for this function:

◆ setNodeAttr()

def rfm2.ui.script_editor.ScriptEditor.setNodeAttr (   self,
  nattr 
)
Associate the editor with a specific node attr and sets the editor
value to the attribute's current value.
+ Here is the call graph for this function:

◆ setText()

def rfm2.ui.script_editor.ScriptEditor.setText (   self,
  text 
)
sets the content of the editor to text. If the editor is associated
to a node attribute, the contents will not be saved to the attribute.
+ Here is the caller graph for this function:

◆ updateLineNumberArea()

def rfm2.ui.script_editor.ScriptEditor.updateLineNumberArea (   self,
  rect,
  dy 
)
General updating routine for the line number area
+ Here is the call graph for this function:

◆ updateLineNumberAreaWidth()

def rfm2.ui.script_editor.ScriptEditor.updateLineNumberAreaWidth (   self)
Set the usable bounding box of the widget to avoid overlapping with
the line number area.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ clean_palette

rfm2.ui.script_editor.ScriptEditor.clean_palette

◆ ctlname

rfm2.ui.script_editor.ScriptEditor.ctlname

◆ cursor_pos

rfm2.ui.script_editor.ScriptEditor.cursor_pos

◆ dirty

rfm2.ui.script_editor.ScriptEditor.dirty

◆ dirty_palette

rfm2.ui.script_editor.ScriptEditor.dirty_palette

◆ focus_stolen

rfm2.ui.script_editor.ScriptEditor.focus_stolen

◆ font_size

rfm2.ui.script_editor.ScriptEditor.font_size

◆ highlighter

rfm2.ui.script_editor.ScriptEditor.highlighter

◆ line_bg_color

rfm2.ui.script_editor.ScriptEditor.line_bg_color

◆ line_number_area

rfm2.ui.script_editor.ScriptEditor.line_number_area

◆ mod_down

rfm2.ui.script_editor.ScriptEditor.mod_down

◆ nattr

rfm2.ui.script_editor.ScriptEditor.nattr

◆ qfont

rfm2.ui.script_editor.ScriptEditor.qfont

◆ script_job

rfm2.ui.script_editor.ScriptEditor.script_job

◆ syntax

rfm2.ui.script_editor.ScriptEditor.syntax

◆ ui

rfm2.ui.script_editor.ScriptEditor.ui

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