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


C++ VBox::pack_start方法代码示例

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


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

示例1: manage

DebuggingPage::DebuggingPage(CommandProxy& proxy)
  : m_proxy(proxy),
    m_stacklist(1, false),
    m_dbglist(4, false) {
  
  m_stacklist.get_column(0)->set_title("Undoable commands");
  
  m_dbglist.get_column(0)->set_title("Level");
  m_dbglist.get_column(1)->set_title("Source file");
  m_dbglist.get_column(2)->set_title("Code line");
  m_dbglist.get_column(3)->set_title("Message");
  
  Gtk::VBox* vbox = manage(new Gtk::VBox);
  add(*vbox);
  
  Gtk::ScrolledWindow* stackscrw = manage(new Gtk::ScrolledWindow);
  stackscrw->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
  vbox->pack_start(*stackscrw);
  stackscrw->add(m_stacklist);

  Gtk::ScrolledWindow* dbgscrw = manage(new Gtk::ScrolledWindow);
  dbgscrw->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
  vbox->pack_start(*dbgscrw);
  dbgscrw->add(m_dbglist);
  
  signal_debug.connect(sigc::mem_fun(*this, &DebuggingPage::add_debug_msg));
  
  reset_gui();
}
开发者ID:ViktorNova,项目名称:dino,代码行数:29,代码来源:debuggingpage.cpp

示例2: ShaderSelector

// Construct the dialog
ShaderChooser::ShaderChooser(const Glib::RefPtr<Gtk::Window>& parent,
							 Gtk::Entry* targetEntry) :
	gtkutil::BlockingTransientWindow(_(LABEL_TITLE), parent),
	_targetEntry(targetEntry),
	_selector(Gtk::manage(new ShaderSelector(this, SHADER_PREFIXES)))
{
	set_border_width(12);

	if (_targetEntry != NULL)
	{
		_initialShader = targetEntry->get_text();

		// Set the cursor of the tree view to the currently selected shader
		_selector->setSelection(_initialShader);
	}

	// Set the default size and position of the window
	set_default_size(DEFAULT_SIZE_X, DEFAULT_SIZE_Y);

	// Connect the key handler to catch the ESC event
	signal_key_press_event().connect(sigc::mem_fun(*this, &ShaderChooser::onKeyPress), false);

	// Construct main VBox, and pack in the ShaderSelector and buttons panel
	Gtk::VBox* vbx = Gtk::manage(new Gtk::VBox(false, 3));
	vbx->pack_start(*_selector, true, true, 0);
	vbx->pack_start(createButtons(), false, false, 0);

	add(*vbx);

	// Connect the window position tracker
	_windowPosition.loadFromPath(RKEY_WINDOW_STATE);

	_windowPosition.connect(this);
	_windowPosition.applyPosition();
}
开发者ID:DerSaidin,项目名称:DarkRadiant,代码行数:36,代码来源:ShaderChooser.cpp

示例3:

ScriptWindow::ScriptWindow() :
	Gtk::VBox(false, 6),
	_outView(Gtk::manage(new gtkutil::ConsoleView)),
	_view(Gtk::manage(new gtkutil::SourceView(SCRIPT_LANGUAGE_ID, false))) // allow editing
{
	_view->unset_focus_chain();

	Gtk::Button* runButton = Gtk::manage(new Gtk::Button(_("Run Script")));
	runButton->signal_clicked().connect(sigc::mem_fun(*this, &ScriptWindow::onRunScript));

	Gtk::HBox* buttonBar = Gtk::manage(new Gtk::HBox(false, 6));
	buttonBar->pack_start(*runButton, false, false, 0);

	Gtk::VBox* inputVBox = Gtk::manage(new Gtk::VBox(false, 3));
	inputVBox->pack_start(*Gtk::manage(new gtkutil::LeftAlignedLabel(_("Python Script Input"))), false, false, 0);
	inputVBox->pack_start(*_view, true, true, 0);
	inputVBox->pack_start(*buttonBar, false, false, 0);

	// Pack the scrolled textview and the entry box to the vbox
	Gtk::VPaned* paned = Gtk::manage(new Gtk::VPaned);
	paned->add1(*inputVBox);
	paned->add2(*_outView);

	pack_start(*paned, true, true, 0);
	show_all();
}
开发者ID:DerSaidin,项目名称:DarkRadiant,代码行数:26,代码来源:ScriptWindow.cpp

示例4:

