[#18233] [book] blade.nagaokaut.ac.jp/ruby/ruby-list/ — Shin-ichiro Hara <sinara@...>

原です。

21 messages 1999/11/01
[#18239] [book] csv_split2 [Re: blade.nagaokaut.ac.jp/ruby/ruby-list/] — keiju@... (石塚圭樹) 1999/11/01

けいじゅ@日本ラショナルソフトウェアです.

[#18244] Re: [book] csv_split2 [Re: blade.nagaokaut.ac.jp/ruby/ruby-list/] — Shin-ichiro Hara <sinara@...> 1999/11/01

原です。

[#18289] Re: [book] csv_split2 — Koretsugu Daigoro <tmmcross@...> 1999/11/02

これつぐです。

[#18291] Re: [book] csv_split2 — keiju@... (石塚圭樹) 1999/11/02

けいじゅ@日本ラショナルソフトウェアです.

[#18311] Re: [book] csv_split2 — Koretsugu Daigoro <tmmcross@...> 1999/11/02

これつぐです。

[#18338] オブジェクトの非同一性判定 — Ayanosuke <aya@...>

 綾乃介です。

13 messages 1999/11/03

[#18539] [book] $*, etc. — Yasuhiro Fukuma <yasuf@...>

福間@福岡 です。

44 messages 1999/11/11

[#18580] — tokoma@... (中川 誠)

中川です。

44 messages 1999/11/14
[#18619] build on alpha — Go Nakagawa <nakagawa@...> 1999/11/15

もとの質問のかたとは別の中川です。

[#18737] Re: build on alpha — tokoma@... (中川 誠) 1999/11/18

中川です。

[#19144] Re: build on alpha — tokoma@... (中川 誠) 1999/12/04

中川です。長文で失礼します。

[#19341] Re: build on alpha — tokoma@... (中川 誠) 1999/12/09

中川です。

[#19344] Re: build on alpha — matz@... (Yukihiro Matsumoto) 1999/12/09

まつもと ゆきひろです

[#19400] Re: build on alpha — tokoma@... (中川 誠) 1999/12/10

中川です。

[#19426] Re: build on alpha — EGUCHI Osamu <eguchi@...> 1999/12/11

えぐち@エスアンドイー です。

[#19459] Re: build on alpha — tokoma@... (中川 誠) 1999/12/13

中川です。

[#19461] Re: build on alpha — EGUCHI Osamu <eguchi@...> 1999/12/13

えぐち@エスアンドイー です。

[#19506] Re: build on alpha — tokoma@... (中川 誠) 1999/12/14

中川です。

[#19520] Re: build on alpha — EGUCHI Osamu <eguchi@...> 1999/12/15

えぐち@エスアンドイー です。

[#19522] Re: build on alpha — matz@... (Yukihiro Matsumoto) 1999/12/15

まつもと ゆきひろです

[#19543] Re: build on alpha — EGUCHI Osamu <eguchi@...> 1999/12/15

えぐち@エスアンドイー です。

[#19562] Re: build on alpha — tokoma@... (中川 誠) 1999/12/15

中川です。

[#19569] Re: build on alpha — EGUCHI Osamu <eguchi@...> 1999/12/16

えぐち@エスアンドイー です。

[#19592] Re: build on alpha — tokoma@... (中川 誠) 1999/12/16

中川です。

[#18637] constant? — Kazuhiro Yoshida <moriq.kazuhiro@...>

もりきゅうです。

20 messages 1999/11/16
[#18640] Re: constant? — WATANABE Hirofumi <Hirofumi.Watanabe@...> 1999/11/16

わたなべです.

[#18650] Re: constant? — Kazuhiro Yoshida <moriq.kazuhiro@...> 1999/11/16

もりきゅうです。

[#18657] Re: constant? — matz@... (Yukihiro Matsumoto) 1999/11/16

まつもと ゆきひろです

[#18709] ADO にて datetime 型の取得 — Takashi SHIODA <tsio@...>

塩田です。

18 messages 1999/11/18
[#18779] Re: ADO にて datetime 型の取得 — Masaki Suketa<CQN02273@...> 1999/11/20

助田です.

[#18802] Re: ADO にて datetime 型の取得 — Takashi SHIODA <tsio@...> 1999/11/21

オレンジソフト塩田です。

[#18712] Re: header output in eruby — TAKEUCHi Kahori <take-k@...>

たけうちです。

16 messages 1999/11/18
[#18716] Re: header output in eruby — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/11/18

なひです.

[#18830] mod_ruby-0.1.4 — TAKAHASHI Masayoshi <maki@...>

高橋征義です。

16 messages 1999/11/22

[#18853] initializer polymorphism? — Takeyuki Watadani <watadani@...>

渡谷といいます。

25 messages 1999/11/23

[#18911] Re: eRuby 変換後の無駄 (?) な改行 — TAKEUCHi Kahori <take-k@...>

たけうちです。

14 messages 1999/11/25

[#18914] Ruby standard GUI framework? — Hideto ISHIBASHI <s34204@...>

石橋秀仁です。

43 messages 1999/11/25
[#18975] Re: Ruby standard GUI framework? — 中村暁史 Nakamura Akifumi <BXQ04723@...> 1999/11/27

[#19020] Re: Ruby standard GUI framework? — Hideto ISHIBASHI <s34204@...> 1999/11/29

石橋秀仁です。

[#19026] Re: Ruby standard GUI framework? — Noritsugu Nakamura <nnakamur@...> 1999/11/29

[#19081] Re: Ruby standard GUI framework? — "Hideaki Takata" <hideakit@...3.dion.ne.jp> 1999/12/01

たかたです。

[#19092] Re: Ruby standard GUI framework? — Noritsugu Nakamura <nnakamur@...> 1999/12/01

[#19112] Re: Ruby standard GUI framework? — 中村暁史 Nakamura Akifumi <BXQ04723@...> 1999/12/02

[#19131] Re: Ruby standard GUI framework? — Noritsugu Nakamura <nnakamur@...> 1999/12/03

[#18948] 他言語との比較 — とみたまさひろ <tommy@...>

とみたです。

18 messages 1999/11/26

[ruby-list:18731] Re: Ruby/Gtk Tutorial; Toolbar

From: SUGIHARA Hiroshi <maili31s@...>
Date: 1999-11-18 14:42:28 UTC
List: ruby-list #18731
Hi, 

Now I've translated chapter toolbar of the Ruby/GTK documentation
in <URL:http://ruby.freak.ne.jp/gtk/>. Check it out!

-- 
SUGIHARA Hiroshi
maili31s@clio.ne.jp

Ruby/Gtk Tutorial ToDo 19991119
#======================================================================
 ...skip
#======================================================================
/nextfile toolbar.html

/chap Toolbar

<u>Toolbar</u> has become standard in the recent GUI applications,
 which have a set of common-use buttons, or so.<br>
 On Gtk, the toolbar is a kind of the container widget, and it can
 place the buttons with icon and/or the other optional widgets,
 vertically or horizontally.

#----------------------------------------------------------------------
/section A sample of the toolbar

Here is a tiny sample of the toolbar. (Excuse its a-bit-small scale ;-)
<p>
/proginsert toolbar.rb

Execution result:<br>
<img src="imgs/toolbar.gif">
<p>

Illustration of the program above:<br>
<ul>
=c pix, mask = Gdk::Pixmap::create_from_xpm(window.window, nil, "test.xpm")
It generates an icon (pixmap) put on the button of the toolbar.
Only one icon is generated here and is common with all buttons,
 but actually they each wants their own icons.
=c toolbar = Gtk::Toolbar.new(Gtk::ORIENTATION_HORIZONTAL, Gtk::TOOLBAR_BOTH)
It generates a toolbar widget.
First argument desinates the orientation of the toolbar widget.
Either of the two below will be chosen: 
<ul>
<li>Gtk::ORIENTATION_HORIZONTAL (...horizontal)
<li>Gtk::ORIENTATION_VERTICAL (...vertical)
</ul>
Second argument specifies the style of the button,
 and is either of the followings:
<ul>
<li>Gtk::TOOLBAR_TEXT (...only text)
<li>Gtk::TOOLBAR_ICONS (...only icons)
<li>Gtk::TOOLBAR_BOTH (...both)
</ul>
This style is applied to the button made by following `append_item'.<br>
[Example] The case to designate Gtk::TOOLBAR_TEXT<br>
<img src="imgs/toolbar-text.gif">
=c toolbar.append_item('Open', 'Open File', nil, Gtk::Pixmap::new(pix, mask), nil) {}
It appends an item to the toolbar.
Button is the item at here.
Each of the arguments (many) have a following role; from the head, 
<ol>
<li>text on the button,
<li>string displayed as tooltips,
<li>discriminator (string) used on the tooltip;
    although `nil' should be OK,
<li>`pixmap' used for the icon,
<li>and callback `proc' at the time the button is pushed.
</ol>
`append_item' is a iterator (but it doesn't forced to iterate...), 
and it can give the callback closure as the block (it cannot skip)。
The first item `Open' is empty,
 so nothing happens when the button is pushed.
<br>
Rest two buttons can be made in the same way, while this time 
the following sentence is written in the block.<br>
<code>toolbar.set_button_relief(Gtk::RELIEF_NORMAL)</code><br>
`set_button_relief' is a method of the toolbar widget,
and change its relief style of the button on the item.<br>
<ul>
<li>Gtk::RELIEF_NORMAL (same as the normal button; default)
<li>Gtk::RELIEF_NONE (no relief)
</ul>
Push the button `Borders' or `Borderles', and 
the relief style of the item of the toolbar changes.<br>
[Example] push `Borderless' button:<br>
<img src="imgs/toolbar-borderless.gif">
</ul>

#----------------------------------------------------------------------
/section Other methods

<dl>
=d <code><b>prepend_item</b></code>(<i>text, tooltip_text, tooltip_private_text, icon, callback</i>)
=d <code><b>insert_item</b></code>(<i>text, tooltip_text, tooltip_private_text, icon, callback, pos</i>)
<dd>
`prepend_item' is almost the same as `append_item',
 but it appends the item before the location.
`insert_item' appends it on the location specified by `pos'.

=d <code><b>set_orientation</b></code>(<i>orientation</i>)
<dd>
It designates the orientation of the toolbar.
<i>orientation</i>
The argument is either of the followings:
<ul>
<li>Gtk::ORIENTATION_HORIZONTAL (...horizontal)
<li>Gtk::ORIENTATION_VERTICAL (...vertical)
</ul>
This designation will be promptly reflected on the toolbar.

=d <code><b>set_style</b></code>(<i>style</i>)
<dd>
Specify the style of the items (buttons).
The argument is either of the followings:
<ul>
<li>Gtk::TOOLBAR_TEXT (...only text)
<li>Gtk::TOOLBAR_ICONS (...only icons)
<li>Gtk::TOOLBAR_BOTH (...both)
</ul>
Each of these designations will be promptly reflected on the toolbar.

=d <code><b>set_tooltips</b></code>(<i>enable</i>)
<dd>
It designates whether tooltips should be effective or not.
The argument is either `true' or `false'.
This designation will be promptly reflected on the toolbar.

=d <code><b>append_space</b></code>
=d <code><b>prepend_space</b></code>
=d <code><b>insert_space</b></code>(<i>pos</i>)
<dd>
Each of them inserts the space as a pause of the items, where 
`append_space': before; `prepend_space': after;
`insert_space': on the specified, location.

=d <code><b>set_space_size</b></code>(<i>space_size</i>)
<dd>
It designates the size of the space by integer value.
This designation will be promptly reflected on the toolbar.

=d <code><b>set_space_style</b></code>(<i>style</i>)
<dd>
Specify the style of the spaces.
<ul>
<li>Gtk::Toolbar::SPACE_EMPTY (...empty at all)
<li>Gtk::Toolbar::SPACE_LINE (...lined)
</ul>

=d <code><b>append_widget</b></code>(<i>widget, tooltips_text, tooltips_private_text</i>)
=d <code><b>prepend_widget</b></code>(<i>widget, tooltips_text, tooltips_private_text</i>)
=d <code><b>insert_widget</b></code>(<i>widget, tooltips_text, tooltips_private_text</i>, pos)
<dd>
Add an arbitrary widget (not an item).

</dl>

#/write
#======================================================================
/nextfile gtkrc.html

In This Thread

Prev Next