sp-color-notebook.cpp revision 95f1c87a21d171a48aab671a3567847702ff72e8
#define __SP_COLOR_NOTEBOOK_C__
/*
* A block of 3 color sliders plus spinbuttons
*
* Author:
* Lauris Kaplinski <lauris@kaplinski.com>
* bulia byak <buliabyak@users.sf.net>
*
* Copyright (C) 2001-2002 Lauris Kaplinski
*
* This code is in public domain
*/
#define noDUMP_CHANGE_INFO
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <string.h>
#include <stdlib.h>
#include "../dialogs/dialog-events.h"
#include "../prefs-utils.h"
#include "sp-color-notebook.h"
#include "spw-utilities.h"
#include "sp-color-scales.h"
#include "sp-color-wheel-selector.h"
#include "sp-color-icc-selector.h"
struct SPColorNotebookTracker {
};
static SPColorSelectorClass *parent_class;
#define XPAD 4
#define YPAD 1
sp_color_notebook_get_type (void)
{
if (!type) {
GtkTypeInfo info = {
"SPColorNotebook",
sizeof (SPColorNotebook),
sizeof (SPColorNotebookClass),
};
}
return type;
}
static void
{
}
static void
{
if ( colorbook )
{
// remember the page we seitched to
}
}
{
{
csel = getCurrentSelector();
}
{
// Temporary workaround to undo a spurious GRABBED
_released();
}
}
{
{
/* Tell calling code that we have handled this event; the buck
* stops here. */
return TRUE;
}
/* Tell calling code that we have not handled this event; pass it on. */
return FALSE;
}
{
return TRUE;
}
{
if ( entry )
{
if ( active )
{
((ColorNotebook*)(SP_COLOR_SELECTOR(entry->backPointer)->base))->addPage(entry->type, entry->submode);
}
else
{
((ColorNotebook*)(SP_COLOR_SELECTOR(entry->backPointer)->base))->removePage(entry->type, entry->submode);
}
}
}
static void
{
{
}
}
void ColorNotebook::init()
{
guint i = 0;
guint j = 0;
GType *selector_types = 0;
guint selector_type_count = 0;
/* tempory hardcoding to get types loaded */
#if ENABLE_LCMS
#endif // ENABLE_LCMS
/* REJON: Comment out the next line to not use the normal GTK Color
wheel. */
// SP_TYPE_COLOR_GTKSELECTOR;
_btn = 0;
_popup = 0;
_trackerList = g_ptr_array_new ();
_book = gtk_notebook_new ();
for ( i = 0; i < selector_type_count; i++ )
{
{
{
for ( j = 0; j < howmany; j++ )
{
SPColorNotebookTracker *entry = reinterpret_cast< SPColorNotebookTracker* > (malloc(sizeof(SPColorNotebookTracker)));
if ( entry )
{
}
}
}
}
}
for ( i = 0; i < _trackerList->len; i++ )
{
if ( entry )
{
}
}
// restore the last active page
gtk_notebook_set_current_page (GTK_NOTEBOOK (_book), prefs_get_int_attribute ("colorselector", "page", 0));
{
_popup = gtk_menu_new();
for ( i = 0; i < _trackerList->len; i++ )
{
SPColorNotebookTracker *entry = reinterpret_cast< SPColorNotebookTracker* > (g_ptr_array_index (_trackerList, i));
if ( entry )
{
}
}
_btn = gtk_button_new ();
// but first fix it so it remembers its settings in prefs and does not take that much space (entire vertical column!)
//gtk_table_attach (GTK_TABLE (table), align, 2, 3, row, row + 1, GTK_FILL, GTK_FILL, XPAD, YPAD);
gtk_signal_connect_object(GTK_OBJECT(_btn), "event", GTK_SIGNAL_FUNC (sp_color_notebook_menu_handler), GTK_OBJECT(_csel));
if ( !found )
{
}
}
row++;
/* Create RGBA entry and color preview */
_rgbae = gtk_entry_new ();
gtk_table_attach (GTK_TABLE (table), rgbabox, 1, 2, row, row + 1, GTK_FILL, GTK_SHRINK, XPAD, YPAD);
#ifdef SPCS_PREVIEW
#endif
_entryId = gtk_signal_connect (GTK_OBJECT (_rgbae), "changed", GTK_SIGNAL_FUNC (ColorNotebook::_rgbaEntryChangedHook), _csel);
}
static void
{
}
{
if ( _trackerList )
{
_trackerList = 0;
}
if ( _switchId )
{
if ( _book )
{
_switchId = 0;
}
}
}
static void
{
}
static void
{
}
sp_color_notebook_new (void)
{
return GTK_WIDGET (colorbook);
}
: ColorSelector( csel )
{
}
{
if ( current_page >= 0 )
{
if ( SP_IS_COLOR_SELECTOR (widget) )
{
}
}
return csel;
}
{
SPColorSelector* cselPage = 0;
if ( cselPage )
{
}
}
{
}
{
if (_updating) return;
if (_updatingrgba) return;
if (t) {
gchar *e = 0;
if ( e != t ) {
if ( len < 8 ) {
}
}
}
}
{
if ( !_updatingrgba )
{
gchar s[32];
/* Update RGBA entry */
{
}
}
}
{
}
{
}
{
}
{
}
{
}
{
if ( page )
{
if ( submode > 0 )
{
}
// g_message( "Hitting up for tab for '%s'", str );
}
return page;
}
{
gint i = 0;
// count = gtk_notebook_get_n_pages (_book);
count = 200;
{
if ( page )
{
{
// found it.
break;
}
else
{
page = 0;
}
}
else
{
break;
}
}
return page;
}
{
if ( page )
{
if ( where >= 0 )
{
{
// getColorAlpha(_color, &_alpha);
}
}
}
}