rfm2  22.0
A python-based rewrite of RenderMan for Maya
 All Classes Namespaces Files Functions Variables Pages
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__
 
def __del__
 
def createUI
 
def setText
 
def getText
 
def on_attr_changed
 
def setNodeAttr
 
def setDirty
 
def setClean
 
def eventFilter
 
def focusOutEvent
 
def focusInEvent
 
def highlightCurrentLine
 
def lineNumberAreaWidth
 
def updateLineNumberAreaWidth
 
def updateLineNumberArea
 
def resizeEvent
 
def lineNumberAreaPaintEvent
 

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

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

Member Function Documentation

def rfm2.ui.script_editor.ScriptEditor.createUI (   self)
Build the widget.

+ Here is the call graph for this function:

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:

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:

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:

def rfm2.ui.script_editor.ScriptEditor.getText (   self)
Return the contents of the editor

+ Here is the caller graph for this function:

def rfm2.ui.script_editor.ScriptEditor.highlightCurrentLine (   self)
Highlight the current line on cursorPositionChanged event.
def rfm2.ui.script_editor.ScriptEditor.lineNumberAreaPaintEvent (   self,
  event 
)
Write the line numbers in the line number area.
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:

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:

def rfm2.ui.script_editor.ScriptEditor.resizeEvent (   self,
  event 
)
Handle line number updating on rezise event.

+ Here is the call graph for this function:

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:

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:

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:

+ Here is the caller graph for this function:

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:

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:

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

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

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