当前位置: 首页>>代码示例>>Python>>正文


Python HIGHBox.pack_end方法代码示例

本文整理汇总了Python中higwidgets.higboxes.HIGHBox.pack_end方法的典型用法代码示例。如果您正苦于以下问题:Python HIGHBox.pack_end方法的具体用法?Python HIGHBox.pack_end怎么用?Python HIGHBox.pack_end使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在higwidgets.higboxes.HIGHBox的用法示例。


在下文中一共展示了HIGHBox.pack_end方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from higwidgets.higboxes import HIGHBox [as 别名]
# 或者: from higwidgets.higboxes.HIGHBox import pack_end [as 别名]
    def __init__(self, option=None):
        OptionDisplay.__init__(self)
        #Profile and Wizard core
        self._profilecore = None 
        self._wizardcore = None 
        self._notebook= None
        self._profile = None 
        self._wizard = None 
        self._changed = False

        hbox = HIGHBox()
        hbox.set_border_width(12)
        self.delete_button = HIGButton(stock='gtk-delete')
        self.delete_button.connect('clicked', self.delete_option)
        self.new_button = HIGButton(stock='gtk-new')
        self.new_button.connect('clicked', self.new_option)
        self.update_button = HIGButton(stock='gtk-refresh')
        self.update_button.connect('clicked', self.update_option)
        self.add_button = HIGButton(stock='gtk-add')
        self.add_button.connect('clicked', self.add_option)
        hbox.pack_end(self.delete_button,False,False)
        hbox.pack_end(self.update_button, False, False)
        hbox.pack_end(self.add_button, False, False)
        hbox.pack_end(self.new_button, False,False)
        self.attach(hbox, 1,2,6,7)

        self.optionlist = option
开发者ID:aregee,项目名称:network-scanner,代码行数:29,代码来源:OptionManager.py

示例2: __do_layout

# 需要导入模块: from higwidgets.higboxes import HIGHBox [as 别名]
# 或者: from higwidgets.higboxes.HIGHBox import pack_end [as 别名]
    def __do_layout(self):
        """
        Layout window widgets.
        """
        main_vbox = HIGVBox()
        btns_box = HIGHBox()

        main_vbox.pack_start(self.logo_img)
        main_vbox.pack_start(self.lbl_program_version)
        main_vbox.pack_start(self.lbl_program_description)

        btns_box.pack_end(self.btn_close)
        main_vbox._pack_noexpand_nofill(btns_box)

        self.btn_close.grab_focus()

        self.add(main_vbox)
开发者ID:aregee,项目名称:network-scanner,代码行数:19,代码来源:About.py

示例3: __do_layout

# 需要导入模块: from higwidgets.higboxes import HIGHBox [as 别名]
# 或者: from higwidgets.higboxes.HIGHBox import pack_end [as 别名]
    def __do_layout(self):
        """
        Layout window widgets.
        """
        main_vbox = HIGVBox()
        days_box = HIGHBox()
        btns_box = HIGHBox()

        days_box._pack_noexpand_nofill(self.data_lbl)
        days_box._pack_expand_fill(self.days)
        days_box._pack_noexpand_nofill(self.days_lbl)

        btns_box.pack_end(self.apply, False, False, 0)
        btns_box.pack_end(self.cancel, False, False, 0)

        main_vbox._pack_noexpand_nofill(days_box)
        main_vbox.pack_end(btns_box, False, False, 0)

        self.add(main_vbox)
开发者ID:aregee,项目名称:network-scanner,代码行数:21,代码来源:DataRemoval.py

示例4: PreferencesWindow