// Create the conversation entity panel
Gtk::Widget& ConversationDialog::createEntitiesPanel()
{
	// Hbox containing the entity list and the buttons vbox
	Gtk::HBox* hbx = Gtk::manage(new Gtk::HBox(false, 6));

	// Tree view listing the conversation_info entities
	_entityView = Gtk::manage(new Gtk::TreeView(_convEntityList));
	_entityView->set_headers_visible(false);

	Glib::RefPtr<Gtk::TreeSelection> sel = _entityView->get_selection();
	sel->signal_changed().connect(sigc::mem_fun(*this, &ConversationDialog::onEntitySelectionChanged));

	// Entity Name column
	_entityView->append_column(*Gtk::manage(new gtkutil::TextColumn("", _convEntityColumns.displayName)));

	hbx->pack_start(*Gtk::manage(new gtkutil::ScrolledFrame(*_entityView)), true, true, 0);

	// Vbox for the buttons
	Gtk::VBox* buttonBox = Gtk::manage(new Gtk::VBox(false, 6));

	Gtk::Button* addButton = Gtk::manage(new Gtk::Button(Gtk::Stock::ADD));
	addButton->signal_clicked().connect(sigc::mem_fun(*this, &ConversationDialog::onAddEntity));
	buttonBox->pack_start(*addButton, true, true, 0);

	_deleteEntityButton = Gtk::manage(new Gtk::Button(Gtk::Stock::DELETE));
	_deleteEntityButton->set_sensitive(false); // disabled at start
	_deleteEntityButton->signal_clicked().connect(sigc::mem_fun(*this, &ConversationDialog::onDeleteEntity));

	buttonBox->pack_start(*_deleteEntityButton, true, true, 0);

	hbx->pack_start(*buttonBox, false, false, 0);

	return *hbx;
}
开发者ID:OpenTechEngine,项目名称:DarkRadiant,代码行数:35,代码来源:ConversationDialog.cpp

示例5: PropertyEditor

// Main constructor
SkinPropertyEditor::SkinPropertyEditor(Entity* entity,
									   const std::string& name,
									   const std::string& options)
: PropertyEditor(entity),
  _key(name)
{
	// Construct the main widget (will be managed by the base class)
	Gtk::VBox* mainVBox = new Gtk::VBox(false, 6);

	// Register the main widget in the base class
	setMainWidget(mainVBox);

	// Horizontal box contains browse button
	Gtk::HBox* hbx = Gtk::manage(new Gtk::HBox(false, 3));
	hbx->set_border_width(3);

	// Create the browse button
	Gtk::Button* browseButton = Gtk::manage(new Gtk::Button(_("Choose skin...")));
	browseButton->set_image(*Gtk::manage(new Gtk::Image(
		PropertyEditorFactory::getPixbufFor("skin"))));

	browseButton->signal_clicked().connect(
		sigc::mem_fun(*this, &SkinPropertyEditor::_onBrowseButton));

	hbx->pack_start(*browseButton, true, false, 0);

	// Pack hbox into vbox (to limit vertical size), then edit frame
	Gtk::VBox* vbx = Gtk::manage(new Gtk::VBox(false, 0));
	vbx->pack_start(*hbx, true, false, 0);

	mainVBox->pack_start(*vbx, true, true, 0);
}
开发者ID:DerSaidin,项目名称:DarkRadiant,代码行数:33,代码来源:SkinPropertyEditor.cpp

示例6: GlobalMainFrame

// Construct the dialog
LightTextureChooser::LightTextureChooser()
:	gtkutil::BlockingTransientWindow(_("Choose texture"), GlobalMainFrame().getTopLevelWindow()),
	_selector(Gtk::manage(new ShaderSelector(this, getPrefixList(), true))) // true >> render a light texture
{
	// Set the default size of the window
	Gdk::Rectangle rect;

	if (GlobalGroupDialog().getDialogWindow()->is_visible())
	{
		rect = gtkutil::MultiMonitor::getMonitorForWindow(GlobalGroupDialog().getDialogWindow());
	}
	else
	{
		rect = gtkutil::MultiMonitor::getMonitorForWindow(GlobalMainFrame().getTopLevelWindow());
	}

	set_default_size(static_cast<int>(rect.get_width()*0.6f), static_cast<int>(rect.get_height()*0.6f));

	// Construct main VBox, and pack in ShaderSelector and buttons panel
	Gtk::VBox* vbx = Gtk::manage(new Gtk::VBox(false, 6));

	vbx->pack_start(*_selector, true, true, 0);
	vbx->pack_start(createButtons(), false, false, 0);

	add(*vbx);
}
开发者ID:OpenTechEngine,项目名称:DarkRadiant,代码行数:27,代码来源:LightTextureChooser.cpp

