Class: VaultGUI::InfoPopup
- Inherits:
-
Frame
- Object
- Frame
- VaultGUI::InfoPopup
- Defined in:
- lib/gui.rb
Instance Method Summary collapse
- #get_login_value ⇒ Object
- #get_name_value ⇒ Object
- #get_password_value ⇒ Object
-
#initialize(parent, title, edit_name_tf, edit_login_tf, edit_password_tf) ⇒ InfoPopup
constructor
A new instance of InfoPopup.
- #set_login_value(login) ⇒ Object
- #set_name_value(name) ⇒ Object
- #set_password_value(password) ⇒ Object
Constructor Details
#initialize(parent, title, edit_name_tf, edit_login_tf, edit_password_tf) ⇒ InfoPopup
Returns a new instance of InfoPopup.
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/gui.rb', line 202 def initialize(parent, title, edit_name_tf, edit_login_tf, edit_password_tf) super(parent, 0, title, :style => DEFAULT_FRAME_STYLE ^ RESIZE_BORDER ^ MAXIMIZE_BOX) panel = Panel.new(self) namel = StaticText.new(panel, 0, "Name", :style => ALIGN_CENTER) @name_tf = TextCtrl.new(panel, 0) @name_tf.set_editable(edit_name_tf) loginl = StaticText.new(panel, 0, "Login", :style => ALIGN_CENTER) @login_tf = TextCtrl.new(panel, 0) @login_tf.set_editable(edit_login_tf) password_l = StaticText.new(panel, 0, "Password", :style => ALIGN_CENTER) @password_tf = TextCtrl.new(panel, 0, :style => TE_PASSWORD) @password_tf.set_editable(edit_password_tf) okb = Button.new(panel, 0, "OK") vbox = BoxSizer.new(VERTICAL) vbox.add(namel) vbox.add(@name_tf) vbox.add(loginl) vbox.add(@login_tf) vbox.add(password_l) vbox.add(@password_tf) vbox.add(okb) panel.set_sizer(vbox) self.centre end |
Instance Method Details
#get_login_value ⇒ Object
232 233 234 |
# File 'lib/gui.rb', line 232 def get_login_value() return @login_tf.get_value end |
#get_name_value ⇒ Object
228 229 230 |
# File 'lib/gui.rb', line 228 def get_name_value() return @name_tf.get_value end |
#get_password_value ⇒ Object
236 237 238 |
# File 'lib/gui.rb', line 236 def get_password_value() return @password_tf.get_value end |
#set_login_value(login) ⇒ Object
244 245 246 |
# File 'lib/gui.rb', line 244 def set_login_value(login) @login_tf.set_value(login) end |
#set_name_value(name) ⇒ Object
240 241 242 |
# File 'lib/gui.rb', line 240 def set_name_value(name) @name_tf.set_value(name) end |
#set_password_value(password) ⇒ Object
248 249 250 |
# File 'lib/gui.rb', line 248 def set_password_value(password) @password_tf.set_value(password) end |