Class: PFM::Message::Instructions

Inherits:
Object
  • Object
show all
Defined in:
docs/4_Systems_004_Message.rb

Overview

Parse & List all the instructions to draw the message box content

Defined Under Namespace

Modules: NewLine Classes: Marker, Text

Constant Summary collapse

MARKER_REGEXP =

Regexp used to detect markers

/([\x01-\x0F]\[[^\]]+\])/
MARKER_DATA =

Regexp to grab the marker data

/\[([^\]]+)\]/
SPACE_SPLIT_PRESERVE_REGEXP =

Regexp that split text with space but preserver space in split output

/( )/
IMAGE_MARKER_ID =

ID of image marker

15
BIG_TEXT_MARKER_ID =

ID of big text marker

4

Instance Method Summary collapse

Constructor Details

#initialize(properties, width, width_computer) ⇒ Instructions

Create a new Instructions instance

Parameters:

  • properties (Properties)

    Message box properties

  • width (Integer)

    width of the surface used to draw the message

  • width_computer (WidthComputer)

    object helping to compute the width of the words



215
216
# File 'docs/4_Systems_004_Message.rb', line 215

def initialize(properties, width, width_computer)
end

Instance Method Details

#current_line_widthInteger

Get the width of the current line

Returns:

  • (Integer)


233
234
# File 'docs/4_Systems_004_Message.rb', line 233

def current_line_width
end

#done_processing?Boolean

Tell if processing is done

Returns:

  • (Boolean)


225
226
# File 'docs/4_Systems_004_Message.rb', line 225

def done_processing?
end

#getText, ...

Get current instruction and prepare next instruction

Returns:



229
230
# File 'docs/4_Systems_004_Message.rb', line 229

def get
end

#parse

Parse the message



218
219
# File 'docs/4_Systems_004_Message.rb', line 218

def parse
end

#start_processing

Start instruction procesing



221
222
# File 'docs/4_Systems_004_Message.rb', line 221

def start_processing
end