# 需要导入模块: from higwidgets.higboxes import HIGHBox [as 别名]
# 或者: from higwidgets.higboxes.HIGHBox import pack_end [as 别名]
class PreferencesWindow(HIGMainWindow):
    def __init__(self):
        HIGMainWindow.__init__(self)
        self.set_title("Preferences")
        self.set_position(gtk.WIN_POS_CENTER_ALWAYS)
        self.resize(950,500)
        self.set_border_width(10)
        self.__pixmap_d = Path.pixmaps_dir
        self.__list = {
            'General settings':'general.svg',
            'Fonts':'fonts.svg',
            'Expose/Interface':'expose.svg',
            'Network':'network.svg'
            }
        self.__list_bw = {
            'General settings':'general-bw.svg',
            'Fonts':'fonts-bw.svg',
            'Expose/Interface':'expose-bw.svg',
            'Network':'network-bw.svg'
            }
        # FIXME
        ### Replace two list above
        self.__dic_tabs = {
            'Expose/Interface':['expose.svg','expose-bw.svg', ExposeGeneral],
            #'Network':['network.svg', 'network-bw.svg', NetworkTab],
            '.General settings':['general.svg','general-bw.svg',\
                                 GeneralSettings],
            'Interface Details':['fonts.svg','fonts-bw.svg', InterfaceDetails],
            }

        self.__create()
        self.__pack()
        self.__frame = None





        #self.connect("destroy", lambda w: gtk.main_quit())
        self.connect("delete_event", lambda w, e: self.close())
        self._create_frame("General Settings", GeneralSettings)



        # Add button Close and Help Button
        self.__closeb = HIGButton(stock=gtk.STOCK_CANCEL)
        self.__helpb = HIGButton(stock=gtk.STOCK_HELP)
        self.__applyb = HIGButton(stock = gtk.STOCK_APPLY)
        self.__okb = HIGButton(stock = gtk.STOCK_OK)
        self.__buttons_box = HIGHBox()

        self.__alignb_c = gtk.Alignment(0,0,0,0)
        self.__alignb_h = gtk.Alignment(0,0,0,0)
        self.__alignb_y = gtk.Alignment(0,0,0,0)
        self.__alignb_k = gtk.Alignment(0,0,0,0)

        self.__alignb_c.add(self.__closeb)
        self.__alignb_h.add(self.__helpb)
        self.__alignb_y.add(self.__applyb)
        self.__alignb_k.add(self.__okb)
        self.__alignb_y.set_padding(0,0, 1,1)
        self.__alignb_c.set_padding(0,0, 1,1)
        self.__alignb_h.set_padding(0,0, 1,1)
        self.__alignb_k.set_padding(0,0, 1,1)

        self.__buttons_box.pack_end(self.__alignb_k, False, False)
        self.__buttons_box.pack_end(self.__alignb_y, False, False)
        self.__buttons_box.pack_end(self.__alignb_c, False, False)

        self.__buttons_box.pack_start(self.__alignb_h, False, False)




        self.__box.pack_end(self.__buttons_box, False,  True)

        self.__closeb.connect("clicked", lambda e: self.close())
        self.__applyb.connect("clicked", self.save_changes)
        self.__okb.connect("clicked", self._save_close)

        self.connect("key-press-event", self.cb_keypress)
        self.show_all()



    # Callbacks

    def cb_keypress(self, widget, event):
        '''
        handle the "key-press-event" signal
        '''


        n = ord(event.string) if len(event.string) > 0 else ''
        kv = event.keyval
        print 'n: %s, keyval: %s' % (n, hex(kv))
        def test1():
            print "test"
        string_dict = {
            12 : test1 # ctrl-L
#.........这里部分代码省略.........
开发者ID:aregee,项目名称:network-scanner,代码行数:103,代码来源:PreferencesWindow.py

示例5: ProfileManager

# 需要导入模块: from higwidgets.higboxes import HIGHBox [as 别名]
# 或者: from higwidgets.higboxes.HIGHBox import pack_end [as 别名]
class ProfileManager(HIGWindow):
    """
    Create a Profile Manager 
    """
    def __init__(self, daddy=None):
        HIGWindow.__init__(self, type=gtk.WINDOW_TOPLEVEL)
        self.set_title('Profile Manager')
        self.set_position(gtk.WIN_POS_CENTER)
        self.__create_widgets()
        self.add(self.vbox_main)
        self.__fill_widgets()
        self.__pack_widgets()
        self.__scan_notebook = None
        
        self.daddy = daddy


    def __create_widgets(self):

        self.vbox_main = HIGVBox()

        self.main_frame = HIGFrame("Profiles")
        #self.main_frame.set_shadow_type(gtk.SHADOW_ETCHED_OUT)

        self.align = gtk.Alignment(0.0, 0.0, 1.0, 1.0)
        self.align.set_padding(0,0,12,0)

        self.vbox = HIGVBox()
        self.profiles_sw = HIGScrolledWindow()
        #TreeView
        self.model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING)
        #self.modelfilter = self.model.filter_new()
        self.profiles_tv = gtk.TreeView(self.model)
        renderer = gtk.CellRendererText()
        column = gtk.TreeViewColumn(_("Name"), renderer, text=0)
        self.profiles_tv.append_column(column)
        renderer_hint = gtk.CellRendererText()
        column_hint = gtk.TreeViewColumn(_("Hint"), renderer_hint, text=1)
        self.profiles_tv.append_column(column_hint)
        #self.profiles_tv.set_model(self.modelfilter)
        #Info 
        self.hbox_info = HIGHBox()
        self.command_label = HIGEntryLabel('Command: ')
        self.command_entry = HIGTextEntry()
        self.command_entry.set_editable(False)

        #Buttons
        self.hbox_buttons = HIGHBox()

        self.wiz_button = HIGButton(title='Wizard', stock='gtk-convert')
        self.wiz_button.connect("clicked", self.new_wiz)

        self.edit_button = HIGButton(stock='gtk-edit')
        self.edit_button.connect("clicked", self.open_peditor)
        self.new_button = HIGButton(stock='gtk-new')
        self.new_button.connect("clicked", self.open_peditor)
        self.copy_button = HIGButton(stock='gtk-copy')
        self.copy_button.connect("clicked", self.copy_profiles)
        self.delete_button = HIGButton(stock=gtk.STOCK_DELETE)
        self.delete_button.connect('clicked', self.delete_profile)	
        #Apply Buttons
        self.cancel_button = HIGButton(stock='gtk-close')
        self.cancel_button.connect("clicked", self.quit)
        
        self.connect("delete-event", self.quit)

    def __fill_widgets(self):


        self.profiles = CommandProfile()
        self._reload_profile_list()

        #selection = self.profiles_tv.get_selection()
        #selection.connect("changed", self.change_nmap_command)
        self.profiles_tv.connect("cursor-changed", self.change_nmap_command)

    def __pack_widgets(self):
        """
        Pack all widgets of windows 
        """
        self.vbox_main.pack_start(self.main_frame, True, True)
        self.main_frame.add(self.align)
        self.align.add(self.vbox)
        self.vbox.set_border_width(6)

        self.vbox.pack_start(self.profiles_sw, True, True, 0)

        self.hbox_info.pack_start(self.command_label, False,False,0)
        self.hbox_info.pack_start(self.command_entry, True, True, 0)
        self.vbox.pack_start(self.hbox_info, False,False,0)



        self.hbox_buttons.pack_end(self.cancel_button)    
        self.hbox_buttons.pack_end(self.copy_button, True, True)
        self.hbox_buttons.pack_end(self.edit_button, True, True)
        self.hbox_buttons.pack_end(self.delete_button, True, True)
        self.hbox_buttons.pack_end(self.new_button, True, True)
        self.hbox_buttons.pack_end(self.wiz_button, True, True)
        self.hbox_buttons.set_spacing(6)
