view release on metacpan or search on metacpan
devel/run-intraday.pl
devel/run-jobs-running-dialog.pl
devel/run-open-dialog.pl
devel/run-prefs-dialog.pl
devel/run-raw-dialog.pl
devel/run-symlist-radio.pl
devel/run-vacuum-dialog.pl
devel/run-watchlist.pl
devel/run-weblink-menu.pl
devel/scandeps-to-makefile.pl
devel/t-font.pl
devel/VacuumDialog.t
devel/warnings-unused.pl
devel/weblinks-samples.pl
doc/chart.omf
doc/chart.texi
doc/mung-html.pl
doc/version.texi
doc/weights.pl
emacs/chartprog-devel.el
emacs/chartprog-loaddefs.el
Makefile.PL view on Meta::CPAN
lib/App/Chart/Series/Derived/TEMA.pm \
lib/App/Chart/Series/Derived/WMA.pm \
lib/App/Chart/Series/Derived/ZLEMA.pm
doc/chart-ema-weights.txt doc/chart-ema-weights.png: $(WEIGHTS_SOURCES)
cd doc && $(PERL) -I ../lib weights.pl
doc/chart-ema-weights.eps: $(WEIGHTS_SOURCES)
cd doc && $(PERL) -I ../lib weights.pl --eps
# "epstopdf" is from tetex or texlive
# (debian package texlive-font-utils or previously texlive-extra-utils).
# "ps2pdf" is from ghostscript.
EPSTOPDF = epstopdf
PS2PDF = ps2pdf
doc/chart-ema-weights.pdf: doc/chart-ema-weights.eps
#
# NOTE: if you have $(PS2PDF) instead of $(EPSTOPDF) then messages like
# /bin/sh: $(EPSTOPDF): not found
# are normal and harmless
#
cd doc; for i in chart-*-weights.eps; do \
SHA256 a701d9bf34ceb3d10e50e52c735a30cebb2c4d4603da7cbe11e4b6f167d2c3ac devel/run-intraday.pl
SHA256 24899e0f055048bd8a2fb45530241f526f40d7fa2e8f438ebfc8f900cb17ac7f devel/run-jobs-running-dialog.pl
SHA256 69f6d78365b39c723851c4e6ae11dfc08716b22e6444ccc811d12907ad4af6f0 devel/run-open-dialog.pl
SHA256 e35ef28e85dc058fcb0e62174a6973f77407dbb414e758c10cab4c1356a0bde6 devel/run-prefs-dialog.pl
SHA256 d87ea25d5b20259b08ae6999babe713fa52b4edd5a9a8feab02c7ffacf4c98df devel/run-raw-dialog.pl
SHA256 9290c8e2c637d88d62fe53299119c092e4abdb6aee7391409a567bf64efe6b5b devel/run-symlist-radio.pl
SHA256 92e835ba79fec7320002fac85a8d1e23ee3fb5d736dc05bb65f7ab95feca7850 devel/run-vacuum-dialog.pl
SHA256 8d75ca16af0278979dca0add454c428e3c6b15f1a73d7a19afb8deb9d35443be devel/run-watchlist.pl
SHA256 3f506735ef788c81846f1aa8d675f439593de15dd40792ac5be493dd791a1053 devel/run-weblink-menu.pl
SHA256 1d1ecce3422cc27664c56cd25154f527eba4fe8e525d1ebfdbeeba11249f8b39 devel/scandeps-to-makefile.pl
SHA256 4e6ce15b51751058ab886c652ce26a1e9d43ee191d461326324824d4784a5c53 devel/t-font.pl
SHA256 8d8df3fb74414fcbd64e5ada2b035dcdfcd7ebc5b2e2cb50c08b1777b97f61b1 devel/warnings-unused.pl
SHA256 832bab8ba2de4162c241e56ec6408eb245bfa5d7c241b880baeaf179eb069127 devel/weblinks-samples.pl
SHA256 37511f6aaf431a8389299da2e32453d7b1c90b103f13d32c0b992adc856cb406 doc/chart.omf
SHA256 183334496ffca168b7ab960ef767e1aedf03d085da4138b1edc9abd907617afc doc/chart.texi
SHA256 abd9afabd983b62b97f1623648e995fa1a20dd6dda61dea634e234b62e8b07a6 doc/mung-html.pl
SHA256 70f1c1816f56ab013cbfcc41cbf6bee418f96133e2f87e83e6a30cdc30934291 doc/version.texi
SHA256 8b13cb591bb20ef9553f5c0f744d61165dcac521141a8c762319030cf09bb83b doc/weights.pl
SHA256 f714faa1ea84c97d13d5105c8b605b6f99cce2cedac4dd0780214ae6177cd71c emacs/chartprog-devel.el
SHA256 023521cfdf40f4f9f6eeef4ad3da1c59e186454b356b615144a44052e3b84f3b emacs/chartprog-loaddefs.el
SHA256 580cff2dc761bef092b45109681a340bd0592f2f2242a420cbeeff8b0f1150c3 emacs/chartprog.el
devel/run-diagnostics.pl view on Meta::CPAN
my $str = App::Chart::Gtk2::Diagnostics->str();
print "$progname: length ", length($str), "\n";
print $str;
Gtk2->disable_setlocale; # leave LC_NUMERIC alone for version nums
Gtk2->init;
my $dialog = App::Chart::Gtk2::Diagnostics->popup;
my $textview = $dialog->{'textview'};
print "$progname: textview font ",$textview->style->font_desc->to_string,"\n";
Gtk2->main;
exit 0;
# my $vadj = $self->{'vadj'};
# my $pos = $vadj->value;
# print "pos $pos\n";
# my $textbuf = $self->{'textbuf'};
devel/t-font.pl view on Meta::CPAN
# uncomment this to run the ### lines
use Smart::Comments;
my $toplevel = Gtk2::Window->new('toplevel');
$toplevel->signal_connect (destroy => sub { Gtk2->main_quit });
my $vbox = Gtk2::VBox->new (0, 0);
$toplevel->add ($vbox);
# ~/.gtkrc-2.0.mine
my $label = Gtk2::Label->new ('default font');
$vbox->pack_start ($label, 1,1,0);
{
my $font_name = "Times 50";
my $label = Gtk2::Label->new ($font_name);
my $font_desc = Pango::FontDescription->from_string($font_name);
$label->modify_font ($font_desc);
$vbox->pack_start ($label, 1,1,0);
}
$toplevel->show_all;
{
my $pc = $label->get_pango_context;
### $pc
my $fontdesc = $pc->get_font_description;
### $fontdesc
print "family \"",$fontdesc->get_family,"\"\n";
}
my $dialog = Gtk2::FontSelectionDialog->new ('font');
$dialog->show_all;
Gtk2->main;
exit 0;
doc/chart.texi view on Meta::CPAN
@end macro
@end iftex
@ifnottex
@macro ms {V,N}
\V\\N\
@end macro
@end ifnottex
@c @nicode{S} is plain S in info, or @code{S} elsewhere. This can be used
@c when the quotes that @code{} gives in info aren't wanted, but the
@c fontification in tex or html is wanted. @alias is used rather than @macro
@c because backslashes don't work properly in an @macro.
@ifinfo
@alias nicode=asis
@end ifinfo
@ifnotinfo
@alias nicode=code
@end ifnotinfo
@c @nisamp{S} is plain S in info, or @samp{S} elsewhere. This can be used
@c when the quotes that @samp{} gives in info aren't wanted, but the
@c fontification in tex or html is wanted. @alias is used rather than @macro
@c because backslashes don't work properly in an @macro.
@ifinfo
@alias nisamp=asis
@end ifinfo
@ifnotinfo
@alias nisamp=samp
@end ifnotinfo
@c @iquot{S} is italics in TeX, HTML, etc, or quotes in info. This is meant
@c for the names of books etc.
@ifinfo
@macro iquot {S}
``\S\''
@end macro
@end ifinfo
@ifnotinfo
@alias iquot=i
@end ifnotinfo
@c @CHARTniuref{S} is plain S in info, or @uref{S} elsewhere. This is when
@c the quotes that @uref{} gives in info aren't wanted, but the font in TeX
@c or the link in HTML are wanted. @alias is used rather than @macro because
@c backslashes don't work properly in an @macro.
@ifinfo
@alias CHARTniuref=asis
@end ifinfo
@ifnotinfo
@alias CHARTniuref=uref
@end ifnotinfo
@c @rightarrow{} made available in info too
lib/App/Chart/Gtk2/Diagnostics.pm view on Meta::CPAN
sub popup {
my ($class, $parent) = @_;
require App::Chart::Gtk2::Ex::ToplevelBits;
my $self = App::Chart::Gtk2::Ex::ToplevelBits::popup ($class,
screen => $parent);
$self->refresh;
return $self;
}
Gtk2::Rc->parse_string (<<'HERE');
style "Chart_fixed_width_font" {
font_name = "Courier 12"
}
widget_class "App__Chart__Gtk2__Diagnostics.*.GtkTextView" style:gtk "Chart_fixed_width_font"
HERE
use constant RESPONSE_REFRESH => 0;
sub INIT_INSTANCE {
my ($self) = @_;
my $vbox = $self->vbox;
$self->set_title (__('Chart: Diagnostics'));
$self->add_buttons ('gtk-close' => 'close',
lib/App/Chart/Gtk2/GUI.pm view on Meta::CPAN
# use App::Chart::Gtk2::GUI;
#
# =head1 FUNCTIONS
#
# =over 4
#
# =cut
#
# =item App::Chart::Gtk2::GUI::string_width ($widget_or_layout, $str)
#
# Return the width in pixels of C<$str> in the font of the given widget or
# layout (either a C<Gtk2::Widget> or a C<Gtk2::Pango::Layout> object).
#
# =cut
#
# =item C<< App::Chart::Gtk2::GUI::draw_text_centred ($widget, $region_or_event, $string) >>
#
# Draw C<string> centred in the window of C<widget>. If C<widget> isn't
# realized yet then do nothing. Pango C<word-char> wrapping is enabled, so
# the string is not truncated if it's wider than the window.
#
lib/App/Chart/Gtk2/HAxis.pm view on Meta::CPAN
+ POSIX::ceil ($line_height * MEDIUM_GAP_LINE_FRAC));
}
# 'style-set' class closure
sub _do_style_set {
my ($self, $prev_style) = @_;
# update as advised by gtk_widget_create_pango_layout()
$self->{'layout'}->context_changed;
_reset_scale ($self); # new font perhaps
$self->queue_resize;
$self->queue_draw;
return shift->signal_chain_from_overridden(@_);
}
# 'configure-event' class closure
sub _do_configure_event {
my ($self, $event) = @_;
$self->queue_draw;
return shift->signal_chain_from_overridden(@_);
lib/App/Chart/Gtk2/OpenDialog.pm view on Meta::CPAN
$treeview->expand_row($path, 0);
}
}
my $selection = $treeview->get_selection();
$selection->set_mode ('single');
my $renderer = Gtk2::CellRendererText->new;
$renderer->set (xalign => 0, # left justify
ypad => 0);
$renderer->set_fixed_height_from_font (1);
my $column = Gtk2::TreeViewColumn->new;
$column->pack_start ($renderer, 1);
$column->set_cell_data_func ($renderer, \&_cell_data_func);
$column->set (sizing => 'fixed');
$treeview->append_column ($column);
my $notfound = $self->{'notfound'}
= Gtk2::Label->new (__('Not in database, click "New" to download.
Be sure capitalization is right for download.
lib/App/Chart/Gtk2/RawDialog.pm view on Meta::CPAN
$vbox->pack_start ($scrolled, 1,1,0);
my $treeview = Gtk2::TreeView->new;
$scrolled->add ($treeview);
require App::Chart::DBI;
my $dbh = App::Chart::DBI->instance;
my $em = Gtk2::Ex::Units::em($self);
my $date_width = App::Chart::Gtk2::GUI::string_width ($treeview, '2099-99-99 ');
my $date_width_editable = $date_width * 1.4; # diff font, and pulldown
my $digit_width = Gtk2::Ex::Units::digit_width ($self);
my $datasheet = Gtk2::Ex::Datasheet::DBI->new
({ dbh => $dbh,
sql => { select => 'ex_date, record_date, pay_date, amount, imputation, type, qualifier, note',
from => 'dividend',
order_by => 'ex_date DESC',
where => 'symbol=?',
bind_values => [ '' ],
},
lib/App/Chart/Gtk2/RawDialog.pm view on Meta::CPAN
$vbox->pack_start ($scrolled, 1,1,0);
my $treeview = Gtk2::TreeView->new;
$scrolled->add ($treeview);
require App::Chart::DBI;
my $dbh = App::Chart::DBI->instance;
my $em = Gtk2::Ex::Units::em($self);
my $date_width = App::Chart::Gtk2::GUI::string_width ($treeview, '2099-99-99 ');
my $date_width_editable = $date_width * 1.4; # diff font, and pulldown
my $digit_width = Gtk2::Ex::Units::digit_width ($self);
my $datasheet = Gtk2::Ex::Datasheet::DBI->new
({ dbh => $dbh,
sql => { select => 'date, new, old, note',
from => 'split',
order_by => 'date DESC',
where => 'symbol=?',
bind_values => [ '' ],
},
lib/App/Chart/Gtk2/RawDialog.pm view on Meta::CPAN
my $self = $notebook->get_toplevel;
$scrolled->set (hscrollbar_policy => 'automatic');
my $treeview = Gtk2::TreeView->new;
$scrolled->add ($treeview);
require App::Chart::DBI;
my $dbh = App::Chart::DBI->instance;
my $date_width = App::Chart::Gtk2::GUI::string_width ($treeview, '2099-99-99 ');
my $date_width_editable = $date_width * 1.4; # diff font, and pulldown
my $em = Gtk2::Ex::Units::em($treeview);
my $digit_width = Gtk2::Ex::Units::digit_width ($self);
my $datasheet = Gtk2::Ex::Datasheet::DBI->new
({ dbh => $dbh,
sql => { select => 'id,date1,price1,date2,price2,horizontal',
from => 'line',
order_by => 'id ASC',
where => 'symbol=?',
bind_values => [ '' ],
lib/App/Chart/Gtk2/RawDialog.pm view on Meta::CPAN
$treeview->signal_connect (button_press_event => \&_do_weblink_button_press);
$scrolled->add ($treeview);
my $store = $scrolled->{'weblinks_store'}
= Gtk2::ListStore->new ('Glib::String', 'Glib::String', 'Glib::String');
$treeview->set_model ($store);
my $renderer = Gtk2::CellRendererText->new;
$renderer->set (xalign => 0,
ypad => 0);
$renderer->set_fixed_height_from_font (1);
my $em = Gtk2::Ex::Units::em($treeview);
{
my $column = Gtk2::TreeViewColumn->new_with_attributes
(__('Name'), $renderer, markup => 0);
$column->set (sizing => 'fixed',
fixed_width => 20*$em,
resizable => 1);
$treeview->append_column ($column);
}
lib/App/Chart/Gtk2/SeriesTreeView.pm view on Meta::CPAN
App::Chart::chart_dirbroadcast()->connect_for_object
('data-changed', \&_do_data_changed, $self);
$self->set (fixed_height_mode => 1);
my $em = Gtk2::Ex::Units::em($self);
{
my $renderer = Gtk2::CellRendererText->new;
$renderer->set (xalign => 0,
ypad => 0);
$renderer->set_fixed_height_from_font (1);
my $column = Gtk2::TreeViewColumn->new_with_attributes
(__('Date'), $renderer, text => App::Chart::Gtk2::SeriesModel::COL_DATE);
$column->set (sizing => 'fixed',
fixed_width => 10*$em, # eg. "2007-12-31"
resizable => 1);
$self->append_column ($column);
}
foreach my $elem ([ App::Chart::Gtk2::SeriesModel::COL_OPEN, __('Open'), 7 ],
lib/App/Chart/Gtk2/SeriesTreeView.pm view on Meta::CPAN
[ App::Chart::Gtk2::SeriesModel::COL_LOW, __('Low'), 7 ],
[ App::Chart::Gtk2::SeriesModel::COL_CLOSE, __('Close'), 7 ],
[ App::Chart::Gtk2::SeriesModel::COL_VOLUME, __('Volume'), 10 ],
[ App::Chart::Gtk2::SeriesModel::COL_OPENINT, __('Openint'), 9 ],
) {
my ($colnum, $heading, $width) = @$elem;
my $renderer = Gtk2::CellRendererText->new;
$renderer->set (xalign => 1,
ypad => 0,
editable => 1);
$renderer->set_fixed_height_from_font (1);
my $column = Gtk2::TreeViewColumn->new_with_attributes
($heading, $renderer, text => $colnum);
$column->set (sizing => 'fixed',
fixed_width => $width * $em,
resizable => 1);
App::Chart::Gtk2::Ex::CellRendererTextBits::renderer_edited_set_value ($renderer, $column, $colnum);
$self->append_column ($column);
}
}
lib/App/Chart/Gtk2/WatchlistDialog.pm view on Meta::CPAN
$treeview->signal_connect (query_tooltip => \&_do_query_tooltip);
$treeview->set (has_tooltip => 1);
my $selection = $treeview->get_selection;
$selection->signal_connect (changed => \&_do_symbol_selection_changed);
$selection->set_mode ('single');
my $renderer_left = Gtk2::CellRendererText->new;
$renderer_left->set (xalign => 0,
ypad => 0);
$renderer_left->set_fixed_height_from_font (1);
my $renderer_right = Gtk2::CellRendererText->new;
$renderer_right->set (xalign => 1,
ypad => 0);
$renderer_right->set_fixed_height_from_font (1);
{
my $renderer = $self->{'symbol_renderer'} = Gtk2::CellRendererText->new;
$renderer->set (xalign => 0, ypad => 0);
$renderer->set_fixed_height_from_font (1);
my $column = Gtk2::TreeViewColumn->new_with_attributes
(__('Symbol'), $renderer,
text => $model->COL_SYMBOL,
foreground => $model->COL_COLOUR);
$column->set (sizing => 'fixed',
fixed_width => 8*$em,
resizable => 1);
App::Chart::Gtk2::Ex::CellRendererTextBits::renderer_edited_set_value
($renderer, $column, 0);
lib/App/Chart/Pango/Ex/ANSItoMarkup.pm view on Meta::CPAN
# 7 "negative image", reverse video
# would kinda need to know what the normal colours are
# 8 concealed
# does this mean invisible?
} elsif ($num == 9) {
$attr->[_A_STRIKETHROUGH] = 'strikethrough=true';
# 10 primary font
# 11 first alternative font
# ...
# 19 ninth alternative font
# 20 fraktur gothic
} elsif ($num == 21) {
# double underline
$attr->[_A_UNDERLINE] = 'underline=double';
} elsif ($num == 22) {
# normal colour/intensity, ie. neither bold nor faint
$attr->[_A_WEIGHT] = undef;
lib/App/Chart/Suffix/ATH.pm view on Meta::CPAN
# 8859-7 transliteration
#
# The 8859-7 bytes here in the source are for ease of seeing what they're
# supposed to be, but they're only in the comments, the code is all-ascii.
#
# $translit is a Regexp::Tr mapping Perl wide-chars which are certain greek
# characters (from iso-8859-7) to some latin equivalents.
#
# This is for some greek characters found in otherwise English names, like
# ÂÁÍÊ (0xC2,0xC1,0xCD,0xCA) for BANK in ALPHA.ATH. That comes out looking
# ok in Gtk or anywhere with good fonts, but for a tty a change to the
# actual intended latin characters is needed to make it printable.
our $translit; # global for testing
{
my %table
= (
# # A0 NO-BREAK SPACE
# # A1 ¡ MODIFIER LETTER REVERSED COMMA
# # A2 ¢ MODIFIER LETTER APOSTROPHE
# # A3 £ POUND SIGN
lib/App/Chart/Suffix/BEN.pm view on Meta::CPAN
my ($ts) = $te->tables || die 'BSX: quote columns not found';
$te = HTML::TableExtract->new
(depth => $ts->depth,
count => $ts->count + 1);
$te->tables || die 'BSX: reparse table not found';
# (receive-list (quote-adate quote-time)
# (bendigo-quote-adate-time)
# # eg: <span class="Blue"><br><br><b>Capilano Honey Limited</b><br><font color=red>TRADING HALT</font><br></span><br>
# (m (regexp-exec #,(regexp "Blue.*<b>.*red[^>]*>([^<]+)" regexp/icase regexp/newline) body))
# (note (and m (match:substring m 1))))
foreach my $row ($te->rows) {
my ($code, $bid, $offer, $last) = @$row;
$code =~ /(.*)\(([^)]+)\)/ or next;
my $name = $1;
my $symbol = "$2.BEN";
push @data, { symbol => $symbol,
lib/App/Chart/Suffix/BEN.pm view on Meta::CPAN
;; This history has each trade individually, but we collapse that to daily
;; open/high/low/close.
;; Eg:
;; <span class="Blue"><b>Capilano Honey Limited</b></span><br>
;; <span class="Blue"><br>Trade History<br></span><br>
;; <table ...
;;
;; Or when ex dividend:
;; <span class="Blue"><b>Capilano Honey Limited</b><br><font color=red>XD</font></span><br>
;; <span class="Blue"><br>Trade History<br></span><br>
;;
;; Or when halted:
;; <span class="Blue"><b>Capilano Honey Limited</b><br><font color=red>TRADING HALT</font></span><br>
;; <span class="Blue"><br>Trade History<br></span><br>
;;
;; match 1 is company name
;;
(define history-regexp
"<b>([^<]+)[^\n]*\n[^\n]*<br>Trade History")
(define (bendigo-process-download symbol url headers body)
(define commodity (chart-symbol-sans-dot symbol))
lib/App/Chart/Suffix/GHA.pm view on Meta::CPAN
my $content = $resp->decoded_content(raise_error=>1);
my @data = ();
my $h = { source => __PACKAGE__,
url => GSE_DAILY_URL,
resp => $resp,
currency => 'GHC',
date_format => 'dmy',
data => \@data };
# Eg. "24/04/2006\n\t\t</font> Trading Results"
$content =~ m{([0-9]+/[0-9]+/[0-9][0-9][0-9][0-9])([ \t\n]*(<[^>]*>| ))*[ \t\n]*Trading Results}
or die "GSE: daily page date not found\n";
my $date = $1;
require HTML::TableExtract;
my $te = HTML::TableExtract->new
(headers => ['', # no heading above symbols
'ISIN', 'Bid', 'Offer', 'Opening', 'Closing', 'Change',
'Traded' ]);
$te->parse($content);
lib/App/Chart/Suffix/GHA.pm view on Meta::CPAN
#
# sub name_url {
# my ($symbol) = @_;
# return 'http://www.gse.com.gh/marketstat/officiallist_details.asp?Symbol='
# . URI::Escape::uri_escape (App::Chart::symbol_sans_suffix ($symbol));
# }
#
# sub name_parse {
# my ($symbol, $resp) = @_;
#
# # eg. " <td><strong> <span class="just">2241 <strong> Trading Session </strong></span>for:<font color="#D98713"> Accra Brewery Company Ltd.</font></strong></td>"
#
# my $body = $resp->decoded_content (raise_error => 1);
# $body =~ s/<[^>]*>//g; # no html
# $body =~ /Trading Session.*for:([^\n]*)/
# or die "GSE: company name not found for '$symbol'";
# my $name = App::Chart::collapse_whitespace ($1);
# return { name => $name };
# }
1;
lib/App/Chart/doc/chart.html view on Meta::CPAN
<link href="#Concept-Index" rel="index" title="Concept Index">
<link href="dir.html#Top" rel="up" title="(dir)">
<link href="#Introduction" rel="next" title="Introduction">
<link href="dir.html#Top" rel="prev" title="(dir)">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
a.summary-letter-printindex {text-decoration: none}
div.center {text-align:center}
div.example {margin-left: 3.2em}
kbd.kbd {font-style: oblique}
kbd.key {font-style: normal}
span:hover a.copiable-link {visibility: visible}
strong.def-name {font-family: monospace; font-weight: bold; font-size: larger}
td.printindex-index-entry {vertical-align: top}
td.printindex-index-section {vertical-align: top; padding-left: 1em}
th.entries-header-printindex {text-align:left}
th.sections-header-printindex {text-align:left; padding-left: 1em}
ul.mark-bullet {list-style-type: disc}
-->
</style>
</head>
misc/cellview.pl view on Meta::CPAN
$label->set_markup ('<span gravity="east">hello</span>');
# $label->set (attributes => $attrlist);
# my $context = $label->get_pango_context;
# $toplevel->signal_connect (map_event => sub { $context->set_base_gravity ('east') });
$vbox->pack_start ($label, 1,1,0);
# Create a model object with the data that's going to be shown, in this case
# a Gtk2::ListStore with just one column and with text strings in the rows.
# The "*"s at the start of each item are just a simple visual separator.
# You could use a unicode bullet or whatnot if you're confident of having
# the fonts.
#
my $liststore = Gtk2::ListStore->new ('Glib::String');
foreach my $str ('* Item one',
'* Item two',
'* Item three',
'* Item four',
'* Item five') {
$liststore->set_value ($liststore->append, # append new row
0, # store to column 0
$str); # store this string
misc/t-raw.pl view on Meta::CPAN
# },
# ],
# });
# $scrolled->{'datasheet'} = $datasheet;
# push @{$self->{'datasheets'}}, $datasheet;
#
# foreach my $column ($treeview->get_columns) {
# $column->set (sizing => 'fixed',
# resizable => 1);
# foreach my $renderer ($column->get_cell_renderers) {
# if (my $subr = $renderer->can('set_fixed_height_from_font')) {
# $renderer->set_fixed_height_from_font (1); # one line high
# }
# }
# }
# $treeview->set_fixed_height_mode (1);
# }
misc/t-symlist-list.pl view on Meta::CPAN
$toplevel->add ($treeview);
my $em = Gtk2::Ex::Units::em ($treeview);
{
my $edit_col = 0;
my $renderer = Gtk2::CellRendererText->new;
$renderer->set (xalign => 0,
ypad => 0,
editable => 1);
$renderer->set_fixed_height_from_font (1);
$renderer->signal_connect
(edited => sub {
my ($renderer, $pathstr, $text) = @_;
my $path = Gtk2::TreePath->new_from_string ($pathstr);
my $iter = $model->get_iter ($path);
$model->set_value ($iter, $edit_col, $text);
});
my $column = Gtk2::TreeViewColumn->new_with_attributes
("key", $renderer, text => $model->COL_KEY);
misc/t-symlist-list.pl view on Meta::CPAN
fixed_width => 10*$em,
resizable => 1);
$treeview->append_column ($column);
}
{
my $edit_col = 1;
my $renderer = Gtk2::CellRendererText->new;
$renderer->set (xalign => 0,
ypad => 0,
editable => 1);
$renderer->set_fixed_height_from_font (1);
$renderer->signal_connect
(edited => sub {
my ($renderer, $pathstr, $text) = @_;
my $path = Gtk2::TreePath->new_from_string ($pathstr);
my $iter = $model->get_iter ($path);
$model->set_value ($iter, $edit_col, $text);
});
my $column = Gtk2::TreeViewColumn->new_with_attributes
("name", $renderer, text => $model->COL_NAME);
misc/t-symlist-list.pl view on Meta::CPAN
fixed_width => 8*$em,
resizable => 1);
$treeview->append_column ($column);
}
{
my $edit_col = 2;
my $renderer = Gtk2::CellRendererText->new;
$renderer->set (xalign => 0,
ypad => 0,
editable => 1);
$renderer->set_fixed_height_from_font (1);
$renderer->signal_connect
(edited => sub {
my ($renderer, $pathstr, $text) = @_;
my $path = Gtk2::TreePath->new_from_string ($pathstr);
my $iter = $model->get_iter ($path);
print "set_value path=$pathstr col=$edit_col\n";
$model->set_value ($iter, $edit_col, $text);
});
my $column = Gtk2::TreeViewColumn->new_with_attributes
misc/t-symlist-model.pl view on Meta::CPAN
}
my $treeview = Gtk2::TreeView->new_with_model ($model);
$scrolled->add ($treeview);
my $em = Gtk2::Ex::Units::em ($treeview);
my $renderer_left = Gtk2::CellRendererText->new;
$renderer_left->set (xalign => 0,
ypad => 0);
$renderer_left->set_fixed_height_from_font (1);
{
my $column = Gtk2::TreeViewColumn->new_with_attributes
("0", $renderer_left, text => 0);
$column->set (sizing => 'fixed',
fixed_width => 10*$em,
resizable => 1);
$treeview->append_column ($column);
}
{
misc/t-widget.pl view on Meta::CPAN
print Dumper ($v2);
# my $c1 = $gc->foreground;
# my $c2 = $gc->foreground;
# print "$c1 $c2\n";
# print $$c1,' ',$$c2,"\n";
exit 0;
}
{
my $r = Gtk2::CellRendererText->new;
my $f1 = $r->get('font-desc');
my $f2 = $r->get('font-desc');
print "$f1 $f2\n";
print $$f1,' ',$$f2,"\n";
$r->set('font-desc',$f1);
$f2 = $r->get('font-desc');
print "$f1 $f2\n";
print $$f1,' ',$$f2,"\n";
exit 0;
my $c1 = Gtk2::Gdk::Cursor->new ('watch');
my $c2 = Gtk2::Gdk::Cursor->new ('watch');
print "$c1 $c2\n";
exit 0;
}