App-Guiio

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN

	$all_modules{$_} = $_ ;
	push @split_modules, $_ ;
	}


my @setup_lib=
qw(
setup/setup.ini

setup/actions/align.pl
setup/actions/clipboard.pl
setup/actions/debug.pl
setup/actions/elements_manipulation.pl
setup/actions/file.pl
setup/actions/mouse.pl
setup/actions/new_elements.pl
setup/actions/colors.pl
setup/actions/unsorted.pl
setup/actions/presentation.pl

setup/actions/context_menu_multi_wirl.pl

Changes  view on Meta::CPAN

Date:   Sat Aug 23 13:18:18 2008 +0200

    ADDED: simple slide API

commit b1b19e62716d9ca2bfcf72bdc798b95eb7fda366
Author: nadim khemir <nadim@naquadim.(none)>
Date:   Thu Aug 21 21:35:17 2008 +0200

    CHANGED: split stencils in different files
    CHANGED: thin_box is now box
    ADDED: import from clipboard to box
    CHANGED: documentation update

commit d8fa2393b90aea894735e195c2ac36b76f302458
Author: nadim khemir <nadim@naquadim.(none)>
Date:   Thu Aug 21 18:50:15 2008 +0200

    ADDED: box auto shrink and context menue entry

commit 5545955ef31af33ffc11f27bd03b06dad302e930
Author: nadim khemir <nadim@naquadim.(none)>

Changes  view on Meta::CPAN

commit 3ff5e3d048d96abccf66fc772f5de7ecdb007743
Author: nadim khemir <nadim@naquadim.(none)>
Date:   Thu May 1 16:45:04 2008 +0200

    ADDED: arrow can be connected anywhere but modifying box removes connection

commit ec1b202992af51e491fe66a13c32efaa7c390f90
Author: nadim khemir <nadim@naquadim.(none)>
Date:   Thu May 1 16:24:12 2008 +0200

    ADDED: copy selected element to clipboard

commit 2a1c7cd90299a6474cad3bedfb06cc82c31c09c5
Author: nadim khemir <nadim@naquadim.(none)>
Date:   Thu May 1 16:15:02 2008 +0200

    FIXED: ALLOW_DIAGONALS field missing

commit db6e60c8b44aa6ab7046809f897004f3f779a1d0
Author: nadim khemir <nadim@naquadim.(none)>
Date:   Sun Apr 27 16:48:38 2008 +0200

MANIFEST  view on Meta::CPAN

README
META.yml
README
Todo.txt

script/guiio

setup/setup.ini

setup/actions/align.pl
setup/actions/clipboard.pl
setup/actions/debug.pl
setup/actions/elements_manipulation.pl
setup/actions/file.pl
setup/actions/mouse.pl
setup/actions/new_elements.pl
setup/actions/unsorted.pl
setup/actions/context_menu_multi_wirl.pl
setup/actions/context_menu_box.pl
setup/actions/context_menu_rulers.pl
setup/actions/colors.pl

Todo.txt  view on Meta::CPAN

#handle error when running external command
	Can't exec "dsq": No such file or directory at '/devel/perl_modules/App/Guiio/blib/lib/App/Guiio/setup//actions/unsorted.pl' line 365.
	Use of uninitialized value in split at /devel/perl_modules/App/Guiio/blib/lib/App/Guiio/stripes/editable_box2.pm line 50.

#paste at the mouse position
	
#per arrow autoconnect

#dynamically add connectors

#copy selected elements to clipboard
	
#move ruler line definition to the setup
	allow removal of rulers
	allow specific location of rulers

#dynamically generate GROUP_COLORS

#figlet support
	Done via external command 
	Emanuel Haupt <ehaupt@freebsd.org>

Todo.txt  view on Meta::CPAN


#make a script library

!update_diagram should be called when running in script mode
	let the script writer decide if they want "optimized" connections or not

# proper setup structure

#editable arrow has connections!! use resize/info/highlight points instead

# export ASCII to clipboard

#quick connect
	if selected elements
		connect element under to selected elements
		deselect all
	else
		select element
		
#forward mouse to ACTIONS

Todo.txt  view on Meta::CPAN


#multiline arrow

!reapeat box
	given a text, it will repeat it depednding on the size
		!full multiples or not

#process box

#segfault
#can't use Data::TreeDumper in copy to clipboard

# 'new connection' is flashed for a connector that is already connected

#tab to select first element generate 'uninitialzed value at 134'

#undo
	#do not save undo buffer
	
#copy doesn't keep connections

lib/App/Guiio.pm  view on Meta::CPAN

=item * select all

=item * delete

=item * undo

=item * group/ungroup

=item * open / save

=item * local clipboard operations

=back

A window displaying the currently available commands is displayed if you press B<K>.

=head2 elements

There but a few elements implemented at the moment.

=head3 wirl arrow

lib/App/Guiio.pm  view on Meta::CPAN


=head3 your own element type

For simple elemnts, put your design in a box. that should cover 90% of anyone's needs. You can look in 
I<lib/stripes> for element implementation examples.

=head2 exporting to ASCII

You can export to a file in ASCII format but using the B<.txt> extension.

Exporting to the clipboard is done with B<ctl + e>.

=head1 EXAMPLES

	
           User code ^            ^ OS code
                      \          /
                       \        /
                        \      /
           User code <----Mode----->OS code
                        /      \

lib/App/Guiio.pm  view on Meta::CPAN

	{
	my $modifiers = get_key_modifiers($event) ;
	
	my ($x, $y) = $self->closest_character($event->coords()) ;
	my ($first_element) = first_value {$self->is_over_element($_, $x, $y)} reverse @{$self->{ELEMENTS}} ;
	
	if ($modifiers eq 'C00')
		{
		if(defined $first_element)
			{
			$self->run_actions_by_name('Copy to clipboard', ['Insert from clipboard', 0, 0])  ;
			}
		}
	else
		{
		if(defined $first_element)
			{
			 if ($modifiers eq '00S')
				{
				$self->select_elements_flip($first_element) ;
				}

lib/App/Guiio/Menues.pm  view on Meta::CPAN

                                accelerator     => '<ctrl>Q',
                                extra_data      => 'gtk-quit',
                        },
                ],
        },
        _Edit => {
                item_type => '<Branch>',
                children => [
                        _Copy => {
                                item_type       => '<StockItem>',
                                callback_action => sub {$self->run_actions_by_name('Copy to clipboard');},
                                accelerator     => '<ctrl>C',
                                extra_data      => 'gtk-copy',
                        },
                        _Paste => {
                                item_type       => '<StockItem>',
                                callback_action => sub {$self->run_actions_by_name('Insert from clipboard');},
                                accelerator     => '<ctrl>V',
                                extra_data      => 'gtk-paste',
                        },
                ],
        },
        _Help => {
                item_type => '<LastBranch>',
                children => [
                        _Help => {
                                item_type       => '<StockItem>',

setup/actions/clipboard.pl  view on Meta::CPAN


use List::Util qw(min max) ;

#----------------------------------------------------------------------------------------------

register_action_handlers
	(
	'Copy to clipboard' => 
		[
		['C00-c', 'C00-Insert']
		, \&export_to_clipboard_as_ascii
		],
		
	'Insert from clipboard' => 
		[
		['C00-v', '00S-Insert']
		, \&insert_from_clipboard
		],
		
	#'Export to clipboard & primary as ascii'=> ['C00-e', \&export_to_clipboard_as_ascii] ,
	#'Import from clipboard to box'=> ['C0S-E', \&import_from_clipboard_to_box] ,
	#'Import from primary to box'=> ['0A0-e', \&import_from_primary_to_box] ,
	) ;

#----------------------------------------------------------------------------------------------

sub export_to_clipboard_as_ascii
{
my ($self) = @_ ;

my $ascii = $self->transform_elements_to_ascii_buffer($self->get_selected_elements(1)) ;

Gtk2::Clipboard->get (Gtk2::Gdk->SELECTION_CLIPBOARD)->set_text($ascii);

# also put in selection  --  DH
Gtk2::Clipboard->get (Gtk2::Gdk->SELECTION_PRIMARY)->set_text($ascii);
}

#----------------------------------------------------------------------------------------------

sub import_from_clipboard_to_box
{
my ($self) = @_ ;

my $ascii = Gtk2::Clipboard->get (Gtk2::Gdk->SELECTION_CLIPBOARD)->wait_for_text();

my $element = $self->add_new_element_named('stencils/guiio/box', $self->{MOUSE_X}, $self->{MOUSE_Y}) ;

$element->set_text('', $ascii) ;

$self->select_elements(1, $element) ;

setup/actions/clipboard.pl  view on Meta::CPAN

$element->set_text('', $ascii) ;

$self->select_elements(1, $element) ;

$self->update_display() ;

}

#----------------------------------------------------------------------------------------------

sub copy_to_clipboard
{
my ($self) = @_ ;

my @selected_elements = $self->get_selected_elements(1) ;
return unless @selected_elements ;

my %selected_elements = map { $_ => 1} @selected_elements ;

my @connections =
	grep 

setup/actions/clipboard.pl  view on Meta::CPAN

	};
	
# print Data::TreeDumper::DumpTree $elements_and_connections, '$elements_and_connections:', MAX_DEPTH => 2 ;
#~ print Data::Dumper::Dumper $elements_and_connections ;#, '$elements_and_connections:', MAX_DEPTH => 2 ;

$self->{CLIPBOARD} =  Clone::clone($elements_and_connections) ;
} ;	
	
#----------------------------------------------------------------------------------------------

sub insert_from_clipboard
{
my ($self) = @_ ;

$self->create_undo_snapshot() ;
my $ascii = Gtk2::Clipboard->get (Gtk2::Gdk->SELECTION_CLIPBOARD)->wait_for_text();
$self->transform_ascii_string_to_elements($ascii);
# $self->select_elements(0, @{$self->{ELEMENTS}}) ;
	
# unless(defined $x_offset)
	# {

setup/actions/clipboard.pl  view on Meta::CPAN

			
		# pop @{$element->{GROUP}} ;
		# push @{$element->{GROUP}}, $new_group{$group} ;
		# }
	# else
		# {
		# delete $element->{GROUP} ;
		# }
	# }

# my $clipboard = Clone::clone($self->{CLIPBOARD}) ;

# $self->add_elements(@{$clipboard->{ELEMENTS}}) ;
# $self->add_connections(@{$clipboard->{CONNECTIONS}}) ;

$self->update_display() ;
} ;	
	

setup/setup.ini  view on Meta::CPAN

	'stencils/guiio',
	'stencils/computer',
	'stencils/people',
	'stencils/divers',
	'stencils/guiio'
	],
	
ACTION_FILES =>
	[
	'actions/align.pl',
	'actions/clipboard.pl',
	'actions/debug.pl',
	'actions/new_elements.pl',
	'actions/elements_manipulation.pl',
	'actions/file.pl',
	'actions/mouse.pl',
	'actions/colors.pl',
	'actions/unsorted.pl',
	'actions/presentation.pl',
	
	'actions/context_menu_multi_wirl.pl',



( run in 1.335 second using v1.01-cache-2.11-cpan-2398b32b56e )