#.........这里部分代码省略.........
开发者ID:aregee,项目名称:network-scanner,代码行数:103,代码来源:ProfileManager.py

示例6: __do_layout

# 需要导入模块: from higwidgets.higboxes import HIGHBox [as 别名]
# 或者: from higwidgets.higboxes.HIGHBox import pack_end [as 别名]
    def __do_layout(self):
        """
        Layout widgets.
        """
        main_vbox = HIGVBox()
        main_vbox.set_border_width(5)
        main_vbox.set_spacing(12)
        header_hbox = HIGHBox()
        invname_hbox = HIGHBox()
        scan_hbox = HIGHBox()
        scanadv_hbox = HIGHBox()
        scantarget_hbox = HIGHBox()
        sched_box = HIGHBox()
        btns_hbox = HIGHBox()

        # header
        header_hbox._pack_expand_fill(self.ttitle)
        header_hbox._pack_noexpand_nofill(self.umit_logo)
        # inventory's name
        invname_hbox._pack_noexpand_nofill(self.invname_lbl)
        invname_hbox._pack_expand_fill(self.invname)
        invname_hbox._pack_noexpand_nofill(self.invname_inuse)
        invname_hbox._pack_noexpand_nofill(self.invenabled)
        # scan command
        scan_hbox._pack_noexpand_nofill(self.scandefault)
        scan_hbox._pack_noexpand_nofill(self.scandefault_tip)
        scanadv_hbox._pack_expand_fill(self.scanadv)

        adv_box = HIGVBox()
        scanadv_align = gtk.Alignment(0.5, 0.5, 1, 1)
        scanadv_align.set_padding(6, 0, 12, 0)
        scanname_box = HIGHBox()
        scanname_box._pack_noexpand_nofill(self.scan_name_lbl)
        scanname_box._pack_expand_fill(self.scan_name)
        scanname_box._pack_noexpand_nofill(self.cmd_wizard)
        adv_box.add(scanname_box)
        scancmd_box = HIGHBox()
        scancmd_box._pack_noexpand_nofill(self.scan_command_lbl)
        scancmd_box._pack_expand_fill(self.scan_command)
        adv_box.add(scancmd_box)

        scanadv_align.add(adv_box)
        self.scanadv.add(scanadv_align)
        # scan target
        scantarget_hbox._pack_noexpand_nofill(self.scantarget_lbl)
        scantarget_hbox._pack_expand_fill(self.scantarget)
        scantarget_hbox._pack_noexpand_nofill(self.scantarget_discovery)
        # scheduling profiles
        sched_box._pack_noexpand_nofill(self.sched_name_lbl)
        sched_box._pack_expand_fill(self.sched_name)
        sched_box._pack_noexpand_nofill(self.sched_name_edit)
        # bottom buttons
        btns_hbox.set_homogeneous(True)
        btns_hbox._pack_expand_fill(self.help)
        btns_hbox._pack_expand_fill(hig_box_space_holder())
        btns_hbox._pack_expand_fill(self.cancel)
        btns_hbox._pack_expand_fill(self.ok)


        main_vbox._pack_noexpand_nofill(header_hbox)
        main_vbox._pack_noexpand_nofill(gtk.HSeparator())
        main_vbox._pack_noexpand_nofill(invname_hbox)
        main_vbox._pack_noexpand_nofill(scan_hbox)
        main_vbox._pack_noexpand_nofill(scanadv_hbox)
        main_vbox._pack_noexpand_nofill(scantarget_hbox)
        
        if self.loaded_command and self.edit_mode:
            view_cmd_box = HIGHBox()
            view_cmd_box._pack_noexpand_nofill(gtk.Label(_("Command")))
            # XXX Why don't reuse scan_command?
            self.cmd_entry = gtk.Entry()
            self.cmd_entry.set_text(self.loaded_command)
            view_cmd_box._pack_expand_fill(self.cmd_entry)
            img_info = gtk.Image()
            img_info.set_from_stock(gtk.STOCK_INFO, gtk.ICON_SIZE_MENU)
            eb = gtk.EventBox()
            eb.add(img_info)
            self.tooltips.set_tip(eb, _("Changes in command won't be saved!"))
            view_cmd_box.pack_end(eb, False, False, 0)
            main_vbox._pack_noexpand_nofill(view_cmd_box)

        main_vbox._pack_noexpand_nofill(sched_box)
        main_vbox.pack_end(btns_hbox, False, False, 0)
        main_vbox.pack_end(gtk.HSeparator(), False, False, 0)

        self.add(main_vbox)
