Class: AMS::MultiLineText
- Inherits:
-
Object
- Object
- AMS::MultiLineText
- Defined in:
- docs/ams/multi_line_text.rb
Overview
Many of the functions that make a change influence the undo stack. Wrap them with a start/commit operation when/if desired.
Since 3.5.0, when/if a MultiLineText object is garbage collected, the associated text entity is erased.
Since 3.5.0, cloning a MultiLineText object now creates a new text entity, rather than linking to the original one.
MultiLineText is a SketchUp text wrapped with custom methods for logging information.
Instance Method Summary collapse
-
#clear ⇒ nil
Clear all data.
-
#count ⇒ Integer
Get number of lines logged to screen.
-
#get_entity ⇒ Sketchup::Text?
Get entity associated with the text.
-
#get_intro ⇒ String
Get text title/top description.
-
#get_limit ⇒ Integer
Get line limit.
-
#get_position ⇒ Array<(Integer, Integer)>
Get screen position of the associated text entity.
-
#initialize(x, y) ⇒ MultiLineText
constructor
Create a new MultiLineText object.
-
#line_numbers_visible? ⇒ Boolean
Determine whether line numbers are visible.
-
#print(str) ⇒ nil
Add text to the current line.
-
#puts(str) ⇒ nil
Add text to the new line.
-
#remove ⇒ nil
Remove text object and reset all data.
-
#set_entity(entity) ⇒ nil
Set entity associated with the text.
-
#set_intro(intro) ⇒ nil
Set text title/top description.
-
#set_limit(limit) ⇒ nil
Set line limit.
-
#set_position(x, y) ⇒ nil
Set screen position of the associated text entity.
-
#show_line_numbers(state) ⇒ nil
Show/hide line numbers.
Constructor Details
#initialize(x, y) ⇒ MultiLineText
Create a new MultiLineText object.
Instance Method Details
#clear ⇒ nil
Clear all data.
#count ⇒ Integer
Get number of lines logged to screen.
#get_entity ⇒ Sketchup::Text?
Get entity associated with the text.
#get_intro ⇒ String
Get text title/top description.
#get_limit ⇒ Integer
Get line limit.
#get_position ⇒ Array<(Integer, Integer)>
If the associated text entity is moved, the position remains unchanged until #set_position is called.
Get screen position of the associated text entity.
#line_numbers_visible? ⇒ Boolean
Determine whether line numbers are visible.
#print(str) ⇒ nil
Add text to the current line.
#puts(str) ⇒ nil
Add text to the new line.
#remove ⇒ nil
Remove text object and reset all data.
#set_entity(entity) ⇒ nil
Set entity associated with the text.
#set_intro(intro) ⇒ nil
Set text title/top description.
#set_limit(limit) ⇒ nil
Set line limit.
#set_position(x, y) ⇒ nil
If the associated text entity is not locked to screen, this function stores the positions but does not move the entity.
Since moving Sketchup::Text requires some workarounds, this function closes the activate entity path, for a proper operation.
Wrap this function with a start/commit operation block.
Set screen position of the associated text entity.
#show_line_numbers(state) ⇒ nil
Show/hide line numbers.