示例7:

void
ExpireDialog::init()
{
    _spinner.set_numeric (true);
    _spinner.set_digits (1);
    _spinner.set_range (0, 30);
    _spinner.set_snap_to_ticks();
    _spinner.set_adjustment (_adj);
    _spinner.set_value (AppContext::get().get_expire());

    Gtk::VBox *vbox = get_vbox();
    vbox->pack_start (_label1, Gtk::PACK_SHRINK, 10);
    _box.add (*new Gtk::HBox);
    _box.pack_start (_spinner, Gtk::PACK_SHRINK, 10);
    _box.pack_start (_label2, Gtk::PACK_SHRINK, 0);
    _box.add (*new Gtk::HBox);
    vbox->pack_start (_box, Gtk::PACK_EXPAND_PADDING, 10);

    add_button (_("Do expire"), 1);
    add_button (Gtk::Stock::CANCEL, 0);

    /// Move focus to Do button
    cwidget_list_t list = get_action_area()->get_children();
    for (cwidget_list_t::iterator it = list.begin(); it != list.end(); ++it)
        if (get_response_for_widget (**it) == 1)
        { const_cast<Widget&>(**it).grab_focus(); break; }
    
    _changed_connection = _adj.signal_value_changed().connect (
            sigc::mem_fun (*this, &ExpireDialog::on_value_changed));
    
    show_all();
}
开发者ID:BackupTheBerlios,项目名称:calo-svn,代码行数:32,代码来源:ExpireDialog.cpp

示例8:

DialogOperationChooserGTKMM::DialogOperationChooserGTKMM( Gtk::Window* parent )	: 
																																									Dialog( "Select an operation node", parent ),
																																									radioTextFileStorage("Text file storage"),
																																									radioExecuteSystemCommand("System command")
{
	
	// Request a minimum with
	this->set_size_request( 250 ); 
	
	// Put the radio buttons in the same group.
	Gtk::RadioButtonGroup group = radioTextFileStorage.get_group();
	radioExecuteSystemCommand.set_group( group );
	
	// Place the radio buttons in the dialog.
	Gtk::VBox* vBox = this->get_vbox();
	vBox->pack_start( radioTextFileStorage );
	vBox->pack_start( radioExecuteSystemCommand );
	
	// Add buttons
	this->add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
 	this->add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
	
	show_all();

};
开发者ID:AlbertPluton,项目名称:Tagnlock,代码行数:25,代码来源:DialogOperationChooserGTKMM.cpp

示例9: GlobalMainFrame

// Main constructor
ModalProgressDialog::ModalProgressDialog(const Glib::RefPtr<Gtk::Window>& parent, const std::string& title)
: gtkutil::TransientWindow(title, GlobalMainFrame().getTopLevelWindow()),
  _label(Gtk::manage(new Gtk::Label)),
  _progressBar(Gtk::manage(new Gtk::ProgressBar)),
  _aborted(false)
{
  	// Window properties
	set_modal(true);
	set_position(Gtk::WIN_POS_CENTER_ON_PARENT);
	set_default_size(360, 80);
	set_border_width(12);

	// Create a vbox
	Gtk::VBox* vbx = Gtk::manage(new Gtk::VBox(false, 12));

	// Pack a progress bar into the window
	vbx->pack_start(*_progressBar, false, false, 0);

	// Pack the label into the window
	vbx->pack_start(*_label, true, false, 0);
	add(*vbx);

	// Pack a right-aligned cancel button at the bottom
	Gtk::Button* cancelButton = Gtk::manage(new Gtk::Button(Gtk::Stock::CANCEL));
	cancelButton->signal_clicked().connect(sigc::mem_fun(*this, &ModalProgressDialog::_onCancel));

	vbx->pack_end(*Gtk::manage(new gtkutil::RightAlignment(*cancelButton)), false, false, 0);

	// Connect the realize signal to remove the window decorations
	signal_realize().connect(sigc::mem_fun(*this, &ModalProgressDialog::_onRealize));

	// Show the window
	show_all();
	handleEvents();
}
开发者ID:DerSaidin,项目名称:DarkRadiant,代码行数:36,代码来源:ModalProgressDialog.cpp

示例10: build

