<?xml version="1.0"?>
<!-- generated by wxGlade 1.0.4 on Tue Apr 25 15:07:09 2023 -->
<application class="SimpleDatabase" encoding="UTF-8" for_version="3.0" header_extension=".h" indent_amount="4" indent_symbol="space" is_template="0" language="python" mark_blocks="1" name="SimpleDatabase" option="0" overwrite="1" path="./wxglade_out.py" source_extension=".cpp" top_window="View" use_gettext="0" use_new_namespace="1">
<object class="View" name="View" base="EditFrame">
<extracode>from pubsub import pub\nfrom simple_database import Env, install_package, interp\nimport sys\n\nclass Controller(object):\n def __init__(self):\n pub.subscribe(self.read, "Controller")\n self.table = {"OnNewFile": "new_file",\n "OnOpen": "open_file",\n "OnSaveFile": "save_file",\n "OnSaveFileAs": "save_file_as",\n "OnQuit": "quit",\n "OnAddCD": "insert_value",\n "Delete": "delete"}\n def read(self, x, env):\n pub.sendMessage("Model.eval",\n x = [self.table[x[0]]] + x[1:],\n env = env)\n\nclass Model(object):\n def __init__(self):\n pub.subscribe(self.eval, "Model")\n def eval(self, x, env):\n pub.sendMessage("View.SetProperties", env = interp(x, env))\n\n</extracode>
<extracode_pre>self.env = Env(install_package())</extracode_pre>
<extracode_post>pub.subscribe(self.SetProperties, 'View')</extracode_post>
<size>400, 300</size>
<title>Simple Database</title>
<style>wxDEFAULT_FRAME_STYLE</style>
<menubar>1</menubar>
<object class="wxMenuBar" name="frame_menubar" base="EditMenuBar">
<menus>
<menu label="ファイル" name="">
<item>
<label>新規作成 Ctrl+N</label>
<handler>lambda event: OnNewFile(self)</handler>
</item>
<item>
<label>開く... Ctrl+O</label>
<handler>lambda event: OnOpen(self)</handler>
</item>
<item>
<label>保存 Ctrl+S</label>
<handler>lambda event: pub.sendMessage('Controller.read', x = ['OnSaveFile'], env = self.env)</handler>
</item>
<item>
<label>名前を付けて保存... Shift+Ctrl+S</label>
<handler>lambda event: OnSaveAs(self)</handler>
</item>
<item>
<label>Quit Ctrl+Q</label>
<handler>lambda event: pub.sendMessage('Controller.read', x = ['OnQuit'], env = self.env)</handler>
</item>
</menu>
</menus>
</object>
<object class="wxBoxSizer" name="sizer_1" base="EditBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>0</option>
<border>0</border>
<object class="wxButton" name="AddCD" base="EditButton">
<events>
<handler event="EVT_BUTTON">lambda event: AddCDDialog(self).ShowModal()</handler>
</events>
<label>AddCD</label>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<border>0</border>
<flag>wxEXPAND</flag>
<object class="wxListCtrl" name="list_ctrl_1" base="EditListCtrl">
<events>
<handler event="EVT_LIST_ITEM_RIGHT_CLICK">rclick</handler>
</events>
<style>wxLC_REPORT|wxLC_HRULES|wxLC_VRULES</style>
<columns>
<column size="-1">タイトル</column>
<column size="-1">アーティスト</column>
<column size="-1">レーティング</column>
<column size="-1">リップ</column>
</columns>
<rows_number>10</rows_number>
</object>
</object>
</object>
</object>
<object class="AddCDDialog" name="AddCDDialog" base="EditDialog">
<extracode_pre>self.env = args[0].env</extracode_pre>
<title>Add CD</title>
<style>wxDEFAULT_DIALOG_STYLE</style>
<affirmative>button_OK</affirmative>
<escape>button_CANCEL</escape>
<object class="wxBoxSizer" name="sizer_1" base="EditBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>1</option>
<border>0</border>
<flag>wxEXPAND</flag>
<object class="wxGridSizer" name="grid_sizer_1" base="EditGridSizer">
<rows>4</rows>
<cols>2</cols>
<vgap>0</vgap>
<hgap>0</hgap>
<object class="sizeritem">
<option>0</option>
<border>0</border>
<flag>wxALIGN_CENTER</flag>
<object class="wxStaticText" name="Title" base="EditStaticText">
<label>タイトル</label>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>0</border>
<flag>wxALIGN_CENTER</flag>
<object class="wxTextCtrl" name="text_ctrl_1" base="EditTextCtrl">
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>0</border>
<flag>wxALIGN_CENTER</flag>
<object class="wxStaticText" name="Artist" base="EditStaticText">
<label>アーティスト</label>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>0</border>
<flag>wxALIGN_CENTER</flag>
<object class="wxTextCtrl" name="text_ctrl_2" base="EditTextCtrl">
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>0</border>
<flag>wxALIGN_CENTER</flag>
<object class="wxStaticText" name="Rating" base="EditStaticText">
<label>レーティング</label>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>0</border>
<flag>wxALIGN_CENTER</flag>
<object class="wxTextCtrl" name="text_ctrl_3" base="EditTextCtrl">
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>0</border>
<flag>wxALIGN_CENTER</flag>
<object class="wxStaticText" name="Ripped" base="EditStaticText">
<label>リップ</label>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>0</border>
<flag>wxALIGN_CENTER</flag>
<object class="wxTextCtrl" name="text_ctrl_4" base="EditTextCtrl">
</object>
</object>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>4</border>
<flag>wxALL|wxALIGN_RIGHT</flag>
<object class="wxStdDialogButtonSizer" name="sizer_2" base="EditStdDialogButtonSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>0</option>
<border>0</border>
<object class="wxButton" name="button_OK" base="EditButton">
<events>
<handler event="EVT_BUTTON">lambda event: self.OnAddCD()</handler>
</events>
<label>OK</label>
<default>1</default>
<stockitem>OK</stockitem>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<border>0</border>
<object class="wxButton" name="button_CANCEL" base="EditButton">
<events>
<handler event="EVT_BUTTON">lambda event: self.Destroy()</handler>
</events>
<label>Cancel</label>
<stockitem>CANCEL</stockitem>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="NewFile" name="NewFile" base="EditDialog">
<extracode>def OnNewFile(self):\n with NewFile(self) as fileDialog:\n if fileDialog.ShowModal() == wx.ID_CANCEL:\n return\n pub.sendMessage("Controller.read",\n x = ["OnNewFile", fileDialog.GetPath()],\n env = self.env)</extracode>
<extracode_pre>self.env = args[0].env</extracode_pre>
<title>新規作成</title>
<style>wxDEFAULT_DIALOG_STYLE</style>
</object>
<object class="OpenFile" name="OpenFile" base="EditDialog">
<extracode>def OnOpen(self):\n with OpenFile(self) as fileDialog:\n if fileDialog.ShowModal() == wx.ID_CANCEL:\n return\n pub.sendMessage("Controller.read",\n x = ["OnOpen", fileDialog.GetPath()],\n env = self.env)</extracode>
<extracode_pre>self.env = args[0].env</extracode_pre>
<title>開く...</title>
<style>wxDEFAULT_DIALOG_STYLE</style>
</object>
<object class="SaveFileAs" name="SaveFileAs" base="EditDialog">
<extracode>def OnSaveFileAs(self):\n with SaveFileAs(self) as fileDialog:\n if fileDialog.ShowModal() == wx.ID_CANCEL:\n return\n pub.sendMessage("Controller.read",\n x = ["OnSaveFileAs", fileDialog.GetPath()],\n env = self.env)</extracode>
<extracode_pre>self.env = args[0].env</extracode_pre>
<title>名前を付けて保存...</title>
<style>wxDEFAULT_DIALOG_STYLE</style>
</object>
</application>