view release on metacpan or search on metacpan
misc/t-bindings.pl
misc/t-browser-open.pl
misc/t-buffering.pl
misc/t-button-sens.pl
misc/t-cas.pl
misc/t-cbt.pl
misc/t-cell-button.pl
misc/t-cellview-dnd.pl
misc/t-childpid.pl
misc/t-coloralloc.pl
misc/t-combobox.pl
misc/t-commsec.pl
misc/t-database.pl
misc/t-delete.pl
misc/t-download.pl
misc/t-entry.pl
misc/t-flags.pl
misc/t-float.pl
misc/t-fq.pl
misc/t-get-prop.pl
misc/t-ghana.pl
misc/t-graph.pl
misc/t-gt.pl
misc/t-gt2.pl
misc/t-gtk-carp.pl
misc/t-gui.pl
misc/t-http.pl
misc/t-indic.pl
misc/t-indicator-combo.pl
misc/t-indicator-info.pl
misc/t-indicator-model.pl
misc/t-intraday-combobox.pl
misc/t-intraday-image.pl
misc/t-latest-handler.pl
misc/t-latest.pl
misc/t-line-drawer.pl
misc/t-linreg.pl
misc/t-list-of-lists.pl
misc/t-listseq.pl
misc/t-lj.pl
misc/t-lme.pl
misc/t-locale.c
misc/t-scope.pl
misc/t-series-treeview.pl
misc/t-series.pl
misc/t-singleton.pl
misc/t-sma.pl
misc/t-smarker.pl
misc/t-span-fast.pl
misc/t-span.pl
misc/t-submenu-sensitive.pl
misc/t-subprocess.pl
misc/t-symlist-combobox.pl
misc/t-symlist-database.pl
misc/t-symlist-glob.pl
misc/t-symlist-join.pl
misc/t-symlist-list.pl
misc/t-symlist-menu.pl
misc/t-symlist-model.pl
misc/t-symlist-tree.pl
misc/t-symlist.pl
misc/t-textbuffer.pl
misc/t-tge.pl
SHA256 ed98f02d4994fa9375512377e8d4d6530f055958cb4cd3a1ab5968f933be1a9c misc/t-bindings.pl
SHA256 055358a32800e1768f9761314e1586016231d02844a3cc38fd9d7c42eb5af3c6 misc/t-browser-open.pl
SHA256 e86c8baf5992ad27ba9d92662a08a5512ad44c14bf0db8f215da8ad7875c130e misc/t-buffering.pl
SHA256 61c743767b26904be3bf2fdb30fdb363217f7e2fd09104f333d038ed87326761 misc/t-button-sens.pl
SHA256 a70b938c727557d37c40b88a35cd5348c882e0fa526cfa803cdad68f3cf23672 misc/t-cas.pl
SHA256 fca829d42dae6756bd016f31cbfe343d03a573f79d64a36c9cb5e573fdbd6a10 misc/t-cbt.pl
SHA256 78cc9028a55d0f066a53bbe300545a0616546a586df0c037a8ff04d3029b9bda misc/t-cell-button.pl
SHA256 cffd77bb1a9c36dfff74c66f8d984217ebd6f6a14d4a231de8838bb844e6601e misc/t-cellview-dnd.pl
SHA256 927600ac200f7a063b623dda9beb12dda011123948d247e781666c33a1a28396 misc/t-childpid.pl
SHA256 7661c41ff52e10791aa3ab23f2e5d0a09bc540fd457b979c2e6840811f5adaf7 misc/t-coloralloc.pl
SHA256 6e97fb2552724a9688b88ded2f2293e44840114ad536a99b79b5ee046ce9ff19 misc/t-combobox.pl
SHA256 537bbf42f50c8bbb1ea006f2f0db18be873154bcd94381abdb21e6b849118684 misc/t-commsec.pl
SHA256 c25926f14ab52fbb169cff8ba3cd895123c2a2c60a174a1886e94192b79671df misc/t-database.pl
SHA256 50797d74cbe1734ad82444ce0675d014af267a9a5bde274d89d287928fccb310 misc/t-delete.pl
SHA256 45e761fd2d264785ca3caafd74d8da0f1098c5acdaf6b578ffcd2408fec41818 misc/t-download.pl
SHA256 0872225e01d51a3fcea2cc7110a8d4a2c869ddf266aa96deee7f344338d850d9 misc/t-entry.pl
SHA256 2dfc43bfc5315c482265ea5c688ea0a8cf8cbd6c064ed5a0c5c9dfee6aa8976e misc/t-flags.pl
SHA256 f4cf56f3e8b4d0daceb6ca11e9d401463fefd3e1ab4408d8118d9eb81283bf76 misc/t-float.pl
SHA256 9a92ac045feae805611b2b38bac2edeb1ee54d0530311d8ecac2bf34ea80955c misc/t-fq.pl
SHA256 1bf7f9e00a77d14d991cb8d1012e7e3e759ab906d3c17e5d1a8f5c44a8519b3a misc/t-get-prop.pl
SHA256 d668a0b54007943e780a95fc6e81a8298e238d1fbf37345f737dd09e4d39a4e0 misc/t-ghana.pl
SHA256 af03f43db911ad2d644881b56ce5cabc49485dbf9386e2c81f075c08fccb2fa4 misc/t-graph.pl
SHA256 24cc5a85ccc86b55a577bfcb38103d09f4bf4db6ae907ac7f114548f1339677d misc/t-gt.pl
SHA256 42c95f41f89345a09bb81591c8c3fc08abd9eeb4e20849ccf750c976d110cac1 misc/t-gt2.pl
SHA256 743463734f35aaeffd0d3a87536aca3a88b1741a161a1478626df1201198dc9d misc/t-gtk-carp.pl
SHA256 4cb40611ca762c39413e065b0c3de725734ef219d157c3e5d8c03a6b494240f5 misc/t-gui.pl
SHA256 b61c337c89d975c3e27d54fcdf57dba975431fad6d9ca93eb42cda309e6a4a6c misc/t-http.pl
SHA256 eed361d02434e4cb3450e8ec1d985d12ac8aafcb70eca56aa27eb00c338d86be misc/t-indic.pl
SHA256 058ab34972a0274f0b3a8e60f21ad7fd8f131dbff8de98f2352559b75775f909 misc/t-indicator-combo.pl
SHA256 481cbd4521d1b98357210cec6611d2deb811e03c779a4c6680501cdb6e728a51 misc/t-indicator-info.pl
SHA256 10ee64fd2a34b9b7d445c49be206665f354cf29b09dfb836396a56ce2b8124b8 misc/t-indicator-model.pl
SHA256 e7adcca66ad74137a3c8b033a2d08bb62b1d7ddc58711bc22610cd564dd695ed misc/t-intraday-combobox.pl
SHA256 d5bdef29cb5de758a503e126cc1273b70b1bf96c4df609de4a0633c2545b4c1c misc/t-intraday-image.pl
SHA256 18ba07f00d8081c1ed96b05fac61c841e60f4b232606057c71165f174a2116e0 misc/t-latest-handler.pl
SHA256 91b22a5be9102539bd0297ecf46fa41a97908a9992a1bd76665fd438d725b269 misc/t-latest.pl
SHA256 e28e5d249d21957b3e5e6b990a0dccfacf81e8cfe73939a686f0a3bbbd8949e3 misc/t-line-drawer.pl
SHA256 cd290ca2c64132671800af8f05b20bde17f6a02422d7c421496f70ae3a0a121a misc/t-linreg.pl
SHA256 d5faf10b122ce67057d1088f095379e3403dd71d1c79b6b79e21e7996f303346 misc/t-list-of-lists.pl
SHA256 fc99da2d632e7610cbf75a0738a43472f23463809a62784a1b8e23c4fd7f6885 misc/t-listseq.pl
SHA256 2e5334d931f09e442d84ab048198cacb910ffada30e3ac49f49b2cb6e64628d4 misc/t-lj.pl
SHA256 b54bef77586949b31f288f84a3034654ad4aa53c0a23ea525cdddffaa1ca0acb misc/t-lme.pl
SHA256 a04f492462eafef989618c4cacc22491fa998a2ad0d8576142cab938551081ca misc/t-locale.c
SHA256 e1c252ca650ce33142b6da98f72a120082b0200b9b13e09384055db1fe9ed45b misc/t-scope.pl
SHA256 0b8d209e4ac71ff4ac472bf39d5c7a2f787d8eceef6700bdc0f48af49ff60898 misc/t-series-treeview.pl
SHA256 463bb96cdecead75a4ae0df7c7531497ce587d925da3cf2df2f9911b65332540 misc/t-series.pl
SHA256 fa678503fae096a1d35a53ee93d0784194b5c21926410f91b6299385663b9d55 misc/t-singleton.pl
SHA256 dcb513402b1eea3e48bdd882b7c86d873a77d145271f6dc9b8d8041da37aa1f2 misc/t-sma.pl
SHA256 be0b38b52c069c2febb03a3c74794d77bfa2ecaeb2a1ba8163c8e561fb611074 misc/t-smarker.pl
SHA256 06e4b4adc5b106bc98b5c46ebc746e73e0c95ecc3c9c0e55ba5d286b2d90e0cf misc/t-span-fast.pl
SHA256 f0b1825ee00dc17f6078528a7fb2e4616b2193db53399f70e1bcf370c10b6457 misc/t-span.pl
SHA256 6ee02845393f9f640d654eeda1c013af4363a64fb56f41aa07b7c7074177acbf misc/t-submenu-sensitive.pl
SHA256 bd7959086c59175d58b2c77fc15ce8160a01f3a64f4223c0bb5e9d63f2de50c2 misc/t-subprocess.pl
SHA256 d8687b9c0115108576a27d997d1835ecbec7b12a1d67fee334dfcd6f47ff91b6 misc/t-symlist-combobox.pl
SHA256 9c0c5f9477fc74feb24762cdf689d78a9dea12afbf81152ff61af5043a21ecc8 misc/t-symlist-database.pl
SHA256 ee7879b48b63b4b8c857c1a16916ab28303ed1c2e51bfd2f2189c16aed50c468 misc/t-symlist-glob.pl
SHA256 b1682b0072b76231f2aeb3ee43f1016254779810ab04ee9167622ac8d42bb442 misc/t-symlist-join.pl
SHA256 784c638ad83af9933292e4fddcfc328667e97fa2e107197ec506884ee2adc728 misc/t-symlist-list.pl
SHA256 dde37fbb4334fffdb0e54b48b71484c324f453ecf3341a6380a2ee84619dce5e misc/t-symlist-menu.pl
SHA256 c429117bfc542298d5ac3fd72f96d422eee234d00eccfb3988cf62079bdb214b misc/t-symlist-model.pl
SHA256 7b5fe4d726a897b67ec9c349557e1beb4423d09701a6672b84e90432bb9b4b4d misc/t-symlist-tree.pl
SHA256 8cbd395d5847716e606dd6becacb5831e5c3bf8257b5309c8fdde6013840beb2 misc/t-symlist.pl
SHA256 9c3740a52f3cdab7326e6ee5dc3ea6e74fda6197573877caa599ddba3816fb0e misc/t-textbuffer.pl
SHA256 79907d407d2c82a5ad137a9995a552863272d1e8d11f948dcafb3f366c88a535 misc/t-tge.pl
lib/App/Chart/Gtk2/DownloadDialog.pm view on Meta::CPAN
my $hbox = Gtk2::HBox->new (0, 0);
$hbox->pack_start (Gtk2::Label->new (__('What:')), 0,0,0);
$vbox->pack_start ($hbox, 0,0,0);
my $what_model = $self->{'what_model'}
= Gtk2::ListStore->new ('Glib::String', 'Glib::Scalar');
$what_model->set ($what_model->append, 0, __('One symbol'), 1, undef);
$what_model->set ($what_model->append, 0, __('Favourites'), 1, 'favourites');
$what_model->set ($what_model->append, 0, __('All'), 1, 'all');
my $what_combobox = $self->{'what_combobox'}
= Gtk2::ComboBox->new_with_model ($what_model);
my $what_renderer = Gtk2::CellRendererText->new;
$what_combobox->pack_start ($what_renderer, 1);
$what_combobox->set_attributes ($what_renderer, text => 0);
$hbox->pack_start ($what_combobox, 0,0,0);
my $entry = $self->{'entry'} = Gtk2::Entry->new;
$hbox->pack_start ($entry, 1,1, 0.5 * Gtk2::Ex::Units::em($entry));
$what_combobox->signal_connect ('changed', \&_do_what_changed, $self);
$what_combobox->set_active (1);
$hbox->pack_start (Gtk2::Label->new (' ' . __('When:')), 0,0,0);
my $when_model = $self->{'when_model'}
= Gtk2::ListStore->new ('Glib::String', 'Glib::Scalar');
$when_model->insert_with_values (WHEN_UPDATE, 0 => __('Update'));
$when_model->insert_with_values (WHEN_BACKTO, 0 => __('Backto'));
my $when_combobox = $self->{'when_combobox'}
= Gtk2::ComboBox->new_with_model ($when_model);
my $when_renderer = Gtk2::CellRendererText->new;
$when_combobox->pack_start ($when_renderer, 1);
$when_combobox->set_attributes ($when_renderer, text => 0);
$hbox->pack_start ($when_combobox, 0,0,0);
$when_combobox->set_active (WHEN_UPDATE);
$when_combobox->signal_connect ('changed', \&_do_when_changed, $self);
require Date::Calc;
my ($today_year, undef, undef) = Date::Calc::Today();
my $when_adj = Gtk2::Adjustment->new ($today_year-5, # initial
1800, $today_year+1, # min,max
1,10,
0); # page_size
my $when_spin = $self->{'when_spin'}
= Gtk2::SpinButton->new ($when_adj, 10, 0);
$hbox->pack_start ($when_spin, 0,0,0);
lib/App/Chart/Gtk2/DownloadDialog.pm view on Meta::CPAN
my $entry = $self->{'entry'};
return App::Chart::collapse_whitespace ($entry->get_text());
}
sub _do_textbuf_changed {
my ($textbuf, $self) = @_;
_update_clear_sensitive ($self);
}
sub _do_what_changed {
my ($combobox, $self) = @_;
my $idx = $self->{'what_combobox'}->get_active;
$self->{'entry'}->set_sensitive ($idx == 0);
}
sub _do_when_changed {
my ($combobox, $self) = @_;
my $idx = $self->{'when_combobox'}->get_active;
$self->{'when_spin'}->set_sensitive ($idx == WHEN_BACKTO);
}
# 'message' emission hook on App::Chart::Gtk2::Job
sub _do_job_message {
my ($invocation_hint, $parameters, $ref_weak_self) = @_;
my $self = $$ref_weak_self || return 0; # disconnect
my ($job, $str) = @$parameters;
$self->message ($str);
return 1; # stay connected
lib/App/Chart/Gtk2/DownloadDialog.pm view on Meta::CPAN
my $treeview = $self->{'jobs_treeview'};
my $selection = $treeview->get_selection;
$selection->select_path (Gtk2::TreePath->new_from_indices(0));
}
return $job;
}
sub _do_start_button {
my ($self) = @_;
my $what = $self->{'what_combobox'}->get_active;
my $type;
if ($what == 0) {
$what = $self->{'entry'}->get_text;
$what =~ s/$RE{ws}{crop}//g; # leading and trailing whitespace
if ($what eq '') {
my $textbuf = $self->{'textbuf'};
$textbuf->insert ($textbuf->get_end_iter, "No symbol entered.\n");
$self->{'entry'}->grab_focus;
return;
}
$type = $what;
} elsif ($what == 1) {
$type = __('Favourites');
$what = '--favourites';
} else {
$type = __('All');
$what = '--all';
}
my $when_index = $self->{'when_combobox'}->get_active;
my $when = ($when_index == WHEN_BACKTO
? $self->{'when_spin'}->get_value
: undef);
$self->start ($what, $when);
}
# 'response' signal handler
sub _do_response {
my ($self, $response) = @_;
lib/App/Chart/Gtk2/IntradayDialog.pm view on Meta::CPAN
RESPONSE_CROSS => 1,
RESPONSE_SAVE => 2,
RESPONSE_PRINT => 3 };
sub INIT_INSTANCE {
my ($self) = @_;
$self->{'symbol'} = ''; # defaults
$self->{'mode'} = '';
my $combobox = $self->{'combobox'}
= App::Chart::Gtk2::IntradayModeComboBox->new;
$combobox->show;
$self->add_accel_group ($combobox->accelgroup);
$self->action_area->add ($combobox);
Glib::Ex::ConnectProperties->new ([$self,'symbol'],
[$combobox,'symbol']);
Glib::Ex::ConnectProperties->new ([$combobox,'mode'],
[$self,'mode']);
my $crossbutton = $self->{'crossbutton'}
= Gtk2::CheckButton->new (__('Cr_oss'));
$crossbutton->set_active (0);
$self->add_action_widget ($crossbutton, RESPONSE_CROSS);
$self->set_title (__('Chart: Intraday'));
$self->{'refresh_button'}
= $self->add_button ('gtk-refresh' => RESPONSE_REFRESH);
lib/App/Chart/Gtk2/IntradayModeComboBox.pm view on Meta::CPAN
sub _do_accelgroup {
my ($ref_weak_self, $mode) = @_;
my $self = $$ref_weak_self || return;
$self->set (mode => $mode);
}
1;
__END__
=for stopwords combobox intraday ComboBox programmatically
=head1 NAME
App::Chart::Gtk2::IntradayModeComboBox -- combobox intraday mode selector
=head1 SYNOPSIS
use App::Chart::Gtk2::IntradayModeComboBox;
my $combobox = App::Chart::IntradayModeCombo->new;
=head1 WIDGET HIERARCHY
C<App::Chart::Gtk2::IntradayModeComboBox> is a subclass of C<Gtk2::ComboBox>,
Gtk2::Widget
Gtk2::Container
Gtk2::Bin
Gtk2::ComboBox
App::Chart::Gtk2::IntradayModeComboBox
lib/App/Chart/Gtk2/SymlistComboBox.pm view on Meta::CPAN
if (($new_symlist//0) != ($self->{'symlist'}//0)) {
$self->{'symlist'} = $new_symlist;
$self->notify('symlist');
}
return shift->signal_chain_from_overridden(@_);
}
1;
__END__
=for stopwords combobox symlist symlists ComboBox programmatically
=head1 NAME
App::Chart::Gtk2::SymlistComboBox -- combobox symlist selector
=head1 SYNOPSIS
use App::Chart::Gtk2::SymlistComboBox;
my $combobox = App::Chart::Gtk2::SymlistComboBox->new;
=head1 WIDGET HIERARCHY
C<App::Chart::Gtk2::SymlistComboBox> is a subclass of C<Gtk2::ComboBox>,
Gtk2::Widget
Gtk2::Container
Gtk2::Bin
Gtk2::ComboBox
App::Chart::Gtk2::SymlistComboBox
lib/App/Chart/Gtk2/WatchlistDialog.pm view on Meta::CPAN
my $em = Gtk2::Ex::Units::em($self);
my $symlist = $self->{'symlist'}
= App::Chart::Gtk2::Symlist->new_from_key (DEFAULT_SYMLIST_KEY);
my $notebook = $self->{'notebook'} = Gtk2::Notebook->new;
$notebook->set (tab_hborder => 0.5 * $em);
$vbox->pack_start ($notebook, 1,1,0);
# require App::Chart::Gtk2::SymlistComboBox;
# my $combobox = App::Chart::Gtk2::SymlistComboBox->new;
# Glib::Ex::ConnectProperties->new ([$self, 'symlist'],
# [$combobox,'symlist']);
# $combobox->signal_connect (changed => \&_do_combobox_changed);
# $action_area->add ($combobox);
$self->add_buttons ('gtk-refresh' => RESPONSE_REFRESH,
'gtk-delete' => RESPONSE_DELETE);
{
my $intraday_button = $self->{'intraday_button'}
= Gtk2::Button->new_with_mnemonic (__('_Intraday'));
$self->add_action_widget ($intraday_button, RESPONSE_INTRADAY);
}
{
my $edit_button = $self->{'edit_button'}
lib/App/Chart/Gtk2/WatchlistDialog.pm view on Meta::CPAN
# with a sensible rows size for the TreeView
Gtk2::Ex::Units::set_default_size_with_subsizes
($self, [$scrolled, -1, '20 lines']);
$self->{'symlist'} = undef; # fake to force update
$self->set_symlist ($symlist);
}
# # 'notify:symlist' on the App::Chart::Gtk2::SymlistComboBox
# # switch page to the symbol list display when a symlist is selected
# sub _do_combobox_changed {
# my ($combobox) = @_;
# if (DEBUG) {
# print "Watchlist symlist combobox changed, switch notebook to symbols\n";
# }
# my $self = $combobox->get_toplevel;
# my $notebook = $self->{'notebook'};
# $notebook->set_current_page(NOTEBOOK_PAGENUM_SYMBOLS);
# }
# 'edited' signal on the Gtk2::CellRendererText in the symbol column,
# initiate a download of the new symbol
sub _do_symbol_renderer_edited {
my ($renderer, $pathstr, $newstr) = @_;
require App::Chart::Gtk2::Job::Latest;
App::Chart::Gtk2::Job::Latest->start ([$newstr]);
misc/t-combobox.pl view on Meta::CPAN
use strict;
use warnings;
use Gtk2 '-init';
use App::Chart::Gtk2::SymlistListModel;
my $toplevel = Gtk2::Window->new('toplevel');
$toplevel->signal_connect (destroy => sub { Gtk2->main_quit });
my $symlist_model = App::Chart::Gtk2::SymlistListModel->instance;
my $combobox = Gtk2::ComboBox->new_with_model ($symlist_model);
my $renderer = Gtk2::CellRendererText->new;
print "xpad=",$renderer->get('xpad'),"\n";
print "ypad=",$renderer->get('ypad'),"\n";
$renderer->set(ypad=>0);
$combobox->pack_start ($renderer, 1);
$combobox->set_attributes ($renderer,
text => $symlist_model->COL_NAME);
$toplevel->add($combobox);
$toplevel->show_all;
Gtk2->main;
misc/t-indicator-combo.pl view on Meta::CPAN
use FindBin;
my $progname = $FindBin::Script;
my $toplevel = Gtk2::Window->new('toplevel');
$toplevel->signal_connect (destroy => sub { Gtk2->main_quit });
my $vbox = Gtk2::VBox->new;
$toplevel->add($vbox);
{
my $combobox = App::Chart::Gtk2::IndicatorComboBox->new (type => 'average');
$vbox->pack_start ($combobox, 0,0,0);
$combobox->signal_connect
(notify => sub {
my ($combobox, $pspec) = @_;
my $pname = $pspec->get_name;
my $value = $combobox->get($pname);
say "$progname: combo $pname changed to ",($value//'undef');
});
# $combobox->set_key ('TA_HT_DCPERIOD');
}
{
my $combobox = App::Chart::Gtk2::IndicatorComboBox->new (type => 'indicator');
$vbox->pack_start ($combobox, 0,0,0);
$combobox->signal_connect
(notify => sub {
my ($combobox, $pspec) = @_;
my $pname = $pspec->get_name;
my $value = $combobox->get($pname);
say "$progname: combo $pname changed to ",($value//'undef');
});
}
$toplevel->show_all;
Gtk2->main;
misc/t-intraday-combobox.pl view on Meta::CPAN
use Gtk2 '-init';
use App::Chart::Gtk2::IntradayModeComboBox;
my $toplevel = Gtk2::Window->new ('toplevel');
$toplevel->signal_connect (destroy => sub { Gtk2->main_quit });
my $vbox = Gtk2::VBox->new;
$toplevel->add ($vbox);
# {
# my $combobox = App::Chart::Gtk2::IntradayModeComboBox->new (symbol => 'FOO.BAR');
# $vbox->pack_start ($combobox, 0,0,0);
# $combobox->signal_connect
# (notify => sub {
# my ($combobox, $pspec) = @_;
# my $pname = $pspec->get_name;
# print "$0: notify $pname ",$combobox->get($pname),"\n";
# });
# }
my $combobox = App::Chart::Gtk2::IntradayModeComboBox->new (symbol => 'BHP.AX');
$vbox->pack_start ($combobox, 0,0,0);
$combobox->signal_connect
(notify => sub {
my ($combobox, $pspec) = @_;
my $pname = $pspec->get_name;
print "$0: notify $pname ",$combobox->get($pname),"\n";
});
my $accelgroup = $combobox->accelgroup;
$toplevel->add_accel_group ($accelgroup);
{
my $button = Gtk2::Button->new_with_label ('Mode 1d');
$button->signal_connect
(clicked => sub { $combobox->set (mode => '1d'); });
$vbox->pack_start ($button, 0,0,0);
}
{
my $button = Gtk2::Button->new_with_label ('Mode ZZ');
$button->signal_connect
(clicked => sub { $combobox->set (mode => 'ZZ'); });
$vbox->pack_start ($button, 0,0,0);
}
{
my $symbol = 'FOO.MGEX';
my $button = Gtk2::Button->new_with_label ("Symbol $symbol");
$button->signal_connect
(clicked => sub { $combobox->set (symbol => $symbol); });
$vbox->pack_start ($button, 0,0,0);
}
{
my $button = Gtk2::Button->new_with_label ("Accel 1");
$button->signal_connect
(clicked => sub {
my $ret = Gtk2::AccelGroups->activate
($toplevel, Gtk2::Gdk->keyval_from_name('1'), ['mod1-mask']);
print "activate $ret\n"; });
$vbox->pack_start ($button, 0,0,0);
misc/t-symlist-combobox.pl view on Meta::CPAN
# with Chart. If not, see <http://www.gnu.org/licenses/>.
use strict;
use warnings;
use Gtk2 '-init';
use App::Chart::Gtk2::SymlistComboBox;
my $toplevel = Gtk2::Window->new ('toplevel');
$toplevel->signal_connect (destroy => sub { Gtk2->main_quit });
my $combobox = App::Chart::Gtk2::SymlistComboBox->new;
$toplevel->add ($combobox);
$combobox->signal_connect ('notify::symlist' => sub {
print "notify ",
$combobox->get('symlist'), " ",
$combobox->get('active'), "\n";
});
$toplevel->show_all;
Gtk2->main;
exit 0;