开发者ID:aregee,项目名称:network-scanner,代码行数:88,代码来源:NewInventory.py

示例7: __layout

# 需要导入模块: from higwidgets.higboxes import HIGHBox [as 别名]
# 或者: from higwidgets.higboxes.HIGHBox import pack_end [as 别名]
    def __layout(self):
        """
        Layout widgets
        """
        main_vbox = HIGVBox()
        main_vbox.set_border_width(5)
        main_vbox.set_spacing(12)
        main_hpaned = gtk.HPaned()
        btns_hbox = HIGHBox()
        left_box = HIGVBox()
        right_box = gtk.VBox()

        header_hbox = HIGHBox()
        hostdetect_hbox = HIGHBox()
        targetl_hbox = HIGHBox()
        targetv_hbox = HIGHBox()
        targetr_hbox = HIGHBox()

        # header
        header_hbox._pack_expand_fill(self.ttitle)
        header_hbox._pack_noexpand_nofill(self.umit_logo)
        # network list
        netframe = HIGFrame(_("Network list"))
        settings_align = gtk.Alignment(0.5, 0.5, 1, 1)
        settings_align.set_padding(6, 0, 12, 0)
        nbox = HIGVBox()
        entry = gtk.Entry()
        entry.set_text(_("Sample 192.168.254.0/24"))
        nbox._pack_noexpand_nofill(entry)
        addnw_hbox = HIGHBox()
        addnw_hbox._pack_noexpand_nofill(self.addnetworks)
        nbox.pack_end(addnw_hbox, False, False, 0)
        self.networks_box = nbox
        settings_align.add(nbox)
        netframe.add(settings_align)
        # detection
        hostdetect_hbox._pack_noexpand_nofill(self.netdetect_btn)
        hostdetect_hbox._pack_noexpand_nofill(self.hostdetect_btn)

        # target list
        targetl_hbox._pack_noexpand_nofill(self.target_lbl)
        targetv_hbox._pack_expand_fill(self.tview)
        targetr_hbox.pack_end(self.target_remove, False, False, 0)

        # bottom buttons
        btns_hbox.set_homogeneous(True)
        btns_hbox._pack_expand_fill(self.help)
        btns_hbox._pack_expand_fill(hig_box_space_holder())
        btns_hbox._pack_expand_fill(self.cancel)
        btns_hbox._pack_expand_fill(self.apply)
        # change apply button stock text
        lbl = self.apply.get_children()[0].get_children()[0].get_children()[1]
        lbl.set_text(_("Use target list"))


        left_box._pack_noexpand_nofill(netframe)
        left_box.pack_end(hostdetect_hbox, False, False, 0)
        right_box.pack_start(targetl_hbox, False, False, 0)
        right_box.pack_start(targetv_hbox, True, True, 6)
        right_box.pack_start(targetr_hbox, False, False, 0)

        left_align = gtk.Alignment(0.5, 0.5, 1, 1)
        left_align.set_padding(0, 0, 0, 6)
        left_align.add(left_box)
        right_align = gtk.Alignment(0.5, 0.5, 1, 1)
        right_align.set_padding(0, 0, 6, 0)
        right_align.add(right_box)

        main_hpaned.add1(left_align)
        main_hpaned.add2(right_align)

        main_vbox._pack_noexpand_nofill(header_hbox)
        main_vbox._pack_noexpand_nofill(gtk.HSeparator())
        main_vbox._pack_expand_fill(main_hpaned)
        main_vbox.pack_end(btns_hbox, False, False, 0)

        self.add(main_vbox)
开发者ID:aregee,项目名称:network-scanner,代码行数:79,代码来源:HostDiscovery.py


注:本文中的higwidgets.higboxes.HIGHBox.pack_end方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。