void Simple::build(bool modeling)
{
    Gtk::VBox* vbox;

    vle::utils::Package pack(getPackage());

    std::string glade = pack.getPluginGvleModelingFile(
                "DifferenceEquation.glade", vle::utils::PKG_BINARY);

    mXml = Gtk::Builder::create();
    mXml->add_from_file(glade.c_str());

    mXml->get_widget("DialogPluginSimpleBox", m_dialog);
    m_dialog->set_title("DifferenceEquation - Simple");
    mXml->get_widget("SimplePluginVBox", vbox);

    vbox->pack_start(mNameValue.build(mXml));
    vbox->pack_start(mTimeStep.build(mXml));
    if (modeling) {
        vbox->pack_start(mParameters.build(mXml));

        {
            m_buttonSource = Gtk::manage(
                new Gtk::Button("Compute / InitValue / User section"));
            m_buttonSource->show();
            vbox->pack_start(*m_buttonSource);
            mList.push_back(m_buttonSource->signal_clicked().connect(
                                sigc::mem_fun(*this, &Plugin::onSource)));
        }
    }
    vbox->pack_start(mMapping.build(mXml));
}
开发者ID:mikaelgrialou,项目名称:packages,代码行数:32,代码来源:Simple.cpp

示例11: PropertyEditor

// Main constructor
TexturePropertyEditor::TexturePropertyEditor(Entity* entity,
											 const std::string& name,
											 const std::string& options)
: PropertyEditor(entity),
  _prefixes(options),
  _key(name)
{
	// Construct the main widget (will be managed by the base class)
	Gtk::VBox* mainVBox = new Gtk::VBox(false, 6);

	// Register the main widget in the base class
	setMainWidget(mainVBox);

	Gtk::VBox* outer = Gtk::manage(new Gtk::VBox(false, 0));
	Gtk::HBox* editBox = Gtk::manage(new Gtk::HBox(false, 3));

	// Create the browse button
	Gtk::Button* browseButton = Gtk::manage(new Gtk::Button(_("Choose texture...")));
	browseButton->set_image(*Gtk::manage(new Gtk::Image(
		PropertyEditorFactory::getPixbufFor("texture"))));

	browseButton->signal_clicked().connect(
		sigc::mem_fun(*this, &TexturePropertyEditor::_onBrowse));

	editBox->pack_start(*browseButton, true, false, 0);
	outer->pack_start(*editBox, true, false, 0);

	mainVBox->pack_start(*outer, true, true, 0);
}
开发者ID:DerSaidin,项目名称:DarkRadiant,代码行数:30,代码来源:TexturePropertyEditor.cpp

示例12: lvScriptPreview

ScriptAddDlgGtk::ScriptAddDlgGtk()
	: lvScriptPreview(1)
	, lblScriptSelection(gettext("Script to insert:")
	, Gtk::ALIGN_LEFT)
	, lblScriptPreview(gettext("Preview:"), Gtk::ALIGN_LEFT)
{
	this->set_title(gettext("Add script"));
	this->set_icon_name("gpc");
	this->set_default_size(400, 300);
	Gtk::VBox* vbScriptAddDlg = this->get_vbox();
	vbScriptAddDlg->set_spacing(10);
	vbScriptAddDlg->pack_start(hbScriptSelection, Gtk::PACK_SHRINK);
	hbScriptSelection.set_border_width(10);
	hbScriptSelection.pack_start(lblScriptSelection);
	hbScriptSelection.pack_start(cbScriptSelection);
	vbScriptAddDlg->pack_start(vbScriptPreview);
	vbScriptPreview.pack_start(lblScriptPreview, Gtk::PACK_SHRINK);
	vbScriptPreview.pack_start(scrScriptPreview);
	scrScriptPreview.add(lvScriptPreview);
	vbScriptPreview.set_border_width(10);
	scrScriptPreview.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
	scrScriptPreview.set_shadow_type(Gtk::SHADOW_IN);
	lvScriptPreview.set_column_title(0, gettext("Entry"));
	lvScriptPreview.set_headers_visible(false);
	
	this->add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
	this->add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);

	this->signal_response().connect(sigc::mem_fun(this, &ScriptAddDlgGtk::signal_scriptAddDlg_response));
	cbScriptSelection.signal_changed().connect(sigc::mem_fun(this, &ScriptAddDlgGtk::signal_script_selection_changed));
}
开发者ID:Sebi55,项目名称:GPC,代码行数:31,代码来源:scriptAddDlgGtk.cpp

示例13:

/**
	Creates a connection dialog. This will change pointers to strings and int
	representing the connection. Mainly user, host and port. The final values of
	the pointers will be assigned when the dialog will be closed.
	
	\param[in,out] u Pointer on the username
	\param[in,out] pw Pointer on the password
	\param[in,out] h Pointer on the host
	\param[in,out] p Pointer on the port
*/
DialogConnect::DialogConnect(std::string *u, std::string *pw, std::string *h, int *p) {
	user = u;
	host = h;
	port = p;
	pass = pw;
	
	Gtk::VBox *layout = Gtk::manage(new Gtk::VBox);
	
	Glib::RefPtr<Gtk::Adjustment> adj = Gtk::Adjustment::create(*p, 0, 65535, 1);
	portSpinButton = Gtk::manage(new Gtk::SpinButton(adj));
	
	okButton = Gtk::manage(new Gtk::Button(Gtk::Stock::OK));
	
	userEntry = Gtk::manage(new Gtk::Entry());
	userEntry->set_text(*u);
	
	passEntry = Gtk::manage(new Gtk::Entry());
	passEntry->set_visibility(false);
	passEntry->set_text(*pw);
	
	hostEntry = Gtk::manage(new Gtk::Entry());
	hostEntry->set_text(*h);
	
	Gtk::Label* ul = Gtk::manage(new Gtk::Label("Username : "));
	Gtk::Label* pwl = Gtk::manage(new Gtk::Label("Password : "));
	Gtk::Label* hl = Gtk::manage(new Gtk::Label("Hostname : "));
	Gtk::Label* pl = Gtk::manage(new Gtk::Label("Port     : "));
	
	Gtk::HBox *h1 = Gtk::manage(new Gtk::HBox());
	Gtk::HBox *h2 = Gtk::manage(new Gtk::HBox());
	Gtk::HBox *h3 = Gtk::manage(new Gtk::HBox());
	Gtk::HBox *h4 = Gtk::manage(new Gtk::HBox());
	
	h1->add(*ul);
	h1->add(*userEntry);
	
	h4->add(*pwl);
	h4->add(*passEntry);
	
	h2->add(*hl);
	h2->add(*hostEntry);
	
	h3->add(*pl);
	h3->add(*portSpinButton);
	
	layout->pack_start(*h1, Gtk::PACK_SHRINK);
	layout->pack_start(*h4, Gtk::PACK_SHRINK);
	layout->pack_start(*h2, Gtk::PACK_SHRINK);
	layout->pack_start(*h3, Gtk::PACK_SHRINK);
	layout->pack_end(*okButton, Gtk::PACK_SHRINK);
	
	remove();
	add(*layout);
	
	okButton->signal_clicked().connect(sigc::mem_fun(*this, &DialogConnect::onOk));
	passEntry->signal_activate().connect(sigc::mem_fun(*this, &DialogConnect::onOk));
	hostEntry->signal_activate().connect(sigc::mem_fun(*this, &DialogConnect::onOk));
	
	show_all();
}
开发者ID:thomas-maurice,项目名称:igafemgui,代码行数:70,代码来源:dialogConnect.cpp

示例14: manage

WindowLevelToolButton::WindowLevelToolButton() {
	Gtk::HBox* hbox = manage(new Gtk::HBox);

	Gtk::Image* image = manage(new Gtk::Image);
	Glib::RefPtr<Gdk::Pixbuf> p = Aeskulap::IconFactory::load_from_file("cursor_windowlevel.png");
	if(p) {
		image->set(p);
	}
	image->show();
	//image->set_padding(6, 0);

	m_invert = manage(new Gtk::ToggleToolButton(*image));
	m_invert->set_size_request(32, 32);
	m_invert->set_tooltip(m_tooltips, gettext("Invert windowlevel"));
	m_invert->show();
	m_invert->signal_toggled().connect(sigc::mem_fun(*this, &WindowLevelToolButton::on_invert));

	Gtk::VBox* vbox = manage(new Gtk::VBox);

	vbox->pack_start(*m_invert, true, false);
	vbox->show();

	hbox->pack_start(*vbox, Gtk::PACK_SHRINK);

	vbox = manage(new Gtk::VBox);
	vbox->show();

	m_combo = manage(new Gtk::ComboBoxText);
	m_combo->set_size_request(-1, 32);
	m_combo->show();
	m_combo->signal_changed().connect(sigc::mem_fun(*this, &WindowLevelToolButton::on_changed));

	vbox->pack_start(*m_combo, true, false);

	hbox->pack_start(*vbox, Gtk::PACK_SHRINK);

	vbox = manage(new Gtk::VBox);
	vbox->show();

	image = manage(new Gtk::Image(Gtk::Stock::ADD, Gtk::ICON_SIZE_SMALL_TOOLBAR));
	image->show();

	Gtk::ToolButton* btn = manage(new Gtk::ToolButton(*image));
	btn->set_size_request(32, 32);
	btn->set_tooltip(m_tooltips, gettext("Add new windowlevel preset"));
	btn->show();
	btn->signal_clicked().connect(sigc::mem_fun(*this, &WindowLevelToolButton::on_add));

	vbox->pack_start(*btn, true, false);
	hbox->pack_start(*vbox, true,false);
	
	hbox->show();

	add(*hbox);

	update();
	m_widgetlist.insert(this);
}
开发者ID:151706061,项目名称:aeskulap,代码行数:58,代码来源:awindowleveltoolbutton.cpp

