Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
kebab-case the public interface
I've added a DEPRECATION to all the old names with no particular
time being specified.  I guess I'll give it a month or so.

Closes #29
  • Loading branch information
jonathanstowe committed May 19, 2016
1 parent 0f5fd75 commit bdb93cf
Show file tree
Hide file tree
Showing 8 changed files with 94 additions and 46 deletions.
4 changes: 2 additions & 2 deletions examples/01_hello_world.p6
Expand Up @@ -20,7 +20,7 @@ my GTK::Simple::App $app .= new(title => "Hello GTK!");
all widgets as well as the window. set_content does all of that for us.
=end comment

$app.set_content(
$app.set-content(
GTK::Simple::VBox.new(
my $button = GTK::Simple::Button.new(label => "Hello World!"),
my $second = GTK::Simple::Button.new(label => "Goodbye!")
Expand All @@ -39,7 +39,7 @@ $app.set_content(
C<border_width> on a window, however, is special-cased to put
a border U<inside> the window instead.

$app.border_width = 20;
$app.border-width = 20;


=comment
Expand Down
4 changes: 2 additions & 2 deletions examples/02_toggles.p6
Expand Up @@ -16,7 +16,7 @@ my GTK::Simple::App $app .= new(title => "Toggle buttons");
info to the user and above and below that we create one
C<GTK::Simple::CheckButton> and a C<GTK::Simple::ToggleButton>.

$app.set_content(
$app.set-content(
GTK::Simple::VBox.new(
my $check_button = GTK::Simple::CheckButton.new(label => "check me out!"),
my $status_label = GTK::Simple::Label.new(text => "the toggles are off and off"),
Expand All @@ -29,7 +29,7 @@ $app.set_content(
Since the window would end up terribly tiny otherwise, we set a
quite generous inner border for the window

$app.border_width = 50;
$app.border-width = 50;

=comment
This sub will be called whenever we toggle either of the two Buttons.
Expand Down
4 changes: 2 additions & 2 deletions examples/03_grid.p6
Expand Up @@ -9,7 +9,7 @@ my GTK::Simple::App $app .= new(title => "Grid layouts!");
=comment
The interesting bit of this example is the grid constructor.

$app.set_content(
$app.set-content(
GTK::Simple::Grid.new(
=comment
As you can see, you pass pairs with a coordinate and size on the left
Expand Down Expand Up @@ -49,6 +49,6 @@ $app.set_content(
You can also put grids inside HBox or VBox containers and vice versa.
This allows for some pretty complex layouts to be created.

$app.border_width = 20;
$app.border-width = 20;

$app.run;
4 changes: 2 additions & 2 deletions examples/04_marked_scale.p6
Expand Up @@ -12,7 +12,7 @@ my %texts = <blue red> Z=>
'<span foreground="red" size="x-large">Red text</span> is <b>hot</b>!'
;

$app.set_content(
$app.set-content(
GTK::Simple::VBox.new(
GTK::Simple::HBox.new(
GTK::Simple::VBox.new(
Expand Down Expand Up @@ -69,4 +69,4 @@ $scale-vertical.value-changed.tap: &vertical-changes;

$scale-horizontal.value-changed.tap: &horizontal-changes;

$app.run;
$app.run;
6 changes: 3 additions & 3 deletions examples/05_bars.p6
Expand Up @@ -54,7 +54,7 @@ $button2.clicked.tap({
my $hbox = GTK::Simple::HBox.new($button1, $button2);

my $frame = GTK::Simple::Frame.new(label => "Status");
$frame.set_content($status);
$frame.set-content($status);


my $sep1 = GTK::Simple::Separator.new;
Expand All @@ -64,8 +64,8 @@ my $vbox = GTK::Simple::VBox.new($hbox,$sep1, $progress, $sep2, $frame);

$vbox.spacing = 10;

$app.set_content($vbox);
$app.set-content($vbox);

$app.border_width = 20;
$app.border-width = 20;

$app.run;
4 changes: 2 additions & 2 deletions examples/06_combo.p6
Expand Up @@ -3,7 +3,7 @@
use GTK::Simple;

my $app = GTK::Simple::App.new(title => "Combo Box");
$app.size_request(300,100);
$app.size-request(300,100);

my $combo = GTK::Simple::ComboBoxText.new;

Expand All @@ -18,7 +18,7 @@ $combo.changed.tap({
$label.text = $combo.active-text();
});

$app.set_content(GTK::Simple::VBox.new($label, $combo));
$app.set-content(GTK::Simple::VBox.new($label, $combo));

$app.run;

2 changes: 1 addition & 1 deletion examples/07_text.p6
Expand Up @@ -20,7 +20,7 @@ $monospace.toggled.tap( -> $w { $text-view.monospace = $w.status });

my $vbox = GTK::Simple::VBox.new($editable, $show-cursor, $monospace, $text-view);

$app.set_content($vbox);
$app.set-content($vbox);


$app.run;
Expand Down

0 comments on commit bdb93cf

Please sign in to comment.