Class: RUtilAnts::GUI::TextProgressDialog
- Inherits:
-
ProgressDialog
- Object
- Wx::Dialog
- ProgressDialog
- RUtilAnts::GUI::TextProgressDialog
- Defined in:
- lib/rUtilAnts/GUI.rb
Overview
Text progress dialog
Constant Summary
Constants inherited from ProgressDialog
ProgressDialog::DEFAULT_UNDETERMINED_RANGE
Instance Attribute Summary
Attributes inherited from ProgressDialog
Instance Method Summary collapse
-
#getTitlePanel ⇒ Object
Get the panel to display as title.
-
#initialize(iParentWindow, iCodeToExecute, iText, iParameters = {}) ⇒ TextProgressDialog
constructor
Constructor.
-
#setText(iText) ⇒ Object
Set the text.
Methods inherited from ProgressDialog
#incRange, #incValue, #pulse, #refreshState, #setRange, #setValue
Constructor Details
#initialize(iParentWindow, iCodeToExecute, iText, iParameters = {}) ⇒ TextProgressDialog
Constructor
Parameters:
-
iParentWindow (Wx::Window): Parent window
-
iCodeToExecute (Proc): The code to execute that will update the progression
-
iText (String): The text to display
-
iParameters (map<Symbol,Object>): Additional parameters (check RUtilAnts::GUI::ProgressDialog#initialize documentation):
227 228 229 230 |
# File 'lib/rUtilAnts/GUI.rb', line 227 def initialize(iParentWindow, iCodeToExecute, iText, iParameters = {}) @Text = iText super(iParentWindow, iCodeToExecute, iParameters) end |
Instance Method Details
#getTitlePanel ⇒ Object
Get the panel to display as title
Return:
-
Wx::Panel: The panel to use as a title
236 237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/rUtilAnts/GUI.rb', line 236 def getTitlePanel rPanel = Wx::Panel.new(self) # Create components @STText = Wx::StaticText.new(rPanel, Wx::ID_ANY, @Text, :style => Wx::ALIGN_CENTRE) # Put them into sizers lMainSizer = Wx::BoxSizer.new(Wx::VERTICAL) lMainSizer.add_item(@STText, :flag => Wx::GROW, :proportion => 1) rPanel.sizer = lMainSizer return rPanel end |
#setText(iText) ⇒ Object
Set the text
Parameters:
-
iText (String): The text
254 255 256 257 258 |
# File 'lib/rUtilAnts/GUI.rb', line 254 def setText(iText) @STText.label = iText self.fit refreshState end |