panel.cpp revision b9c9c042e0c25210afcc1068a3771dabe6d7b854
/**
* \brief Panel widget
*
* Authors:
* Bryce Harrington <bryce@bryceharrington.org>
* Jon A. Cruz <jon@joncruz.org>
*
* Copyright (C) 2004 Bryce Harrington
* Copyright (C) 2005 Jon A. Cruz
*
* Released under GNU GPL. Read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "panel.h"
#include "icon-size.h"
#include "prefs-utils.h"
#include "desktop-handles.h"
#include "inkscape.h"
namespace Inkscape {
namespace UI {
namespace Widget {
static const int PANEL_SETTING_SIZE = 0;
static const int PANEL_SETTING_MODE = 1;
static const int PANEL_SETTING_WRAP = 2;
static const int PANEL_SETTING_NEXTFREE = 3;
/**
* Construct a Panel
*/
bool menu_desired) :
_menu(0),
_action_area(0),
_fillable(0)
{
_init();
}
{
delete _menu;
}
{
if (_menu) {
}
}
}
{
guint panel_size = 0;
if (_prefs_path) {
}
guint panel_mode = 0;
if (_prefs_path) {
}
guint panel_wrap = 0;
if (_prefs_path) {
}
{
const char *things[] = {
N_("tiny"),
N_("small"),
N_("medium"),
N_("large"),
N_("huge")
};
for (unsigned int i = 0; i < G_N_ELEMENTS(things); i++) {
if (i == panel_size) {
single->set_active(true);
}
single->signal_activate().connect(sigc::bind<int, int>(sigc::mem_fun(*this, &Panel::_bounceCall), PANEL_SETTING_SIZE, i));
}
}
if (panel_mode == 0) {
one->set_active(true);
} else if (panel_mode == 1) {
two->set_active(true);
}
one->signal_activate().connect(sigc::bind<int, int>(sigc::mem_fun(*this, &Panel::_bounceCall), PANEL_SETTING_MODE, 0));
two->signal_activate().connect(sigc::bind<int, int>(sigc::mem_fun(*this, &Panel::_bounceCall), PANEL_SETTING_MODE, 1));
{
check->signal_toggled().connect(sigc::bind<Gtk::CheckMenuItem*>(sigc::mem_fun(*this, &Panel::_wrapToggled), check));
}
for ( std::vector<Gtk::Widget*>::iterator iter = _non_vertical.begin(); iter != _non_vertical.end(); ++iter ) {
}
// _close_button.set_label("X");
}
// _top_bar.pack_end(_close_button, false, false);
if ( _menu_desired ) {
}
pack_start(_top_bar, false, false);
pack_start(*boxy, true, true);
}
{
}
{
switch (_anchor) {
case Gtk::ANCHOR_NORTH:
case Gtk::ANCHOR_SOUTH:
{
if (_menu_desired) {
for (std::vector<Gtk::Widget*>::iterator iter = _non_horizontal.begin(); iter != _non_horizontal.end(); ++iter) {
}
for (std::vector<Gtk::Widget*>::iterator iter = _non_vertical.begin(); iter != _non_vertical.end(); ++iter) {
}
}
// Ensure we are not in "list" mode
}
break;
default:
{
if ( _menu_desired ) {
for (std::vector<Gtk::Widget*>::iterator iter = _non_horizontal.begin(); iter != _non_horizontal.end(); ++iter) {
}
for (std::vector<Gtk::Widget*>::iterator iter = _non_vertical.begin(); iter != _non_vertical.end(); ++iter) {
}
}
}
}
}
}
{
}
void Panel::restorePanelPrefs()
{
guint panel_size = 0;
if (_prefs_path) {
}
guint panel_mode = 0;
if (_prefs_path) {
}
guint panel_wrap = 0;
if (_prefs_path) {
}
}
{
return _signal_response;
}
{
return _signal_present;
}
void Panel::_bounceCall(int i, int j)
{
_menu->set_active(0);
switch (i) {
case PANEL_SETTING_SIZE:
if (_prefs_path) {
}
if (_fillable) {
switch (j) {
case 0:
{
}
break;
case 1:
{
}
break;
case 2:
{
}
break;
case 3:
{
}
break;
case 4:
{
}
break;
default:
;
}
}
break;
case PANEL_SETTING_MODE:
if (_prefs_path) {
}
if (_fillable) {
switch (j) {
case 0:
{
}
break;
case 1:
{
}
break;
default:
break;
}
}
break;
case PANEL_SETTING_WRAP:
if (_prefs_path) {
}
if ( _fillable ) {
}
break;
default:
_handleAction(i - PANEL_SETTING_NEXTFREE, j);
}
}
{
if (toggler) {
}
}
{
return _prefs_path;
}
{
return _label;
}
{
return _verb_num;
}
{
return _apply_label;
}
{
}
{
item->signal_activate().connect(sigc::bind<int, int>(sigc::mem_fun(*this, &Panel::_bounceCall), group + PANEL_SETTING_NEXTFREE, id));
}
{
// for subclasses to override
}
void
{
g_warning("Apply button clicked for panel [Panel::_apply()]");
}
{
return button;
}
{
return button;
}
void
{
// Create a button box for the response buttons if it's the first button to be added
if (!_action_area) {
}
if (response_id != 0) {
// Re-emit clicked signals as response signals
}
}
void
{
}
}
void
{
if (_response_map[response_id])
}
void
{
switch (response_id) {
case Gtk::RESPONSE_APPLY: {
_apply();
break;
}
}
}
{
return sp_desktop_selection(SP_ACTIVE_DESKTOP);
}
} // namespace Widget
} // namespace UI
} // namespace Inkscape
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :