Class: MainWindow
- Inherits:
-
FXMainWindow
- Object
- FXMainWindow
- MainWindow
- Defined in:
- lib/files/main_window.rb
Instance Attribute Summary collapse
-
#add_button ⇒ Object
readonly
Returns the value of attribute add_button.
-
#chg_button ⇒ Object
readonly
Returns the value of attribute chg_button.
-
#cur_page_label ⇒ Object
readonly
Returns the value of attribute cur_page_label.
-
#del_button ⇒ Object
readonly
Returns the value of attribute del_button.
-
#go_left_button ⇒ Object
readonly
Returns the value of attribute go_left_button.
-
#go_right_button ⇒ Object
readonly
Returns the value of attribute go_right_button.
-
#page_count_label ⇒ Object
readonly
Returns the value of attribute page_count_label.
-
#tabBook ⇒ Object
readonly
Returns the value of attribute tabBook.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
-
#upd_button ⇒ Object
readonly
Returns the value of attribute upd_button.
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(app) ⇒ MainWindow
constructor
A new instance of MainWindow.
- #set_table_headers(arr) ⇒ Object
Constructor Details
#initialize(app) ⇒ MainWindow
Returns a new instance of MainWindow.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/files/main_window.rb', line 10 def initialize(app) super(app, "StudentListView" , :width => 800, :height => 500) self.tabBook = FXTabBook.new(self) tabFrame1 = FXTabItem.new(self.tabBook, "Вкладка 1", nil) vFrame1 = FXVerticalFrame.new(self.tabBook) tabFrame2 = FXTabItem.new(self.tabBook, "Вкладка 2", nil) vFrame2 = FXVerticalFrame.new(self.tabBook) tabFrame3 = FXTabItem.new(self.tabBook, "Вкладка 3", nil) vFrame3 = FXVerticalFrame.new(self.tabBook) # Фамилия Имя Отчество? hFrame1 = FXHorizontalFrame.new(vFrame1) self.add_name_field(hFrame1) # Гит self.add_git_field(hFrame1) # Мейл hFrame2 = FXHorizontalFrame.new(vFrame1) self.add_email_field(hFrame2) # Телефон hFrame3 = FXHorizontalFrame.new(vFrame1) self.add_phone_field(hFrame3) # Телеграм hFrame4 = FXHorizontalFrame.new(vFrame1) self.add_tg_field(hFrame4) # Табличка hFrame5 = FXHorizontalFrame.new(vFrame1) FXLabel.new(hFrame5, "Таблица") hFrame6 = FXHorizontalFrame.new(vFrame1, opts: LAYOUT_FILL_X | LAYOUT_FIX_HEIGHT) hFrame6.height = 230 self.add_table(hFrame6) # Перелистываем страницы hFrame7 = FXHorizontalFrame.new(vFrame1, opts: LAYOUT_FILL_X) (hFrame7) # Кнопки hFrame8 = FXHorizontalFrame.new(vFrame1, opts: LAYOUT_FILL_X) (hFrame8) end |
Instance Attribute Details
#add_button ⇒ Object
Returns the value of attribute add_button.
5 6 7 |
# File 'lib/files/main_window.rb', line 5 def @add_button end |
#chg_button ⇒ Object
Returns the value of attribute chg_button.
5 6 7 |
# File 'lib/files/main_window.rb', line 5 def @chg_button end |
#cur_page_label ⇒ Object
Returns the value of attribute cur_page_label.
7 8 9 |
# File 'lib/files/main_window.rb', line 7 def cur_page_label @cur_page_label end |
#del_button ⇒ Object
Returns the value of attribute del_button.
5 6 7 |
# File 'lib/files/main_window.rb', line 5 def @del_button end |
#go_left_button ⇒ Object
Returns the value of attribute go_left_button.
6 7 8 |
# File 'lib/files/main_window.rb', line 6 def @go_left_button end |
#go_right_button ⇒ Object
Returns the value of attribute go_right_button.
6 7 8 |
# File 'lib/files/main_window.rb', line 6 def @go_right_button end |
#page_count_label ⇒ Object
Returns the value of attribute page_count_label.
7 8 9 |
# File 'lib/files/main_window.rb', line 7 def page_count_label @page_count_label end |
#tabBook ⇒ Object
Returns the value of attribute tabBook.
8 9 10 |
# File 'lib/files/main_window.rb', line 8 def tabBook @tabBook end |
#table ⇒ Object
Returns the value of attribute table.
8 9 10 |
# File 'lib/files/main_window.rb', line 8 def table @table end |
#upd_button ⇒ Object
Returns the value of attribute upd_button.
5 6 7 |
# File 'lib/files/main_window.rb', line 5 def @upd_button end |
Instance Method Details
#create ⇒ Object
60 61 62 63 |
# File 'lib/files/main_window.rb', line 60 def create super show(PLACEMENT_SCREEN) end |
#set_table_headers(arr) ⇒ Object
65 66 67 68 69 70 71 |
# File 'lib/files/main_window.rb', line 65 def set_table_headers(arr) self.table.setColumnText(0, "№") arr.each_with_index { |value, index| self.table.setColumnText(index+1, value) } end |