def __create_text_area(self): # Text area (shows buddy messages) self.txt_area = etk.Label() self.txt_area.text = '<br>Nullclient-Ecore<br> ' # Appending text area to VBox vbox = etk.VBox() vbox.append(self.txt_area, etk.VBox.START, etk.VBox.EXPAND_FILL, 0) return vbox
def __init__(self, parent, etk_obj = None, item = None, expand = False, **kargs): self.etk_obj = etk_obj or etk.VBox() self.item = item self.parent = parent self.children = [] self.expand = expand if self.parent: self.parent.get_contents_child().add(self) self.show()
def __create_buddies_list(self): # Buddies list self.blistmodel = etk.ListModel() self.blist = etk.List(model=self.blistmodel, \ columns=[(10, etk.TextRenderer(slot=0), False)], \ selectable=True, animated_changes=True) # Appending buddies list to VBox vbox = etk.VBox() vbox.append(self.blist, etk.VBox.START, etk.VBox.EXPAND_FILL, 0) return vbox
def __new_account_button_clicked(self, pointer): # Username entry self.login_username = etk.Entry() # Confirm username button confirm_username_bt = etk.Button(label='Ok') confirm_username_bt.on_clicked(self.add_account) # Username VBox vbox = etk.VBox() vbox.append(self.login_username, etk.VBox.START, etk.VBox.FILL, 0) vbox.append(confirm_username_bt, etk.VBox.END, etk.VBox.NONE, 0) # Username window self.username_window = etk.Window(title='Username', \ size_request=(190, 80), child=vbox) self.username_window.show_all()
def __login_window_cb(self, pointer): # Password entry self.login_password = etk.Entry() # Confirm login button confirm_login_bt = etk.Button(label='Ok') confirm_login_bt.on_clicked(self.__connect_button_clicked) # Login VBox vbox = etk.VBox() vbox.append(self.login_password, etk.VBox.START, etk.VBox.FILL, 0) vbox.append(confirm_login_bt, etk.VBox.END, etk.VBox.NONE, 0) # Login window self.login_window = etk.Window(title='Password', \ size_request=(190, 80), child=vbox) self.login_window.show_all()
def __create_main_box(self): # Main panel panel_hbox = self.__create_main_panel() # Command entry cmd_hbox = self.__create_command_entry_box() # Buttons Bar btn_hbox = self.__create_buttons_bar() # Connection status self.status = etk.Label(text='Connection status') # Main VBox vbox = etk.VBox(homogeneous=False) vbox.append(panel_hbox, etk.VBox.START, etk.VBox.EXPAND_FILL, 0) vbox.append(cmd_hbox, etk.VBox.END, etk.VBox.FILL, 0) vbox.append(btn_hbox, etk.VBox.END, etk.VBox.NONE, 5) vbox.append(self.status, etk.VBox.END, etk.VBox.FILL, 0) return vbox
def __init__(self, parent, etk_obj=None, item=None, expand=False, optimal_size=None, min_size=None, **kargs): self.etk_obj = etk_obj or etk.VBox() self.item = item self.parent = parent self.children = [] self.expand = expand if min_size: self.etk_obj.size_request_set(min_size[0], min_size[1]) if self.parent: self.parent.get_contents_child().add(self) self.show()
def __init__(self, parent, axis=0, **kargs): if axis == 0: etk_obj = etk.HBox() else: etk_obj = etk.VBox() super(Box, self).__init__(parent, etk_obj=etk_obj, **kargs)