App-Guiio
view release on metacpan or search on metacpan
commit 89875206288eebadda5f88745e81625d5c8460ba
Author: nadim khemir <nadim@naquadim.(none)>
Date: Wed May 28 14:34:35 2008 +0200
ADDED: keep selected elements selected after a quick link
commit e021055fcbc708a39f26e2d9a1c524664add87b9
Author: nadim khemir <nadim@naquadim.(none)>
Date: Thu May 15 08:30:42 2008 +0200
ADDED: changing background and grid color
ADDED: show/hide grid
commit 9df9c91a11a865ea95b8abedc245a29c825e8e6d
Author: nadim khemir <nadim@naquadim.(none)>
Date: Fri May 9 01:45:37 2008 +0200
CHANGED: shortcuts to zoomin zoom out
CHANGED: text edit box automatically focused and selected (thanks to Tian)
commit 08ae9b7e8d9fe1d4e3cb7b8d72623cc3e116cf3a
Author: nadim khemir <nadim@naquadim.(none)>
Date: Wed May 7 23:51:42 2008 +0200
FIXED: title has frame when text doesn't
commit ae1b8461e6698ae7df9f8ba49e0189794803e742
Author: nadim khemir <nadim@naquadim.(none)>
Date: Wed May 7 21:57:50 2008 +0200
ADDED: background and grid color changing
commit 611b3a181257daf60cb3ea771ee1631c7350b314
Merge: 637524b... 8a7f7d3...
Author: nadim khemir <nadim@naquadim.(none)>
Date: Wed May 7 01:48:24 2008 +0200
Merge hp:/home/nadim/Desktop/guiio
Conflicts:
#Box added via 'B' shortcut should be selected
#reselect elements after quick link
#select text an focus in text editing window
#error: title has frame when text doesn't
#link to camel box
#background color, grid color
#save file in exit dialog
#continuation _from_ diagonal is not correct
!allow diagonals in setup
#diagonal lines
#error: connector character is wrong
#dynamically choose if the arrow allows diagonal or not (keyboard)
#only allow start-end connectors to link for multiwirl
but allow moving of the intermediate connectors
#shortcut that adds elements but opens the edit dialog directly before inserting the object
should this be the default for object creation from stencils?
=> shall we add a EDIT_ON_CREATE fields=
#ctl + shift + arrows => connect arrows as connect boxes does
#color groups when using solid background
=> through a get_element_background_color
#error shift plus select area doesn't work
#do notshow resize rectangle if attribut is not set
#error after aligning box centers, the connectors are real weird in if_elsif.gpad
#verify all the '* $character_' and '\ $character_'
#editing box breaks the connections
lib/App/Guiio.pm view on Meta::CPAN
DRAGGING => '',
SELECTION_RECTANGLE =>{START_X => 0, START_Y => 0},
ACTIONS => {},
VALID_SELECT_ACTION => { map {$_, 1} qw(resize move)},
COPY_OFFSET_X => 3,
COPY_OFFSET_Y => 3,
COLORS =>
{
background => [255, 255, 255],
grid => [229, 235, 255],
ruler_line => [85, 155, 225],
selected_element_background => [180, 244, 255],
element_background => [251, 251, 254],
element_foreground => [0, 0, 0] ,
selection_rectangle => [255, 0, 255],
test => [0, 255, 255],
group_colors =>
[
[[250, 221, 190], [250, 245, 239]],
[[182, 250, 182], [241, 250, 241]],
[[185, 219, 250], [244, 247, 250]],
[[137, 250, 250], [235, 250, 250]],
lib/App/Guiio.pm view on Meta::CPAN
}
#-----------------------------------------------------------------------------
sub expose_event
{
my ($widget, $event, $self) = @_;
my $gc = Gtk2::Gdk::GC->new($self->{PIXMAP});
# draw background
$gc->set_foreground($self->get_color('background'));
$self->{PIXMAP}->draw_rectangle
(
$gc, TRUE,
0, 0,
$widget->allocation->width, $widget->allocation->height
);
my ($character_width, $character_height) = $self->get_character_size() ;
my ($widget_width, $widget_height) = $self->{PIXMAP}->get_size();
lib/App/Guiio.pm view on Meta::CPAN
$gc,
$vertical * $character_width, 0,
$vertical * $character_width, $widget_height
);
}
}
# draw elements
for my $element (@{$self->{ELEMENTS}})
{
my ($background_color, $foreground_color) = $element->get_colors() ;
if($self->is_element_selected($element))
{
if(exists $element->{GROUP} and defined $element->{GROUP}[-1])
{
$background_color =
$self->get_color
(
$self->{COLORS}{group_colors}[$element->{GROUP}[-1]{GROUP_COLOR}][0]
) ;
}
else
{
$background_color = $self->get_color('selected_element_background');
}
}
else
{
if(defined $background_color)
{
$background_color = $self->get_color($background_color) ;
}
else
{
if(exists $element->{GROUP} and defined $element->{GROUP}[-1])
{
$background_color =
$self->get_color
(
$self->{COLORS}{group_colors}[$element->{GROUP}[-1]{GROUP_COLOR}][1]
) ;
}
else
{
$background_color = $self->get_color('element_background') ;
}
}
}
$foreground_color =
defined $foreground_color
? $self->get_color($foreground_color)
: $self->get_color('element_foreground') ;
$gc->set_foreground($foreground_color);
for my $mask_and_element_strip ($element->get_mask_and_element_stripes())
{
$gc->set_foreground($background_color);
$self->{PIXMAP}->draw_rectangle
(
$gc,
$self->{OPAQUE_ELEMENTS},
($element->{X} + $mask_and_element_strip->{X_OFFSET}) * $character_width,
($element->{Y} + $mask_and_element_strip->{Y_OFFSET}) * $character_height,
$mask_and_element_strip->{WIDTH} * $character_width,
$mask_and_element_strip->{HEIGHT} * $character_height,
);
lib/App/Guiio/stripes/stripes.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
sub get_colors
{
my ($self) = @_ ;
return $self->{COLORS}{BACKGROUND}, $self->{COLORS}{FOREGROUND} ;
}
#-----------------------------------------------------------------------------
sub set_background_color
{
my ($self, $background_color) = @_ ;
$self->{COLORS}{BACKGROUND} = $background_color ;
}
#-----------------------------------------------------------------------------
sub set_foreground_color
{
my ($self, $foreground_color) = @_ ;
$self->{COLORS}{FOREGROUND} = $foreground_color ;
}
#-----------------------------------------------------------------------------
sub set_colors
{
my ($self, $background_color, $foreground_color) = @_ ;
$self->{COLORS}{BACKGROUND} = $background_color ;
$self->{COLORS}{FOREGROUND} = $foreground_color ;
}
#-----------------------------------------------------------------------------
sub get_text
{
}
#-----------------------------------------------------------------------------
setup/actions/colors.pl view on Meta::CPAN
#----------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------
sub change_elements_colors
{
my ($self, $is_background) = @_ ;
my ($color) = $self->get_color_from_user([0, 0, 0]) ;
$self->create_undo_snapshot() ;
for my $element($self->get_selected_elements(1))
{
$is_background
? $element->set_background_color($color)
: $element->set_foreground_color($color) ;
}
$self->update_display() ;
}
#----------------------------------------------------------------------------------------------
sub change_guiio_background_color
{
my ($self) = @_ ;
my ($color) = $self->get_color_from_user([0, 0, 0]) ;
$self->create_undo_snapshot() ;
$self->flush_color_cache() ;
$self->{COLORS}{background} = $color ;
$self->update_display() ;
}
#----------------------------------------------------------------------------------------------
sub change_grid_color
{
my ($self) = @_ ;
setup/actions/unsorted.pl view on Meta::CPAN
#----------------------------------------------------------------------------------------------
register_action_handlers
(
'Create multiple box elements from a text description' => ['C00-m', \&insert_multiple_boxes_from_text_description],
'Create multiple text elements from a text description' => ['C0S-M', \&insert_multiple_texts_from_text_description],
'Flip transparent element background' => ['C00-t', \&transparent_elements],
'Flip grid display' => ['000-g', \&flip_grid_display],
'Undo' => ['C00-z', \&undo],
'Display undo stack statistics' => ['C0S-Z', \&display_undo_stack_statistics],
'Redo' => ['C00-y', \&redo],
'Display keyboard mapping' => ['000-k', \&display_keyboard_mapping],
'Display commands' => ['C00-k', \&display_commands],
'Display action files' => ['C0S-K', \&display_action_files],
'Zoom in' => ['000-KP_Add', \&zoom, 2],
'Zoom out' => ['000-KP_Subtract', \&zoom, -2],
'Help' => ['000-F1', \&display_help],
setup/guiio_object/basic.pl view on Meta::CPAN
FONT_FAMILY => 'Monospace',
FONT_SIZE => '10',
TAB_AS_SPACES => ' ',
DISPLAY_GRID => 1,
COPY_OFFSET_X => 3,
COPY_OFFSET_Y => 3,
COLORS =>
{
background => [255, 255, 255],
grid => [229, 235, 255],
ruler_line => [85, 155, 225],
selected_element_background => [180, 244, 255],
element_background => [251, 251, 254],
element_foreground => [0, 0, 0] ,
selection_rectangle => [255, 0, 255],
test => [0, 255, 255],
group_colors =>
[
[[250, 221, 190], [250, 245, 239]],
[[182, 250, 182], [241, 250, 241]],
[[185, 219, 250], [244, 247, 250]],
[[137, 250, 250], [235, 250, 250]],
( run in 0.951 second using v1.01-cache-2.11-cpan-d8267643d1d )