示例15: Refresh

    DC1394SliderWB::DC1394SliderWB(Gtk::VBox &vbox,yarp::dev::RemoteFrameGrabberControlsDC1394 *fg)
        : m_Red(0.0,1.005,0.005),m_Blue(0.0,1.005,0.005),m_OnePush("One Push")
    {
        if (!(pFG=fg)->hasFeatureDC1394(YARP_FEATURE_WHITE_BALANCE))
        {
            m_bInactive=true;
            return;
        }

        m_nInternalChange=0;

        m_bInactive=false;

        m_Height+=100;

        vbox.pack_start(*(new Gtk::HSeparator()),Gtk::PACK_SHRINK,2);

        Gtk::HBox* pHBox=new Gtk::HBox();
        pHBox->pack_start(*(new Gtk::Label("White Balance",0)),Gtk::PACK_EXPAND_PADDING);
        pHBox->pack_start(*(pPwr=new Gtk::CheckButton("pwr")),Gtk::PACK_SHRINK,0);
        pHBox->pack_start(*(pRBa=new Gtk::RadioButton("auto")),Gtk::PACK_SHRINK,0);
        const Glib::ustring s_man("man");
        Gtk::RadioButtonGroup rbg=pRBa->get_group();
        pHBox->pack_start(*(pRBm=new Gtk::RadioButton(rbg,s_man,false)),Gtk::PACK_SHRINK,0);
        pHBox->pack_start(m_OnePush,Gtk::PACK_SHRINK,8);
        vbox.pack_start(*(pHBox),Gtk::PACK_SHRINK);

        m_Blue.set_size_request(256,40);
        m_Red.set_size_request(256,40);
        Gtk::HBox *pRbox=new Gtk::HBox();
        pRbox->pack_start(*(new Gtk::Label("RED ",0)),Gtk::PACK_SHRINK,4);
        pRbox->pack_start(m_Red,Gtk::PACK_EXPAND_WIDGET,10);
        vbox.pack_start(*(pRbox),Gtk::PACK_SHRINK,0);
        Gtk::HBox *pBbox=new Gtk::HBox();
        pBbox->pack_start(*(new Gtk::Label("BLUE",0)),Gtk::PACK_SHRINK,4);
        pBbox->pack_start(m_Blue,Gtk::PACK_EXPAND_WIDGET,10);
        vbox.pack_start(*(pBbox),Gtk::PACK_SHRINK,0);

        //pFG->getWhiteBalanceDC1394(m_old_blu,m_old_red);
        //m_new_red=m_old_red;
        //m_new_blu=m_old_blu;

        m_old_red=m_old_blu=-1.0;

        m_Blue.signal_value_changed().connect(sigc::mem_fun(*this,&DC1394SliderWB::slider_handler));
        m_Blue.set_update_policy(Gtk::UPDATE_DISCONTINUOUS);
        m_Red.signal_value_changed().connect(sigc::mem_fun(*this,&DC1394SliderWB::slider_handler));
        m_Red.set_update_policy(Gtk::UPDATE_DISCONTINUOUS);
        pPwr->signal_clicked().connect(sigc::mem_fun(*this,&DC1394SliderWB::pwr_handler));
        pRBa->signal_clicked().connect(sigc::mem_fun(*this,&DC1394SliderWB::automan_handler));
        m_OnePush.signal_clicked().connect(sigc::mem_fun(*this,&DC1394SliderWB::onepush_handler));

        Refresh();
    }
开发者ID:AbuMussabRaja,项目名称:icub-main,代码行数:54,代码来源:Sliders.cpp


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