view release on metacpan or search on metacpan
lib/ChordPro/res/fonts/FreeSans.ttf
lib/ChordPro/res/fonts/FreeSansBold.ttf
lib/ChordPro/res/fonts/FreeSansBoldOblique.ttf
lib/ChordPro/res/fonts/FreeSansOblique.ttf
lib/ChordPro/res/fonts/FreeSerif.ttf
lib/ChordPro/res/fonts/FreeSerifBold.ttf
lib/ChordPro/res/fonts/FreeSerifBoldItalic.ttf
lib/ChordPro/res/fonts/FreeSerifItalic.ttf
lib/ChordPro/res/fonts/LICENSES.md
lib/ChordPro/res/fonts/MuseJazzText.otf
lib/ChordPro/res/icons/cancel.png
lib/ChordPro/res/icons/chordpro-bg.png
lib/ChordPro/res/icons/chordpro-doc.ico
lib/ChordPro/res/icons/chordpro-doc.png
lib/ChordPro/res/icons/chordpro-doc.svg
lib/ChordPro/res/icons/chordpro-icon.png
lib/ChordPro/res/icons/chordpro-logo-narrow.png
lib/ChordPro/res/icons/chordpro-splash.png
lib/ChordPro/res/icons/chordpro.ico
lib/ChordPro/res/icons/chordpro.png
lib/ChordPro/res/icons/chordpro.svg
lib/ChordPro/res/icons/missing.png
lib/ChordPro/res/icons/wx-main-book.png
lib/ChordPro/res/icons/wx-main-documentation.png
lib/ChordPro/res/icons/wx-main-existing-doc.png
lib/ChordPro/res/icons/wx-main-new-doc.png
lib/ChordPro/res/icons/wx-main-sample-doc.png
lib/ChordPro/res/icons/wx-main-website.png
lib/ChordPro/res/icons/wx-toolbar-back.png
lib/ChordPro/res/icons/wx-toolbar-messages.png
lib/ChordPro/res/icons/wx-toolbar-preferences.png
lib/ChordPro/res/icons/wx-toolbar-preview.png
lib/ChordPro/res/linux/chordpro.xml
lib/ChordPro/res/linux/org.chordpro.desktop
lib/ChordPro/res/linux/org.chordpro.metainfo.xml
lib/ChordPro/res/linux/setup_desktop.sh
lib/ChordPro/res/pod/A2Crd.pod
lib/ChordPro/res/pod/ChordPro.pod
lib/ChordPro/res/pod/Config.pod
lib/ChordPro/res/styles/chordpro.css
lib/ChordPro/res/styles/chordpro_print.css
lib/ChordPro/res/templates/comment.tt
lib/ChordPro/Output/Common.pm view on Meta::CPAN
if ( $mimetype ) {
$mimetype = lc $mimetype;
}
else {
$mimetype = ChordPro::Utils::_detect_image_format($data)
|| Carp::croak("Unrecognized imge data in \"$src\"");
}
unless ( $mimetype =~ m;^(image|text)/.*; ) {
state $mimetypes =
{ png => 'image/png',
jpg => 'image/jpeg',
jpeg => 'image/jpeg',
gif => 'image/gif',
svg => 'image/svg+xml',
css => 'text/css',
};
Carp::croak( "Unhandled MIME type \"$mimetype\"" )
unless $mimetypes->{$mimetype};
$mimetype = $mimetypes->{$mimetype};
}
lib/ChordPro/Output/Markdown.pm view on Meta::CPAN
$s->structurize;
my @s;
push(@s, "# " . $s->{title}) if defined $s->{title};
if ( defined $s->{subtitle} ) {
push(@s, map { +"## $_" } @{$s->{subtitle}});
}
if ( !$lyrics_only ){
my $all_chords = "";
# https://chordgenerator.net/D.png?p=xx0212&s=2 # reuse of other projects (https://github.com/einaregilsson/ChordImageGenerator)?
# generate png-out of this project? // fingers also possible - but not set in basics.
foreach my $mchord (@{$s->{chords}->{chords}}){
# replace -1 with 'x' - alternative '-'
my $frets = join("", map { if($_ eq '-1'){ $_ = 'x'; } +"$_"} @{$s->{chordsinfo}->{$mchord}->{frets}});
$all_chords .= " ";
}
push(@s, $all_chords);
push(@s, "");
}
push(@s, elt_handler($s->{body}));
return \@s;
}
sub line_default {
lib/ChordPro/Output/PDF/Writer.pm view on Meta::CPAN
warn("get_image($elt->{subtype}): data ", length($data), " bytes\n")
if $config->{debug}->{images};
return $data;
}
my $uri = $elt->{uri};
if ( !$subtype && $uri =~ /\.(\w+)$/ ) {
$subtype //= $1;
}
if ( $subtype =~ /^(jpg|png|gif)$/ ) {
$img = $self->{pdf}->image($uri);
warn("get_image($subtype, $uri): img ", length($img), " bytes\n")
if $config->{debug}->{images};
}
elsif ( $subtype =~ /^(xform)$/ ) {
$img = $data;
warn("get_image($subtype): xobject (",
# join(" ", $img->bbox),
join(" ", @{$data->{bbox}}),
")\n")
lib/ChordPro/Utils.pm view on Meta::CPAN
push( @EXPORT_OK, "enumerated" );
# Determine image type.
sub _detect_image_format( $test ) {
for ( ref($test) ? $$test : $test ) {
/^GIF\d\d[a-z]/ and return 'gif';
/^\xFF\xD8\xFF/ and return 'jpeg';
/^\x89PNG\x0D\x0A\x1A\x0A/ and return 'png';
/^\s*P[1-6]/ and return 'pnm';
/^II\x2A\x00/ and return 'tiff';
/^MM\x00\x2A/ and return 'tiff';
/^<svg\s/is and return 'svg';
}
# Not recognized.
return;
}
lib/ChordPro/Wx/EditorPanel_wxg.pm view on Meta::CPAN
$self->{l_status} = Wx::StaticText->new($self, wxID_ANY, _T("ChordPro"));
$self->{l_status}->SetForegroundColour(Wx::Colour->new(0, 104, 217));
$self->{l_status}->SetFont(Wx::Font->new(20, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, 0, ""));
$self->{sz_toolbar}->Add($self->{l_status}, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5);
$self->{sz_toolbar}->Add(5, 1, 1, wxEXPAND, 0);
$self->{bmp_songbook} = Wx::Button->new($self, wxID_ANY, _T("Songbook"));
$self->{bmp_songbook}->SetToolTip(_T("Back to the Songbook."));
$self->{bmp_songbook}->SetBitmap(Wx::Bitmap->new("/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-toolbar-back.png", wxBITMAP_TYPE_ANY), wxTOP);
$self->{sz_toolbar}->Add($self->{bmp_songbook}, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
$self->{bmp_preferences} = Wx::Button->new($self, wxID_ANY, _T("Settings"));
$self->{bmp_preferences}->SetToolTip(_T("Open the Settings dialog"));
$self->{bmp_preferences}->SetBitmap(Wx::Bitmap->new("/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-toolbar-preferences.png", wxBITMAP_TYPE_ANY), wxTOP);
$self->{sz_toolbar}->Add($self->{bmp_preferences}, 0, wxALL|wxEXPAND, 5);
$self->{bmb_preview} = Wx::Button->new($self, wxID_ANY, _T("Preview"));
$self->{bmb_preview}->SetBitmap(Wx::Bitmap->new("/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-toolbar-preview.png", wxBITMAP_TYPE_ANY), wxTOP);
$self->{sz_toolbar}->Add($self->{bmb_preview}, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
$self->{bmb_messages} = Wx::Button->new($self, wxID_ANY, _T("Messages"));
$self->{bmb_messages}->SetBitmap(Wx::Bitmap->new("/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-toolbar-messages.png", wxBITMAP_TYPE_ANY), wxTOP);
$self->{sz_toolbar}->Add($self->{bmb_messages}, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5);
$self->{sw_tb} = Wx::SplitterWindow->new($self, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_NOBORDER);
$self->{sw_tb}->SetMinimumPaneSize(20);
$self->{sz_outer}->Add($self->{sw_tb}, 1, wxEXPAND, 0);
$self->{p_top} = Wx::Panel->new($self->{sw_tb}, wxID_ANY);
$self->{sz_lr} = Wx::BoxSizer->new(wxVERTICAL);
lib/ChordPro/Wx/Main.pm view on Meta::CPAN
}
BUILD {
Wx::Event::EVT_IDLE($self, $self->can('OnIdle'));
Wx::Event::EVT_CLOSE($self, $self->can('OnClose'));
# Later, the panels will take over logging.
Wx::Log::SetActiveTarget( Wx::LogStderr->new );
$self->SetTitle("ChordPro");
$self->SetIcon( Wx::Icon->new(CP->findres( "chordpro-icon.png", class => "icons" ), wxBITMAP_TYPE_ANY) );
$self->attach_events;
# MacOS file dialogs always filters with all wildcards. So if there is
# an "All files|*.*" at the end, all file will match.
# So either remove the *.* or use the following code:
Wx::SystemOptions::SetOption("osx.openfiledialog.always-show-types", 1)
if 0 && is_macos;
}
lib/ChordPro/Wx/Main.pm view on Meta::CPAN
my $year = 1900 + (localtime(time))[5];
$info->SetName("ChordPro");
$info->SetVersion( $VERSION .
( $VERSION =~ /_/ ? " (unsupported development snapshot)" : "" ) );
$info->SetDescription("ChordPro is free software");
$info->SetCopyright("⸠2016-$year Johan Vromans\nThe ChordPro Team");
$info->SetWebSite( "https://www.chordpro.org",
"Visit the ChordPro web site");
my $icon = Wx::Icon->new;
$info->SetIcon($icon)
if $icon->LoadFile( CP->findres("chordpro-splash.png",class=>"icons"),wxBITMAP_TYPE_PNG );
Wx::AboutBox($info);
}
method OnClose($event) {
return unless $self->check_saved;
# Save preferences to persistent storage.
$self->save_preferences;
# Stop webview process (GTK).
if ( $self->{panel} && $self->{panel}->{webview} ) {
$self->{panel}->{webview}->Close;
lib/ChordPro/Wx/Main.wxg view on Meta::CPAN
<object class="spacer" name="spacer" base="EditSpacer">
<width>1</width>
<height>30</height>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>0</border>
<flag>wxEXPAND</flag>
<object class="wxStaticBitmap" name="bm_init" base="EditStaticBitmap">
<bitmap>/usr/local/src/ChordPro/lib/ChordPro/res/icons/chordpro-logo-narrow.png</bitmap>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<border>0</border>
<flag>wxEXPAND</flag>
<object class="spacer" name="spacer" base="EditSpacer">
<width>1</width>
<height>1</height>
</object>
lib/ChordPro/Wx/Main.wxg view on Meta::CPAN
<background>wxSYS_COLOUR_BTNHIGHLIGHT</background>
<tooltip>Create a new song</tooltip>
<style>wxBORDER_THEME</style>
<object class="wxBoxSizer" name="sizer_12" base="EditBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>0</option>
<border>10</border>
<flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
<object class="wxStaticBitmap" name="bitmap_7" base="EditStaticBitmap">
<bitmap>/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-main-new-doc.png</bitmap>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>10</border>
<flag>wxRIGHT|wxALIGN_CENTER_VERTICAL</flag>
<object class="wxStaticText" name="label_7" base="EditStaticText">
<label>Create a new song</label>
</object>
</object>
lib/ChordPro/Wx/Main.wxg view on Meta::CPAN
<background>wxSYS_COLOUR_BTNHIGHLIGHT</background>
<tooltip>Open an existing song</tooltip>
<style>wxBORDER_THEME</style>
<object class="wxBoxSizer" name="sizer_20" base="EditBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>0</option>
<border>10</border>
<flag>wxALL</flag>
<object class="wxStaticBitmap" name="bitmap_8" base="EditStaticBitmap">
<bitmap>/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-main-existing-doc.png</bitmap>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>10</border>
<flag>wxRIGHT|wxALIGN_CENTER_VERTICAL</flag>
<object class="wxStaticText" name="label_8" base="EditStaticText">
<label>Open an existing song</label>
</object>
</object>
lib/ChordPro/Wx/Main.wxg view on Meta::CPAN
<background>wxSYS_COLOUR_BTNHIGHLIGHT</background>
<tooltip>Create a song book</tooltip>
<style>wxBORDER_THEME</style>
<object class="wxBoxSizer" name="sizer_21" base="EditBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>0</option>
<border>10</border>
<flag>wxALL</flag>
<object class="wxStaticBitmap" name="bitmap_9" base="EditStaticBitmap">
<bitmap>/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-main-book.png</bitmap>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>10</border>
<flag>wxRIGHT|wxALIGN_CENTER_VERTICAL</flag>
<object class="wxStaticText" name="label_9" base="EditStaticText">
<label>Create a songbook</label>
</object>
</object>
lib/ChordPro/Wx/Main.wxg view on Meta::CPAN
<background>wxSYS_COLOUR_BTNHIGHLIGHT</background>
<tooltip>Open an example song</tooltip>
<style>wxBORDER_THEME</style>
<object class="wxBoxSizer" name="sizer_22" base="EditBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>0</option>
<border>10</border>
<flag>wxALL</flag>
<object class="wxStaticBitmap" name="bitmap_10" base="EditStaticBitmap">
<bitmap>/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-main-sample-doc.png</bitmap>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>10</border>
<flag>wxRIGHT|wxALIGN_CENTER_VERTICAL</flag>
<object class="wxStaticText" name="label_10" base="EditStaticText">
<label>Open an example song</label>
</object>
</object>
lib/ChordPro/Wx/Main.wxg view on Meta::CPAN
<background>wxSYS_COLOUR_BTNHIGHLIGHT</background>
<tooltip>Visit the ChordPro site</tooltip>
<style>wxBORDER_THEME</style>
<object class="wxBoxSizer" name="sizer_18" base="EditBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>0</option>
<border>10</border>
<flag>wxALL</flag>
<object class="wxStaticBitmap" name="bitmap_5" base="EditStaticBitmap">
<bitmap>/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-main-website.png</bitmap>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>10</border>
<flag>wxRIGHT|wxALIGN_CENTER_VERTICAL</flag>
<object class="wxStaticText" name="label_5" base="EditStaticText">
<label>Visit the ChordPro site</label>
</object>
</object>
lib/ChordPro/Wx/Main.wxg view on Meta::CPAN
<background>wxSYS_COLOUR_BTNHIGHLIGHT</background>
<tooltip>Read the documentation</tooltip>
<style>wxBORDER_THEME</style>
<object class="wxBoxSizer" name="sizer_19" base="EditBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>0</option>
<border>10</border>
<flag>wxALL</flag>
<object class="wxStaticBitmap" name="bitmap_6" base="EditStaticBitmap">
<bitmap>/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-main-documentation.png</bitmap>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>10</border>
<flag>wxRIGHT|wxALIGN_CENTER_VERTICAL</flag>
<object class="wxStaticText" name="label_6" base="EditStaticText">
<label>Read the documentation</label>
</object>
</object>
lib/ChordPro/Wx/Main_wxg.pm view on Meta::CPAN
$self->{sizer_13}->Add($self->{l_init}, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxTOP, 20);
$self->{sizer_14} = Wx::BoxSizer->new(wxHORIZONTAL);
$self->{sizer_13}->Add($self->{sizer_14}, 0, wxEXPAND, 0);
$self->{sizer_8} = Wx::BoxSizer->new(wxVERTICAL);
$self->{sizer_14}->Add($self->{sizer_8}, 1, wxEXPAND, 0);
$self->{sizer_8}->Add(1, 30, 0, wxEXPAND, 0);
my $bm_init = Wx::StaticBitmap->new($self->{p_initial}, wxID_ANY, Wx::Bitmap->new("/usr/local/src/ChordPro/lib/ChordPro/res/icons/chordpro-logo-narrow.png", wxBITMAP_TYPE_ANY));
$self->{sizer_8}->Add($bm_init, 0, wxEXPAND, 0);
$self->{sizer_8}->Add(1, 1, 1, wxEXPAND, 0);
$self->{sizer_2} = Wx::BoxSizer->new(wxVERTICAL);
$self->{sizer_14}->Add($self->{sizer_2}, 2, wxEXPAND|wxFIXED_MINSIZE|wxLEFT, 20);
$self->{notebook_1} = Wx::Notebook->new($self->{p_initial}, wxID_ANY);
$self->{sizer_2}->Add($self->{notebook_1}, 1, wxEXPAND, 0);
lib/ChordPro/Wx/Main_wxg.pm view on Meta::CPAN
$self->{sizer_3} = Wx::BoxSizer->new(wxVERTICAL);
$self->{pn_new} = Wx::Panel->new($self->{p_create}, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_THEME);
$self->{pn_new}->SetBackgroundColour(Wx::SystemSettings::GetColour(wxSYS_COLOUR_BTNHIGHLIGHT));
$self->{pn_new}->SetToolTip(_T("Create a new song"));
$self->{sizer_3}->Add($self->{pn_new}, 0, wxEXPAND, 0);
$self->{sizer_12} = Wx::BoxSizer->new(wxHORIZONTAL);
my $bitmap_7 = Wx::StaticBitmap->new($self->{pn_new}, wxID_ANY, Wx::Bitmap->new("/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-main-new-doc.png", wxBITMAP_TYPE_ANY));
$self->{sizer_12}->Add($bitmap_7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10);
my $label_7 = Wx::StaticText->new($self->{pn_new}, wxID_ANY, _T("Create a new song"));
$self->{sizer_12}->Add($label_7, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10);
$self->{sizer_3}->Add(1, 5, 1, wxEXPAND, 0);
$self->{pn_open} = Wx::Panel->new($self->{p_create}, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_THEME);
$self->{pn_open}->SetBackgroundColour(Wx::SystemSettings::GetColour(wxSYS_COLOUR_BTNHIGHLIGHT));
$self->{pn_open}->SetToolTip(_T("Open an existing song"));
$self->{sizer_3}->Add($self->{pn_open}, 0, wxEXPAND, 0);
$self->{sizer_20} = Wx::BoxSizer->new(wxHORIZONTAL);
my $bitmap_8 = Wx::StaticBitmap->new($self->{pn_open}, wxID_ANY, Wx::Bitmap->new("/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-main-existing-doc.png", wxBITMAP_TYPE_ANY));
$self->{sizer_20}->Add($bitmap_8, 0, wxALL, 10);
my $label_8 = Wx::StaticText->new($self->{pn_open}, wxID_ANY, _T("Open an existing song"));
$self->{sizer_20}->Add($label_8, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10);
$self->{sizer_3}->Add(1, 5, 1, wxEXPAND, 0);
$self->{pn_sbexport} = Wx::Panel->new($self->{p_create}, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_THEME);
$self->{pn_sbexport}->SetBackgroundColour(Wx::SystemSettings::GetColour(wxSYS_COLOUR_BTNHIGHLIGHT));
$self->{pn_sbexport}->SetToolTip(_T("Create a song book"));
$self->{sizer_3}->Add($self->{pn_sbexport}, 0, wxEXPAND, 10);
$self->{sizer_21} = Wx::BoxSizer->new(wxHORIZONTAL);
my $bitmap_9 = Wx::StaticBitmap->new($self->{pn_sbexport}, wxID_ANY, Wx::Bitmap->new("/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-main-book.png", wxBITMAP_TYPE_ANY));
$self->{sizer_21}->Add($bitmap_9, 0, wxALL, 10);
my $label_9 = Wx::StaticText->new($self->{pn_sbexport}, wxID_ANY, _T("Create a songbook"));
$self->{sizer_21}->Add($label_9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10);
$self->{sizer_3}->Add(1, 5, 1, wxEXPAND, 0);
$self->{pn_example} = Wx::Panel->new($self->{p_create}, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_THEME);
$self->{pn_example}->SetBackgroundColour(Wx::SystemSettings::GetColour(wxSYS_COLOUR_BTNHIGHLIGHT));
$self->{pn_example}->SetToolTip(_T("Open an example song"));
$self->{sizer_3}->Add($self->{pn_example}, 0, wxEXPAND, 0);
$self->{sizer_22} = Wx::BoxSizer->new(wxHORIZONTAL);
my $bitmap_10 = Wx::StaticBitmap->new($self->{pn_example}, wxID_ANY, Wx::Bitmap->new("/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-main-sample-doc.png", wxBITMAP_TYPE_ANY));
$self->{sizer_22}->Add($bitmap_10, 0, wxALL, 10);
my $label_10 = Wx::StaticText->new($self->{pn_example}, wxID_ANY, _T("Open an example song"));
$self->{sizer_22}->Add($label_10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10);
$self->{p_recent} = Wx::Panel->new($self->{notebook_1}, wxID_ANY);
$self->{p_recent}->SetToolTip(_T("Select songs that were recently used"));
$self->{notebook_1}->AddPage($self->{p_recent}, _T("Recent"));
$self->{sizer_4} = Wx::BoxSizer->new(wxVERTICAL);
lib/ChordPro/Wx/Main_wxg.pm view on Meta::CPAN
$self->{sizer_2}->Add(1, 10, 0, wxEXPAND, 0);
$self->{pn_site} = Wx::Panel->new($self->{p_initial}, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_THEME);
$self->{pn_site}->SetBackgroundColour(Wx::SystemSettings::GetColour(wxSYS_COLOUR_BTNHIGHLIGHT));
$self->{pn_site}->SetToolTip(_T("Visit the ChordPro site"));
$self->{sizer_2}->Add($self->{pn_site}, 0, wxEXPAND, 0);
$self->{sizer_18} = Wx::BoxSizer->new(wxHORIZONTAL);
my $bitmap_5 = Wx::StaticBitmap->new($self->{pn_site}, wxID_ANY, Wx::Bitmap->new("/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-main-website.png", wxBITMAP_TYPE_ANY));
$self->{sizer_18}->Add($bitmap_5, 0, wxALL, 10);
my $label_5 = Wx::StaticText->new($self->{pn_site}, wxID_ANY, _T("Visit the ChordPro site"));
$self->{sizer_18}->Add($label_5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10);
$self->{sizer_2}->Add(1, 5, 0, wxEXPAND, 0);
$self->{pn_help} = Wx::Panel->new($self->{p_initial}, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_THEME);
$self->{pn_help}->SetBackgroundColour(Wx::SystemSettings::GetColour(wxSYS_COLOUR_BTNHIGHLIGHT));
$self->{pn_help}->SetToolTip(_T("Read the documentation"));
$self->{sizer_2}->Add($self->{pn_help}, 0, wxEXPAND, 0);
$self->{sizer_19} = Wx::BoxSizer->new(wxHORIZONTAL);
my $bitmap_6 = Wx::StaticBitmap->new($self->{pn_help}, wxID_ANY, Wx::Bitmap->new("/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-main-documentation.png", wxBITMAP_TYPE_ANY));
$self->{sizer_19}->Add($bitmap_6, 0, wxALL, 10);
my $label_6 = Wx::StaticText->new($self->{pn_help}, wxID_ANY, _T("Read the documentation"));
$self->{sizer_19}->Add($label_6, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10);
$self->{sizer_2}->Add(1, 10, 0, wxEXPAND, 0);
$self->{sizer_13}->Add(1, 20, 1, wxEXPAND, 0);
$self->{sz_init}->Add(100, 1, 1, wxEXPAND, 0);
lib/ChordPro/Wx/SettingsDialog.pm view on Meta::CPAN
################ Helpers ################
method set_style_desc( $desc ) {
$self->{l_style_desc}->SetLabel($desc);
# $self->{l_style_desc}->Wrap(($self->{ch_style}->GetSizeWH)[0]);
}
=for later
method set_style_preview( $preview ) {
$preview //= "style_nopreview-small.png";
warn("XX1 $preview\n");
$preview = CP->findres( $preview, class => "images" )
|| CP->findres( "style_nopreview-small.png", class => "images" );
warn("XX2 $preview\n");
return unless $preview;
$self->{bm_style_preview}->SetBitmap
( Wx::Bitmap->new( $preview, wxBITMAP_TYPE_ANY ) );
}
=cut
method set_stylemods_desc( $desc ) {
$self->{l_stylemods_desc}->SetLabel($desc);
lib/ChordPro/Wx/SongbookExportPanel.wxg view on Meta::CPAN
<object class="sizeritem">
<option>0</option>
<border>5</border>
<flag>wxALL|wxEXPAND</flag>
<object class="wxButton" name="bmp_preferences" base="EditButton">
<events>
<handler event="EVT_BUTTON">OnPreferences</handler>
</events>
<tooltip>Open the Settings dialog</tooltip>
<label>Settings</label>
<bitmap>/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-toolbar-preferences.png</bitmap>
<bitmap_dir>wxTOP</bitmap_dir>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>5</border>
<flag>wxALL</flag>
<object class="wxButton" name="bmb_preview" base="EditButton">
<events>
<handler event="EVT_BUTTON">OnShowPreview</handler>
</events>
<label>Preview</label>
<bitmap>/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-toolbar-preview.png</bitmap>
<bitmap_dir>wxTOP</bitmap_dir>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>5</border>
<flag>wxLEFT|wxTOP|wxBOTTOM</flag>
<object class="wxButton" name="bmb_messages" base="EditButton">
<events>
<handler event="EVT_BUTTON">OnShowMessages</handler>
</events>
<label>Messages</label>
<bitmap>/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-toolbar-messages.png</bitmap>
<bitmap_dir>wxTOP</bitmap_dir>
</object>
</object>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<border>5</border>
<flag>wxALL|wxEXPAND</flag>
<object class="wxSplitterWindow" name="sw_tb" base="EditSplitterWindow">
lib/ChordPro/Wx/SongbookExportPanel_wxg.pm view on Meta::CPAN
$self->{l_status} = Wx::StaticText->new($self, wxID_ANY, _T("Create a Songbook"));
$self->{l_status}->SetForegroundColour(Wx::Colour->new(0, 104, 217));
$self->{l_status}->SetFont(Wx::Font->new(20, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, 0, ""));
$self->{sz_toolbar}->Add($self->{l_status}, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5);
$self->{sz_toolbar}->Add(5, 1, 1, wxEXPAND, 0);
$self->{bmp_preferences} = Wx::Button->new($self, wxID_ANY, _T("Settings"));
$self->{bmp_preferences}->SetToolTip(_T("Open the Settings dialog"));
$self->{bmp_preferences}->SetBitmap(Wx::Bitmap->new("/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-toolbar-preferences.png", wxBITMAP_TYPE_ANY), wxTOP);
$self->{sz_toolbar}->Add($self->{bmp_preferences}, 0, wxALL|wxEXPAND, 5);
$self->{bmb_preview} = Wx::Button->new($self, wxID_ANY, _T("Preview"));
$self->{bmb_preview}->SetBitmap(Wx::Bitmap->new("/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-toolbar-preview.png", wxBITMAP_TYPE_ANY), wxTOP);
$self->{sz_toolbar}->Add($self->{bmb_preview}, 0, wxALL, 5);
$self->{bmb_messages} = Wx::Button->new($self, wxID_ANY, _T("Messages"));
$self->{bmb_messages}->SetBitmap(Wx::Bitmap->new("/usr/local/src/ChordPro/lib/ChordPro/res/icons/wx-toolbar-messages.png", wxBITMAP_TYPE_ANY), wxTOP);
$self->{sz_toolbar}->Add($self->{bmb_messages}, 0, wxBOTTOM|wxLEFT|wxTOP, 5);
$self->{sw_tb} = Wx::SplitterWindow->new($self, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_NOBORDER);
$self->{sw_tb}->SetMinimumPaneSize(20);
$self->{sz_outer}->Add($self->{sw_tb}, 1, wxALL|wxEXPAND, 5);
$self->{p_top} = Wx::Panel->new($self->{sw_tb}, wxID_ANY);
$self->{sz_ep} = Wx::BoxSizer->new(wxVERTICAL);
lib/ChordPro/Wx/Utils.pm view on Meta::CPAN
unless ( $::wxbitmapnew ) {
$::wxbitmapnew = \&Wx::Bitmap::new;
no warnings 'redefine';
use File::Basename;
*Wx::Bitmap::new = sub {
# Only handle Wx::Bitmap->new(file, type) case.
goto &$::wxbitmapnew if @_ != 3 || fs_test( f => $_[1] );
my ($self, @rest) = @_;
$rest[0] = ChordPro::Paths->get->findres( basename($rest[0]),
class => "icons" );
$rest[0] ||= ChordPro::Paths->get->findres( "missing.png",
class => "icons" );
$::wxbitmapnew->($self, @rest);
};
}
################ ################
sub has_appearance() {
Wx::SystemSettings->can("GetAppearance");
}
lib/ChordPro/lib/SVGPDF/Image.pm view on Meta::CPAN
print $fd $data;
close($fd);
# Yes, trickery... $fh is now a file name, not a handle.
}
else {
open( $fh, '<:raw', \$data );
}
$img = $self->root->pdf->image( $fh, format => $format,
silent => 1, nouseIPL => 1 );
}
elsif ( $link =~ m!^.+\.(png|jpe?g|gif)$!i && -s $link ) {
# Autodetected. Make the image.
$img = $self->root->pdf->image( $link, silent => 1 );
}
elsif ( $link =~ m!^.+\.(tiff?|p[bgp]m|x[bp]m)$!i && -s $link ) {
# Not autodetected, need format.
# Note that xbm and xpm are bonus.
my $format = $1 =~ /tif/i ? "tiff" : "pnm";
# Make the image.
$img = $self->root->pdf->image( $link, format => $format, silent => 1 );
}
lib/ChordPro/res/config/config.schema view on Meta::CPAN
"oneOf": [
{
"title": "Equivalent to omitting `subtype` altogether.",
"enum": [false, ""]
},
{
"title": "A type of image.",
"enum": [
"jpg",
"jpeg",
"png",
"svg",
"gif",
"tiff",
"xbm",
"pbm",
"pnm"
]
}
]
},
lib/ChordPro/res/linux/org.chordpro.metainfo.xml view on Meta::CPAN
<summary>Print songbooks (lyrics + chords)</summary>
<description>
<p>ChordPro will read a text file containing the lyrics of one or many
songs plus chord information. ChordPro will then generate a
photo-ready, professional looking, impress-your-friends sheet-music
suitable for printing on your nearest printer.</p>
<p>ChordPro is a rewrite of the Chordii program.</p>
</description>
<screenshots>
<screenshot type="default">
<image>https://www.chordpro.org/appdata/screenshot1.png</image>
<caption>Main window.</caption>
</screenshot>
<screenshot>
<image>https://www.chordpro.org/appdata/screenshot2.png</image>
<caption>Song window.</caption>
</screenshot>
<screenshot>
<image>https://www.chordpro.org/appdata/screenshot3.png</image>
<caption>Song window with preview.</caption>
</screenshot>
<screenshot>
<image>https://www.chordpro.org/appdata/screenshot4.png</image>
<caption>Songbook window with preview.</caption>
</screenshot>
<screenshot>
<image>https://www.chordpro.org/appdata/screenshot5.png</image>
<caption>Command line.</caption>
</screenshot>
</screenshots>
<launchable type="desktop-id">org.chordpro.desktop</launchable>
<provides>
<mediatype>application/x-chordpro</mediatype>
<mediatype>text/x-chordpro</mediatype>
</provides>
<content_rating type="oars-1.0" />
<url type="homepage">https://www.chordpro.org/</url>
lib/ChordPro/res/linux/setup_desktop.sh view on Meta::CPAN
# Templates.
TLIB=${RES}/linux
TPL=org.chordpro.desktop
XML=org.chordpro.xml
ISIZE=256
if [ $action = "install" ]
then
# Prepare the desktop template.
desktop-file-edit --set-icon="${ILIB}/chordpro.png" ${TLIB}/${TPL}
# Install for user desktop
desktop-file-install --mode=0755 --dir=$HOME/Desktop ${TLIB}/${TPL}
desktop-file-validate ${HOME}/Desktop/${TPL}
# Install in applications menu.
desktop-file-install --dir=${XDG_APP} \
--rebuild-mime-info-cache ${TLIB}/${TPL}
# Install mime info.
cp -p ${TLIB}/${XML} ${XDG_MIME}/packages/
xdg-icon-resource install --context mimetypes --size ${ISIZE} \
${ILIB}/chordpro-doc.png x-chordpro-doc
else
rm -f ${HOME}/Desktop/${TPL}
rm -f ${XDG_APP}/${TPL}
xdg-icon-resource uninstall --context mimetypes --size ${ISIZE} x-chordpro-doc
rm -f ${XDG_MIME}/packages/${XML}
fi
lib/ChordPro/res/templates/cover.cho view on Meta::CPAN
{new_song toc="0" forceifempty="1"}
{+pdf.fonts.title.size:40}
{+pdf.fonts.subtitle.size:20}
{+pdf.margintop:100}
{+pdf.formats.first.footer: \
[ '<span href="https://chordpro.org">ChordPro</span> %{chordpro.version}', \
'', '%{today}' ] }
# Title and subtitle will be set from command line.
{title: ChordPro Songbook}
{subtitle: }
{image anchor="page" x="50%" y="50%" scale="100%" src="chordpro-icon.png"}
script/wxchordpro.pl view on Meta::CPAN
# Main sizer.
my $sz = Wx::BoxSizer->new(wxVERTICAL);
# sz3: Icon (left), info lines (right side).
my $sz3 = Wx::BoxSizer->new(wxHORIZONTAL);
# sz4: Information lines, right side,
my $sz4 = Wx::BoxSizer->new(wxVERTICAL);
$sz->Add( $sz3, 0, wxEXPAND, 0 );
$sz3->Add( $sz4, 0, wxBOTTOM|wxEXPAND|wxRIGHT|wxTOP, 20 );
my $icon = ChordPro::Paths->get->findres( "chordpro-splash.png",
class => "icons" )
|| ChordPro::Paths->get->findres( "missing.png",
class => "icons" );
Wx::Image::AddHandler(Wx::PNGHandler->new);
$sz3->Insert( 0,
Wx::StaticBitmap->new( $self, wxID_ANY,
Wx::Bitmap->new( $icon, wxBITMAP_TYPE_PNG) ),
0, 0, 0 );
for ( Wx::StaticText->new( $self, wxID_ANY,
"Software Update Required" ) ) {
t/md/030_cho_1.md view on Meta::CPAN
# Swing Low Sweet Chariot
## Traditional
   
**Chorus**
D G D
Swing low, sweet chariot,
A7
Cominâ for to carry me home.
D7 G D
Swing low, sweet chariot,
A7 D
t/md/030_cho_2.md view on Meta::CPAN
# Swing Low Sweet Chariot
## Traditional
   
**Chorus**
D G D
Swing low, sweet chariot,
A7
Cominâ for to carry me home.
D7 G D
Swing low, sweet chariot,
A7 D
t/md/a34.md view on Meta::CPAN
# a34
   
> A
**Grid**
|C..|F..|G..|C..|
|...|F..|G..|
|C.Am|
---------------
t/md/a44.md view on Meta::CPAN
# a44
   
> A
**Grid**
|C...|F...|G...|C...|
|....|F...|G...|
|C.Am.|
---------------
t/md/cho001.md view on Meta::CPAN
# t1
 
> Key: D
D *Bis
Hello-----
(E) E
Air Hello--
NC
t/md/cho002.md view on Meta::CPAN
# Keys
 
> Key: , Actual:
> Key: D, Actual: D
D
Hi
> Key: D, Actual: E
E
t/md/cho003.md view on Meta::CPAN
# https://groups.io/g/ChordPro/message/1092
  
Bb6
comes out as Bb6
Bb7
comes out as A#7
Bb
comes out as A#
---------------
t/md/cho004.md view on Meta::CPAN
# Tranpose
     
> Key: D, Print: D, Sound: E
D
Hi
> Key: D, Print: F, Sound: G
F
Hi