swatches.cpp revision 8df0cf00f300e994c28dd23282e4d7a815d46229
/*
* A simple panel for color swatches
*
* Authors:
* Jon A. Cruz
*
* 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 <errno.h>
#include "inkscape.h"
#include "document.h"
#include "desktop-handles.h"
#include "inkscape.h"
#include "desktop-style.h"
#include "path-prefix.h"
#include "swatches.h"
#include "eek-preview.h"
namespace Inkscape {
namespace UI {
namespace Dialogs {
_r(r),
_g(g),
_b(b),
{
}
{
}
{
if ( this != &other ) {
*this = other;
}
}
{
if ( this != &other ) {
}
return *this;
}
typedef enum {
XCOLOR_DATA = 0,
static const GtkTargetEntry color_entries[] = {
{"application/x-color", 0, XCOLOR_DATA},
};
{
if ( info == 1 ) {
8, // format
tmp = 0;
} else {
16, // format
(3+1) * 2);
}
}
//"drag-drop"
gint x,
gint y,
{
// TODO finish
return TRUE;
}
if ( item ) {
item->buttonClicked(false);
}
}
if ( item ) {
item->buttonClicked(true);
}
}
{
if ( style == PREVIEW_STYLE_BLURB ) {
} else {
blank = " ";
}
/*
Gtk::Button *btn = new Gtk::Button(blank);
Gdk::Color color;
color.set_rgb((_r << 8)|_r, (_g << 8)|_g, (_b << 8)|_b);
btn->modify_bg(Gtk::STATE_NORMAL, color);
btn->modify_bg(Gtk::STATE_ACTIVE, color);
btn->modify_bg(Gtk::STATE_PRELIGHT, color);
btn->modify_bg(Gtk::STATE_SELECTED, color);
Gtk::Widget* newBlot = btn;
*/
/*
newBlot->signal_clicked().connect( sigc::mem_fun(*this, &ColorItem::buttonClicked) );
sigc::signal<void> type_signal_something;
*/
"clicked",
this);
"alt-clicked",
this);
"drag-data-get",
this);
"drag-drop",
this);
}
return widget;
}
{
if (desktop) {
gchar c[64];
}
}
str++;
}
while ( *str ) {
str++;
}
str--;
*str-- = 0;
}
return ret;
}
void skipWhitespace( char*& str ) {
str++;
}
}
val = 0;
str++;
}
return retval;
}
class JustForNow
{
public:
JustForNow() : _prefWidth(0) {}
int _prefWidth;
};
{
char block[1024];
if ( f ) {
if ( result ) {
bool inHeader = true;
bool hasErr = false;
do {
if ( result ) {
if ( block[0] == '#' ) {
// ignore comment
} else {
// very simple check for header versus entry
ptr++;
}
if ( *ptr == 0 ) {
// blank line. skip it.
// should be an entry link
inHeader = false;
int r = 0;
int g = 0;
int b = 0;
if ( *ptr ) {
if ( !hasErr ) {
}
if ( !hasErr ) {
}
if (n != NULL) {
name = n;
}
}
if ( !hasErr ) {
// Add the entry now
}
} else {
hasErr = true;
}
} else {
if ( !inHeader ) {
// Hmmm... probably bad. Not quite the format we want?
hasErr = true;
} else {
if ( sep ) {
*sep = 0;
if ( *name ) {
{
}
{
// overflow
// failed conversion
} else {
}
}
} else {
// error
hasErr = true;
}
} else {
// error
hasErr = true;
}
}
}
}
}
if ( !hasErr ) {
} else {
delete onceMore;
}
}
}
fclose(f);
}
}
static void loadEmUp()
{
static bool beenHere = false;
if ( !beenHere ) {
beenHere = true;
// Use this loop to iterate through a list of possible document locations.
if (!directory) {
} else {
}
}
}
}
// toss the dirname
}
}
}
{
if ( !instance ) {
instance = new SwatchesPanel();
}
return *instance;
}
/**
* Constructor
*/
_holder(0)
{
_holder = new PreviewHolder();
loadEmUp();
if ( first->_prefWidth > 0 ) {
}
_holder->freezeUpdates();
for ( std::vector<ColorItem*>::iterator it = first->_colors.begin(); it != first->_colors.end(); it++ ) {
}
_holder->thawUpdates();
int i = 0;
i++;
}
}
}
{
}
{
// Must call the parent class or bad things might happen
if ( _holder )
{
}
}
{
switch( setId ) {
case 3:
{
if ( curr->_prefWidth > 0 ) {
}
_holder->freezeUpdates();
for ( std::vector<ColorItem*>::iterator it = curr->_colors.begin(); it != curr->_colors.end(); it++ ) {
}
_holder->thawUpdates();
}
}
break;
}
}
} //namespace Dialogs
} //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 :