Class: JLDrill::PromptContext::PromptView

Inherits:
Context::View show all
Defined in:
lib/jldrill/contexts/PromptContext.rb

Direct Known Subclasses

Gtk::PromptView

Instance Attribute Summary collapse

Attributes inherited from Context::View

#context

Instance Method Summary collapse

Methods inherited from Context::View

#addView, #getWidget, #removeView, #removingViewFrom, #viewAddedTo

Constructor Details

#initialize(context, title, message) ⇒ PromptView

Returns a new instance of PromptView.



25
26
27
28
29
30
# File 'lib/jldrill/contexts/PromptContext.rb', line 25

def initialize(context, title, message)
    super(context)
    @title = title
    @message = message
    @response = @context.cancel
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



23
24
25
# File 'lib/jldrill/contexts/PromptContext.rb', line 23

def message
  @message
end

#responseObject (readonly)

Returns the value of attribute response.



23
24
25
# File 'lib/jldrill/contexts/PromptContext.rb', line 23

def response
  @response
end

#titleObject (readonly)

Returns the value of attribute title.



23
24
25
# File 'lib/jldrill/contexts/PromptContext.rb', line 23

def title
  @title
end

Instance Method Details

#destroyObject

Destroys the prompt window



33
34
35
# File 'lib/jldrill/contexts/PromptContext.rb', line 33

def destroy
    # Please override in the concrete class
end

#runObject

Display the dialog and get the input from the user



38
39
40
# File 'lib/jldrill/contexts/PromptContext.rb', line 38

def run
    # Please override in the concrete class
end