<?xml version="1.0" encoding="UTF-8" ?><rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:lang="ja">
  <channel rdf:about="http://w.atwiki.jp/tutorial-memo/">
    <title>wxPythonの個人的メモ</title>
    <link>http://w.atwiki.jp/tutorial-memo/</link>
    <atom:link href="https://w.atwiki.jp/tutorial-memo/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>wxPythonの個人的メモ</description>

    <dc:language>ja</dc:language>
    <dc:date>2009-01-15T16:10:46+09:00</dc:date>
    <utime>1232003446</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/tutorial-memo/pages/17.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/tutorial-memo/pages/16.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/tutorial-memo/pages/15.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/tutorial-memo/pages/14.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/tutorial-memo/pages/1.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/tutorial-memo/pages/12.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/tutorial-memo/pages/2.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/tutorial-memo/pages/3.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/tutorial-memo/pages/4.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/tutorial-memo/pages/5.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/tutorial-memo/pages/17.html">
    <title>wx.Window</title>
    <link>https://w.atwiki.jp/tutorial-memo/pages/17.html</link>
    <description>
      &gt;wx.Window

*wx.Winow

&gt;wx.Window is a base class out of which many widgets inherit. For instance, the wx.Frame widget inherits from wx.Window. Technically it means that we can use wx.Window&#039;s methods for all descendants. We will introduce here some of it&#039;s methods.

wx.Window は多くのウィジットが内部で継承する基本となるクラスである。
例えば、wx.Frame ウィジットは wx.Window を継承している。技術的いうと、全ての子クラスがwx.Windowのメソッドを使うことができる事を意味している。
ここでその幾つかのメソッドを紹介する。

&gt;-SetTitle(string title) - Sets the window&#039;s title. Applicable only to frames and dialogs.

-SetTitle(string title) - ウインドウのタイトルを指定する。フレームとダイアログのみ。

&gt;-SetToolTip(wx.ToolTip tip) - Attaches a tooltip to the window.

-SetToolTip(wx.ToolTip tip) - ツールチップをウインドウに結びつける。

&gt;-SetSize(wx.Size size) - Sets the size of the window.

-SetSize(wx.Size size) - ウインドウサイズを指定する。

&gt;-SetPosition(wx.Point pos) - Positions the window to given coordinates

-SetPosition(wx.Point pos) - ウインドウの位置を指定する。同等な値を与えること。

&gt;-Show(show=True) - Shows or hides the window. show parameter can be True or False.

-Show(show=True) - ウインドウを表示したり隠したりする。引数は True か False。

&gt;-Move(wx.Point pos) - Moves the window to the given position.

-Move( wx.Point pos ) - ウインドウを移動する。位置を与えること。

&gt;-SetCursor(wx.StockCursor id) - Sets the window&#039;s cursor. 

