App-Asciio
view release on metacpan or search on metacpan
#handle \ in text for pango
#_ is removed from name in menues
spell cheker
#grouping
Window size in character multiples
Drag drop objects from views or other aflow instance
Select font
Colored font
Background color
#Stencils are normal files
#Grouping, alignment, send back/front
#Grid display
#Horizontal and vertical alignement lines
!Objects are hilighted when overed (incuding groups)
#Select and move object with a single click
#Multiple object selection
Save in multiple format, try to keep extra attributes like color
text, raw text, html
lib/App/Asciio.pm view on Meta::CPAN
sub event_options_changed
{
my ($self) = @_;
my $number_of_group_colors = scalar(@{$self->{COLORS}{group_colors}}) ;
$self->{GROUP_COLORS} = [0 .. $number_of_group_colors - 1] ,
$self->{CURRENT_ACTIONS} = $self->{ACTIONS} ;
$self->set_font($self->{FONT_FAMILY}, $self->{FONT_SIZE});
}
#-----------------------------------------------------------------------------
sub set_title
{
my ($self, $title) = @_;
if(defined $title)
{
lib/App/Asciio.pm view on Meta::CPAN
}
sub get_title
{
my ($self) = @_;
$self->{TITLE} ;
}
#-----------------------------------------------------------------------------
sub set_font
{
my ($self, $font_family, $font_size) = @_;
$self->{FONT_FAMILY} = $font_family || 'Monospace';
$self->{FONT_SIZE} = $font_size || 10 ;
}
sub get_font
{
my ($self) = @_;
return($self->{FONT_FAMILY}, $self->{FONT_SIZE}) ;
}
#-----------------------------------------------------------------------------
sub update_display
{
lib/App/Asciio/GTK/Asciio.pm view on Meta::CPAN
$self->SUPER::set_title($title) ;
if(defined $title)
{
$self->{widget}->get_toplevel()->set_title($title . ' - asciio') ;
}
}
#-----------------------------------------------------------------------------
sub set_font
{
my ($self, $font_family, $font_size) = @_;
$self->SUPER::set_font($font_family, $font_size) ;
$self->{widget}->modify_font
(
Gtk2::Pango::FontDescription->from_string
(
$self->{FONT_FAMILY} . ' ' . $self->{FONT_SIZE}
)
);
}
#-----------------------------------------------------------------------------
lib/App/Asciio/GTK/Asciio/Dialogs.pm view on Meta::CPAN
{
my ($self, $data, $title, @dumper_setup) = @_ ;
my $treedumper = Data::TreeDumper::Renderer::GTK->new
(
data => $data,
title => $title,
dumper_setup => {@dumper_setup}
);
$treedumper->modify_font(Gtk2::Pango::FontDescription->from_string ('monospace'));
$treedumper->collapse_all;
# some boilerplate to get the widget onto the screen...
my $window = Gtk2::Window->new;
my $scroller = Gtk2::ScrolledWindow->new;
$scroller->add ($treedumper);
$window->add ($scroller);
$window->set_default_size(640, 1000) ;
lib/App/Asciio/GTK/Asciio/Dialogs.pm view on Meta::CPAN
$text ='' unless defined $text ;
my $window = new Gtk2::Window() ;
my $dialog = Gtk2::Dialog->new($title, $window, 'destroy-with-parent') ;
$dialog->set_default_size (300, 150);
$dialog->add_button ('gtk-ok' => 'ok');
my $textview = Gtk2::TextView->new;
$textview->modify_font (Gtk2::Pango::FontDescription->from_string ('monospace 10'));
my $buffer = $textview->get_buffer;
$buffer->insert ($buffer->get_end_iter, $text);
$dialog->vbox->add ($textview);
$textview->show;
#
# Set up the dialog such that Ctrl+Return will activate the "ok" response. Muppet
#
lib/App/Asciio/GTK/Asciio/stripes/editable_box2.pm view on Meta::CPAN
my $treeview = Gtk2::TreeView->new_with_model ($model);
$treeview->set_rules_hint (TRUE);
$treeview->get_selection->set_mode ('single');
add_columns($treeview, $rows);
$sw->add($treeview);
# title
my $titleview = Gtk2::TextView->new;
$titleview->modify_font (Gtk2::Pango::FontDescription->from_string ('monospace 10'));
my $title_buffer = $titleview->get_buffer ;
$title_buffer->insert ($title_buffer->get_end_iter, $title);
$vbox->add ($titleview);
$titleview->show;
# text
my $textview = Gtk2::TextView->new;
$textview->modify_font (Gtk2::Pango::FontDescription->from_string ('monospace 10'));
my $text_buffer = $textview->get_buffer;
$text_buffer->insert ($text_buffer->get_end_iter, $text);
$vbox->add ($textview) ;
$textview->show() ;
# Focus and select, code by Tian
$text_buffer->select_range($text_buffer->get_start_iter, $text_buffer->get_end_iter);
$textview->grab_focus() ;
setup/actions/unsorted.pl view on Meta::CPAN
EOM
}
#----------------------------------------------------------------------------------------------
sub zoom
{
my ($self, $direction) = @_ ;
my ($family, $size) = $self->get_font() ;
$self->set_font($family, $size + $direction) ;
}
#----------------------------------------------------------------------------------------------
sub flip_color_scheme
{
my ($self) = @_ ;
$self->{COLOR_SCHEME} = 'system' unless exists $self->{COLOR_SCHEME} ;
( run in 1.578 second using v1.01-cache-2.11-cpan-5735350b133 )