-SetCursor(wx.StockCursor id) - ウインドウのカーソルを指定する。


   1 #!/usr/bin/python
   2 
   3 # simple2.py
   4 
   5 import wx
   6 
   7 app = wx.App()
   8 
   9 frame = wx.Frame(None, -1, &#039;&#039;)
  10 frame.SetToolTip(wx.ToolTip(&#039;This is a frame&#039;))
  11 frame.SetCursor(wx.StockCursor(wx.CURSOR_MAGNIFIER))
  12 frame.SetPosition(wx.Point(0,0))
  13 frame.SetSize(wx.Size(300,250))
  14 frame.SetTitle(&#039;simple2.py&#039;)
  15 frame.Show()
  16 
  17 app.MainLoop()

&gt;We create a &#039;This is a frame&#039; tooltip. The cursor is set to a magnifier cursor. Possible cursor id&#039;s: are listed below
&gt;We position the window to the upper left corner and size it to 300x250 pixels. Title is set to &#039;simple2.py&#039;. 


&#039;This is a frame&#039; というツールチップを作成した。カーソルは虫眼鏡を指定。利用可能なカーソルのidは[[こちら&gt;http://wiki.wxpython.org/AnotherTutorial#head-26c168844e79da5329d8463baa7511fff18a6c5c]]
。

ウインドウの位置は左上の角を、サイズは300×250ピクセルとした。タイトルは&#039;simple2.py&#039;である。    </description>
    <dc:date>2009-01-15T16:10:46+09:00</dc:date>
    <utime>1232003446</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/tutorial-memo/pages/16.html">
    <title>First Steps</title>
    <link>https://w.atwiki.jp/tutorial-memo/pages/16.html</link>
    <description>
      &gt;First Steps

最初の一歩

&gt;We start with a simple example.

次のサンプルから初めよう。

   1 #!/usr/bin/python
   2 
   3 # simple.py
   4 
   5 import wx
   6 
   7 app = wx.App()
   8 
   9 frame = wx.Frame(None, -1, &#039;simple.py&#039;)
  10 frame.Show()
  11 
  12 app.MainLoop()

&gt;In every wxPython application, we must import the wx library.

全てのwxPythonアプリケーションは必ずwx ライブラリをインポートしなければならない。

 import wx

&gt;An application object is created by initiating class wx.App.

アプリケーションのオブジェクトがwx.Appクラスの初期化にて作成される 。

 app = wx.App()

&gt;We create a frame widget. The window pops up only if we call Show() method on a widget.

フレームウィジットを作成する。ウインドウはウィジットのShow関数を呼んだときだけ出現する。

 frame = wx.Frame(None, -1, &quot;simple.py&quot;)
 frame.Show()

&gt;The last line enters a Mainloop. A mainloop is an endless cycle that catches up all events coming up to your application.
&gt;It is an integral part of any windows GUI application.

最後の行でメインループに入る。メインループとはずっとアプリケーションに送られる全てのイベントをキャッチするサイクルのことだ。

ウインドウを使うGUIアプリケーションに必要な部分である。

&gt;app.MainLoop()

&gt;Although the code is very simple, you can do a lot of things with your window.
&gt;You can maximize it, minimize it, move it, resize it. All these things have been already done. 

コードは随分とシンプルだが、ウインドウは沢山のことができる。

最大化、最小化、動かしたり、リサイズしたり。

それらは既に組込まれている。    </description>
    <dc:date>2009-01-15T15:44:17+09:00</dc:date>
    <utime>1232001857</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/tutorial-memo/pages/15.html">
    <title>wxPython API</title>
    <link>https://w.atwiki.jp/tutorial-memo/pages/15.html</link>
    <description>
      &#039;&#039;wxPython API&#039;&#039;

&gt;wxPython API is a set of functions and widgets. Widgets are essential building blocks of a GUI application. 
&gt;Under Windows widgets are calles controls. 
&gt;We can roughly divide programmers into two groups. They code applications or libraries.
&gt;In our case, wxPython is a library that is used by application programmers to code applications.
&gt;Technically, wxPython is a wrapper over a C++ GUI API called wxWidgets.
&gt;So it is not a native API. e.g. not written directly in Python.
&gt;The only native GUI library for an interpreted language that I know is Java&#039;s Swing library.

Wxpython API は関数とウィジットのセットである。ウィジットは肝心な GUI アプリケーションの一部である。

Windows環境下では、ウィジットはコントロールを呼んでいる。

だいたい、アプリケーションとライブラリの二つのグループに分けることができるだろう。

wxPython はアプリケーション作成者がアプリケーションを記述する時に使うライブラリである。

技術的には wxPython は wxWidgets の C++ GUI API を呼ぶラッパーだ。

そう、ネイティブな API ではない。直接 Python で書かれていない。

(?)インタプリタ言語でネイティブ GUI ライブラリなものは、私の知る限り Java の Swing ライブラリのみである。


&gt;In wxPython we have lot&#039;s of widgets. These can be divided into some logical groups.

wxPython には沢山のウィジットがある。論理的なグループに分けてみよう。


&#039;&#039;Base Widgets&#039;&#039;

ベース ウィジット

&gt;These widgets provide basic functionality for derived widgets. They are usually not used directly.

これらのウィジットは基本的な機能をウィジットに付与している。ただ、普通は直接使わない。

-wx.Window
-wx.Control
-wx.ControlWithItem 

&#039;&#039;Top level Widgets&#039;&#039;

トップレベル ウィジット

&gt;These widgets exist independently of each other.

これらのウィジットはそれぞれ独立している。

-wx.Frame
-wx.MDIParentFrame
-wx.MDIChildFrame
-wx.Dialog
-wx.PopupWindow 

&#039;&#039;Containers&#039;&#039;

コンテナ

&gt;Containers contain other widgets. These widgets are called children.

コンテナは他のウィジットを収納できる。収納されたウィジットは「子ウィジット」と呼ばれる。

-wx.Panel
-wx.Notebook
-wx.ScrolledWindow
-wx.SplitterWindow 


&#039;&#039;Dynamic Widgets&#039;&#039;

ダイナミック ウィジット

&gt;These widgets can be edited by users.

これらのウィジットはユーザーによって編集される。

-wx.Button
-wx.BitmapButton
-wx.Choice
-wx.ComboBox
-wx.CheckBox
-wx.Grid
-wx.ListBox
-wx.RadioBox
-wx.RadioButton
-wx.ScrollBar
-wx.SpinButton
-wx.SpinCtrl
-wx.Slider
-wx.TextCtrl
-wx.ToggleButton 

&#039;&#039;Static Widgets&#039;&#039;

スタティック ウィジット

&gt;These widgets display informatin. They cannot be edited by user.

これらのウィジットは情報を表示する。これらはユーザーが編集できない。

-wx.Gauge
-wx.StaticText
-wx.StaticBitmap
-wx.StaticLine
-wx.StaticBox 


&#039;&#039;Other Widgets&#039;&#039;

その他のウィジット

&gt;These widgets implement statusbar, toolbar and menubar in an application.

これらのウィジットはアプリケーションのステータスバーやツールバー、メニューバーになる。

-wx.MenuBar
-wx.ToolBar
-wx.StatusBar    </description>
    <dc:date>2009-01-08T23:13:37+09:00</dc:date>
    <utime>1231424017</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/tutorial-memo/pages/14.html">
    <title>前書き</title>
    <link>https://w.atwiki.jp/tutorial-memo/pages/14.html</link>
    <description>
      Foreword

前書き

The purpose of this tutorial is to get you started with the wxPython toolkit, from the basics to the advanced topics. It has lots of code examples, not much talking. After that, you will be able to dig in yourself.

このチュートリアルの目的は、あなたに 基本的な事から先進的な事を通してwxPython ツールキットのスタートをしてもらうことだ。沢山のサンプルコードを載せている。これを読んだあとは自身で掘りさげて行けるだろう。

    * mailing list
    * reference book
    * source code of wxPython applications
    * /home/vronskij/bin/wxPython/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx - the ultimate resource, on my Linux box 

There are three decent toolkits for the python programming language:

Pythonには三つのツールキットがある。

    * wxPython
    * PyQt
    * PyGTK 

Note that this tutorial is done on Linux. Some scripts do not work correctly on windows.

注記:このチュートリアルはLinuxで実行された。いくつかのスクリプトはWindows上では動かないかもしれない。

Icons used in this tutorial: icons.tgz Images used in this tutorial: images.tgz

jan bodnar 2005 - 2007

status update. (april 2007) All my work on wxPython tutorial has been moved to my website http://www.zetcode.com/wxpython here I shall not add any more examples. If I find myself some time, I will do some polishing.     </description>
    <dc:date>2009-01-08T19:28:28+09:00</dc:date>
    <utime>1231410508</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/tutorial-memo/pages/1.html">
    <title>トップページ</title>
    <link>https://w.atwiki.jp/tutorial-memo/pages/1.html</link>
    <description>
      このページは私の備忘録です。
それ以外の目的はありません。

[[このへん&gt;http://wiki.wxpython.org/AnotherTutorial]]を訳してます。
簡単な英語なので意味ないと思いますが。

頭悪いので誤訳も多いと思います。    </description>
    <dc:date>2009-01-08T01:32:34+09:00</dc:date>
    <utime>1231345954</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/tutorial-memo/pages/12.html">
    <title>Dialog</title>
    <link>https://w.atwiki.jp/tutorial-memo/pages/12.html</link>
    <description>
      Dialogs

In wxPython you can use predefined dialogs or create your own dialogs. You can also create dialog based applications.

The example shows a skeleton of a dialog based application in wxPython.


ダイアログ

wxPythonにおいて、あなたはあらかじめ定義されているダイアログを使ったり、自身でダイアログを作ることができる。
ダイアログベースのアプリケーションを作ることもできる。

(wxPythonにおいて)ダイアログベースのアプリケーションの骨格を示す。

   1 #!/usr/bin/python
   2 # simpledialog.py
   3 
   4 import wx
   5 
   6 class MyDialog(wx.Dialog):
   7     def __init__(self, parent, id, title):
   8         wx.Dialog.__init__(self, parent, id, title)
   9 
  10 class MyApp(wx.App):
  11     def OnInit(self):
  12         dia = MyDialog(None, -1, &quot;simpledialog.py&quot;)
  13         dia.ShowModal()
  14         dia.Destroy()
  15         return True
  16 
  17 app = MyApp(0)
  18 app.MainLoop()


Notice that you cannot resize the dialog window. The Destroy() method is necessary. It deletes the dialog from the memory. Otherwise, the script would not exit properly. 

注意する点として、ダイアログウィンドウはリサイズできない。Destroy()関数も必要だ。Destroy関数はメモリーからダイアログを消去する。それがないと、そのスクリプトはちゃんと終了しないかもしれない。

There are two types of dialogs. Modal and modeless. Modal dialog does not allow a user to work with the rest of the application until it is destroyed. Modal dialogs are created with the ShowModal() method. Dialogs are modeless when called with Show(). 

モーダルダイアログとモードレスダイアログという二種類のダイアログがある。
モーダルダイアログはダイアログが消滅するまでそのアプリケーションをユーザーが操作するのを許さない。
モーダルダイアログはShowModal()関数で作成する。
Show()l関数が呼ばれた時はモードレスダイアログとなる。    </description>
    <dc:date>2009-01-08T01:16:21+09:00</dc:date>
    <utime>1231344981</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/tutorial-memo/pages/2.html">
    <title>メニュー</title>
    <link>https://w.atwiki.jp/tutorial-memo/pages/2.html</link>
    <description>
      **メニュー
-[[トップページ]]
-[[プラグイン紹介&gt;プラグイン]]
-[[まとめサイト作成支援ツール]]
-[[メニュー]]
-[[メニュー2]]

----

**リンク
-[[@wiki&gt;&gt;http://atwiki.jp]]
-[[@wikiご利用ガイド&gt;&gt;http://atwiki.jp/guide/]]

**他のサービス
-[[無料ホームページ作成&gt;&gt;http://atpages.jp]]
-[[無料ブログ作成&gt;&gt;http://atword.jp]]
-[[2ch型掲示板レンタル&gt;&gt;http://atchs.jp]]
-[[無料掲示板レンタル&gt;&gt;http://atbbs.jp]]
-[[お絵かきレンタル&gt;&gt;http://atpaint.jp/]]
-[[無料ソーシャルプロフ&gt;&gt;http://sns.atfb.jp/]]

// リンクを張るには &quot;[&quot; 2つで文字列を括ります。
// &quot;&gt;&quot; の左側に文字、右側にURLを記述するとリンクになります


//**更新履歴
//#recent(20)

&amp;link_editmenu(text=ここを編集)
    </description>
    <dc:date>2009-01-08T00:55:16+09:00</dc:date>
    <utime>1231343716</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/tutorial-memo/pages/3.html">
    <title>右メニュー</title>
    <link>https://w.atwiki.jp/tutorial-memo/pages/3.html</link>
    <description>
      **更新履歴
#recent(20)


&amp;link_editmenu2(text=ここを編集)
    </description>
    <dc:date>2009-01-08T00:55:16+09:00</dc:date>
    <utime>1231343716</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/tutorial-memo/pages/4.html">
    <title>プラグイン/ニュース</title>
    <link>https://w.atwiki.jp/tutorial-memo/pages/4.html</link>
    <description>
      * ニュース
@wikiのwikiモードでは
 #news(興味のある単語)
と入力することで、あるキーワードに関連するニュース一覧を表示することができます
詳しくはこちらをご覧ください。
＝＞http://atwiki.jp/guide/17_174_ja.html


-----


たとえば、#news(wiki)と入力すると以下のように表示されます。


#news(wiki)
    </description>
    <dc:date>2009-01-08T00:55:16+09:00</dc:date>
    <utime>1231343716</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/tutorial-memo/pages/5.html">
    <title>まとめサイト作成支援ツール</title>
    <link>https://w.atwiki.jp/tutorial-memo/pages/5.html</link>
    <description>
      * まとめサイト作成支援ツールについて
@wikiには[[まとめサイト作成を支援するツール&gt;&gt;http://atwiki.jp/matome/]]があります。
また、
 #matome_list
と入力することで、注目の掲示板が一覧表示されます。

利用例）#matome_listと入力すると下記のように表示されます
#matome_list
    </description>
    <dc:date>2009-01-08T00:55:16+09:00</dc:date>
    <utime>1231343716</utime>
  </item>
  </rdf:RDF>
