On-screen character catalog added

This commit is contained in:
Simon Rozman 2016-05-05 15:37:44 +02:00
parent 2a6212d19d
commit f9ef646f22
16 changed files with 1097 additions and 85 deletions

View File

@ -153,7 +153,7 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
<object class="separator" expanded="0"> <object class="separator" expanded="0">
<property name="name">m_separatorProgram1</property> <property name="name">separator</property>
<property name="permission">none</property> <property name="permission">none</property>
</object> </object>
<object class="wxMenuItem" expanded="0"> <object class="wxMenuItem" expanded="0">
@ -222,7 +222,7 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
<object class="separator" expanded="0"> <object class="separator" expanded="0">
<property name="name">m_separatorEdit1</property> <property name="name">separator1</property>
<property name="permission">none</property> <property name="permission">none</property>
</object> </object>
<object class="wxMenuItem" expanded="0"> <object class="wxMenuItem" expanded="0">
@ -241,7 +241,7 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
<object class="separator" expanded="0"> <object class="separator" expanded="0">
<property name="name">m_separatorEdit2</property> <property name="name">separator2</property>
<property name="permission">none</property> <property name="permission">none</property>
</object> </object>
<object class="wxMenuItem" expanded="0"> <object class="wxMenuItem" expanded="0">
@ -326,7 +326,7 @@
<property name="help">Toggle edit toolbar</property> <property name="help">Toggle edit toolbar</property>
<property name="id">wxID_TOOLBAR_EDIT</property> <property name="id">wxID_TOOLBAR_EDIT</property>
<property name="kind">wxITEM_CHECK</property> <property name="kind">wxITEM_CHECK</property>
<property name="label">Edit Toolbar</property> <property name="label">&amp;Edit Toolbar</property>
<property name="name">m_menuItemToolbarEdit</property> <property name="name">m_menuItemToolbarEdit</property>
<property name="permission">none</property> <property name="permission">none</property>
<property name="shortcut"></property> <property name="shortcut"></property>
@ -341,7 +341,7 @@
<property name="help">Toggle compose toolbar</property> <property name="help">Toggle compose toolbar</property>
<property name="id">wxID_TOOLBAR_COMPOSE</property> <property name="id">wxID_TOOLBAR_COMPOSE</property>
<property name="kind">wxITEM_CHECK</property> <property name="kind">wxITEM_CHECK</property>
<property name="label">Compose Toolbar</property> <property name="label">&amp;Compose Toolbar</property>
<property name="name">m_menuItemToolbarCompose</property> <property name="name">m_menuItemToolbarCompose</property>
<property name="permission">none</property> <property name="permission">none</property>
<property name="shortcut"></property> <property name="shortcut"></property>
@ -349,6 +349,25 @@
<event name="OnMenuSelection"></event> <event name="OnMenuSelection"></event>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
<object class="separator" expanded="0">
<property name="name">separator</property>
<property name="permission">none</property>
</object>
<object class="wxMenuItem" expanded="0">
<property name="bitmap"></property>
<property name="checked">0</property>
<property name="enabled">1</property>
<property name="help">Toggle character catalog panel</property>
<property name="id">wxID_PANEL_CHRGRPS</property>
<property name="kind">wxITEM_CHECK</property>
<property name="label">Character Catalo&amp;g</property>
<property name="name">m_menuItemPanelChrGrps</property>
<property name="permission">none</property>
<property name="shortcut"></property>
<property name="unchecked_bitmap"></property>
<event name="OnMenuSelection"></event>
<event name="OnUpdateUI"></event>
</object>
</object> </object>
<object class="wxMenu" expanded="0"> <object class="wxMenu" expanded="0">
<property name="label">&amp;Help</property> <property name="label">&amp;Help</property>
@ -728,6 +747,86 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="CustomControl" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">1</property>
<property name="aui_name">panelChrGrp</property>
<property name="aui_position"></property>
<property name="aui_row">1</property>
<property name="best_size">150,200</property>
<property name="bg"></property>
<property name="caption">Character Catalog</property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="class">wxZRColaCharacterCatalogPanel</property>
<property name="close_button">1</property>
<property name="construction">m_panelChrCat = new wxZRColaCharacterCatalogPanel( this );&#x0A;</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="declaration">wxZRColaCharacterCatalogPanel* m_panelChrCat;</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="include">class wxZRColaCharacterCatalogPanel;</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size">100,100</property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_panelChrCat</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="settings"></property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
<object class="CustomControl" expanded="0"> <object class="CustomControl" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
@ -759,7 +858,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="include">#include &quot;zrcolacomppnl.h&quot;</property> <property name="include">class wxZRColaComposerPanel;</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -771,7 +870,7 @@
<property name="pane_border">0</property> <property name="pane_border">0</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
<property name="permission">protected</property> <property name="permission">public</property>
<property name="pin_button">0</property> <property name="pin_button">0</property>
<property name="pos"></property> <property name="pos"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
@ -1136,7 +1235,7 @@
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
<property name="permission">protected</property> <property name="permission">public</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
@ -1602,7 +1701,7 @@
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
<property name="permission">protected</property> <property name="permission">public</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
@ -1846,5 +1945,295 @@
</object> </object>
</object> </object>
</object> </object>
<object class="Panel" expanded="0">
<property name="aui_managed">0</property>
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="event_handler">impl_virtual</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">wxZRColaCharacterCatalogPanelBase</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name">ZRColaCharacterCatalog</property>
<property name="window_style">wxTAB_TRAVERSAL</property>
<event name="OnAuiFindManager"></event>
<event name="OnAuiPaneButton"></event>
<event name="OnAuiPaneClose"></event>
<event name="OnAuiPaneMaximize"></event>
<event name="OnAuiPaneRestore"></event>
<event name="OnAuiRender"></event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnInitDialog"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
<object class="wxBoxSizer" expanded="0">
<property name="minimum_size"></property>
<property name="name">bSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxChoice" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices"></property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_choice</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnChoice">OnChoice</event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxGrid" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="autosize_cols">0</property>
<property name="autosize_rows">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="cell_bg">wxSYS_COLOUR_BTNFACE</property>
<property name="cell_font">00 ZRCola,90,90,20,70,0</property>
<property name="cell_horiz_alignment">wxALIGN_CENTRE</property>
<property name="cell_text"></property>
<property name="cell_vert_alignment">wxALIGN_CENTRE</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="col_label_horiz_alignment">wxALIGN_CENTRE</property>
<property name="col_label_size">0</property>
<property name="col_label_values"></property>
<property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
<property name="cols">0</property>
<property name="column_sizes"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_col_move">0</property>
<property name="drag_col_size">0</property>
<property name="drag_grid_size">0</property>
<property name="drag_row_size">0</property>
<property name="editing">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="grid_line_color"></property>
<property name="grid_lines">0</property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label_bg"></property>
<property name="label_font"></property>
<property name="label_text"></property>
<property name="margin_height">0</property>
<property name="margin_width">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">35,35</property>
<property name="moveable">1</property>
<property name="name">m_grid</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="row_label_horiz_alignment">wxALIGN_CENTRE</property>
<property name="row_label_size">0</property>
<property name="row_label_values"></property>
<property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
<property name="row_sizes"></property>
<property name="rows">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass">wxZRColaCharGrid; zrcolachrgrid.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnGridCellChange"></event>
<event name="OnGridCellLeftClick">OnGridClick</event>
<event name="OnGridCellLeftDClick"></event>
<event name="OnGridCellRightClick"></event>
<event name="OnGridCellRightDClick"></event>
<event name="OnGridCmdCellChange"></event>
<event name="OnGridCmdCellLeftClick"></event>
<event name="OnGridCmdCellLeftDClick"></event>
<event name="OnGridCmdCellRightClick"></event>
<event name="OnGridCmdCellRightDClick"></event>
<event name="OnGridCmdColSize"></event>
<event name="OnGridCmdEditorCreated"></event>
<event name="OnGridCmdEditorHidden"></event>
<event name="OnGridCmdEditorShown"></event>
<event name="OnGridCmdLabelLeftClick"></event>
<event name="OnGridCmdLabelLeftDClick"></event>
<event name="OnGridCmdLabelRightClick"></event>
<event name="OnGridCmdLabelRightDClick"></event>
<event name="OnGridCmdRangeSelect"></event>
<event name="OnGridCmdRowSize"></event>
<event name="OnGridCmdSelectCell"></event>
<event name="OnGridColSize"></event>
<event name="OnGridEditorCreated"></event>
<event name="OnGridEditorHidden"></event>
<event name="OnGridEditorShown"></event>
<event name="OnGridLabelLeftClick"></event>
<event name="OnGridLabelLeftDClick"></event>
<event name="OnGridLabelRightClick"></event>
<event name="OnGridLabelRightDClick"></event>
<event name="OnGridRangeSelect"></event>
<event name="OnGridRowSize"></event>
<event name="OnGridSelectCell"></event>
<event name="OnKeyDown">OnGridKeyDown</event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object> </object>
</wxFormBuilder_Project> </wxFormBuilder_Project>

View File

@ -81,6 +81,8 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile> </ClCompile>
<ClCompile Include="zrcolaapp.cpp" /> <ClCompile Include="zrcolaapp.cpp" />
<ClCompile Include="zrcolachrcatpnl.cpp" />
<ClCompile Include="zrcolachrgrid.cpp" />
<ClCompile Include="zrcolacomppnl.cpp" /> <ClCompile Include="zrcolacomppnl.cpp" />
<ClCompile Include="zrcolafrm.cpp" /> <ClCompile Include="zrcolafrm.cpp" />
<ClCompile Include="zrcolagui.cpp" /> <ClCompile Include="zrcolagui.cpp" />
@ -89,6 +91,8 @@
<ItemGroup> <ItemGroup>
<ClInclude Include="stdafx.h" /> <ClInclude Include="stdafx.h" />
<ClInclude Include="zrcolaapp.h" /> <ClInclude Include="zrcolaapp.h" />
<ClInclude Include="zrcolachrcatpnl.h" />
<ClInclude Include="zrcolachrgrid.h" />
<ClInclude Include="zrcolacomppnl.h" /> <ClInclude Include="zrcolacomppnl.h" />
<ClInclude Include="zrcolafrm.h" /> <ClInclude Include="zrcolafrm.h" />
<ClInclude Include="zrcolagui.h" /> <ClInclude Include="zrcolagui.h" />

View File

@ -37,6 +37,12 @@
<ClCompile Include="zrcolakeyhndlr.cpp"> <ClCompile Include="zrcolakeyhndlr.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="zrcolachrgrid.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="zrcolachrcatpnl.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="stdafx.h"> <ClInclude Include="stdafx.h">
@ -57,6 +63,12 @@
<ClInclude Include="zrcolakeyhndlr.h"> <ClInclude Include="zrcolakeyhndlr.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="zrcolachrgrid.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="zrcolachrcatpnl.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="res\zrcola.ico"> <None Include="res\zrcola.ico">

View File

@ -1,8 +1,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ZRCola\n" "Project-Id-Version: ZRCola\n"
"POT-Creation-Date: 2016-05-03 13:27+0200\n" "POT-Creation-Date: 2016-05-05 15:23+0200\n"
"PO-Revision-Date: 2016-05-03 13:27+0200\n" "PO-Revision-Date: 2016-05-05 15:23+0200\n"
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n" "Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n"
"Language-Team: Amebis, d. o. o., Kamnik <info@amebis.si>\n" "Language-Team: Amebis, d. o. o., Kamnik <info@amebis.si>\n"
"Language: sl_SI\n" "Language: sl_SI\n"
@ -17,12 +17,12 @@ msgstr ""
"X-Poedit-KeywordsList: _\n" "X-Poedit-KeywordsList: _\n"
"X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPath-0: .\n"
#: zrcolafrm.cpp:93 #: zrcolafrm.cpp:91
#, c-format #, c-format
msgid "Select %s language for decomposition" msgid "Select %s language for decomposition"
msgstr "Izberi jezik %s za razstavljanje" msgstr "Izberi jezik %s za razstavljanje"
#: zrcolafrm.cpp:104 #: zrcolafrm.cpp:110
msgid "" msgid ""
"ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality " "ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality "
"will not be available." "will not be available."
@ -30,11 +30,11 @@ msgstr ""
"ZRColine bližnjice na tipkovnici Win+F5 ni mogoče registrirati. Nekaj " "ZRColine bližnjice na tipkovnici Win+F5 ni mogoče registrirati. Nekaj "
"funkcionalnosti ne bo na voljo." "funkcionalnosti ne bo na voljo."
#: zrcolafrm.cpp:104 zrcolafrm.cpp:106 #: zrcolafrm.cpp:110 zrcolafrm.cpp:112
msgid "Warning" msgid "Warning"
msgstr "Opozorilo" msgstr "Opozorilo"
#: zrcolafrm.cpp:106 #: zrcolafrm.cpp:112
msgid "" msgid ""
"ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality " "ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality "
"will not be available." "will not be available."
@ -42,11 +42,11 @@ msgstr ""
"ZRColine bližnjice na tipkovnici Win+F6 ni mogoče registrirati. Nekaj " "ZRColine bližnjice na tipkovnici Win+F6 ni mogoče registrirati. Nekaj "
"funkcionalnosti ne bo na voljo." "funkcionalnosti ne bo na voljo."
#: zrcolafrm.cpp:174 #: zrcolafrm.cpp:187
msgid "Start ZRCola automatically on logon" msgid "Start ZRCola automatically on logon"
msgstr "Samodejno zaženi ZRColo ob prijavi" msgstr "Samodejno zaženi ZRColo ob prijavi"
#: zrcolafrm.cpp:360 #: zrcolafrm.cpp:399
#, c-format #, c-format
msgid "" msgid ""
"ZRCola v%s\n" "ZRCola v%s\n"
@ -55,159 +55,171 @@ msgstr ""
"ZRCola v%s\n" "ZRCola v%s\n"
"Vse pravice pridržane 2015-%s Amebis" "Vse pravice pridržane 2015-%s Amebis"
#: zrcolafrm.cpp:360 #: zrcolafrm.cpp:399
msgid "About ZRCola" msgid "About ZRCola"
msgstr "O ZRColi" msgstr "O ZRColi"
#: zrcolagui.cpp:34 #: zrcolagui.cpp:36
msgid "&Start on Logon" msgid "&Start on Logon"
msgstr "Z&aženi ob prijavi" msgstr "Z&aženi ob prijavi"
#: zrcolagui.cpp:34 #: zrcolagui.cpp:36
msgid "Start this program automatically on logon" msgid "Start this program automatically on logon"
msgstr "Samodejno zaženi ta program ob prijavi" msgstr "Samodejno zaženi ta program ob prijavi"
#: zrcolagui.cpp:40 #: zrcolagui.cpp:42
msgid "E&xit" msgid "E&xit"
msgstr "I&zhod" msgstr "I&zhod"
#: zrcolagui.cpp:40 #: zrcolagui.cpp:42
msgid "Quit this program" msgid "Quit this program"
msgstr "Zapri ta program" msgstr "Zapri ta program"
#: zrcolagui.cpp:43 #: zrcolagui.cpp:45
msgid "&Program" msgid "&Program"
msgstr "&Program" msgstr "&Program"
#: zrcolagui.cpp:76 #: zrcolagui.cpp:78
msgid "Select &All" msgid "Select &All"
msgstr "Izberi &vse" msgstr "Izberi &vse"
#: zrcolagui.cpp:76 #: zrcolagui.cpp:78
msgid "Select all text" msgid "Select all text"
msgstr "Izberi celotno besedilo" msgstr "Izberi celotno besedilo"
#: zrcolagui.cpp:82 #: zrcolagui.cpp:84
msgid "&Send Composed" msgid "&Send Composed"
msgstr "Pošlji &sestavljeno" msgstr "Pošlji &sestavljeno"
#: zrcolagui.cpp:82 zrcolagui.cpp:151 #: zrcolagui.cpp:84 zrcolagui.cpp:159
msgid "Send composed text to source window" msgid "Send composed text to source window"
msgstr "Pošlji sestavljeno besedilo izvornemu oknu" msgstr "Pošlji sestavljeno besedilo izvornemu oknu"
#: zrcolagui.cpp:91 #: zrcolagui.cpp:93
msgid "Send &Decomposed" msgid "Send &Decomposed"
msgstr "Pošlji &razstavljeno" msgstr "Pošlji &razstavljeno"
#: zrcolagui.cpp:91 zrcolagui.cpp:153 #: zrcolagui.cpp:93 zrcolagui.cpp:161
msgid "Send decomposed text to source window" msgid "Send decomposed text to source window"
msgstr "Pošlji razstavljeno besedilo izvornemu oknu" msgstr "Pošlji razstavljeno besedilo izvornemu oknu"
#: zrcolagui.cpp:100 #: zrcolagui.cpp:102
msgid "Abort (De)composition" msgid "Abort (De)composition"
msgstr "Prekini raz/sestavljanje" msgstr "Prekini raz/sestavljanje"
#: zrcolagui.cpp:100 #: zrcolagui.cpp:102
msgid "Abort composition and return focus to source window" msgid "Abort composition and return focus to source window"
msgstr "Prekini sestavljanje in vrni fokus nazaj izvornemu oknu" msgstr "Prekini sestavljanje in vrni fokus nazaj izvornemu oknu"
#: zrcolagui.cpp:109 #: zrcolagui.cpp:111
msgid "&Language" msgid "&Language"
msgstr "&Jezik" msgstr "&Jezik"
#: zrcolagui.cpp:111 #: zrcolagui.cpp:113
msgid "&Automatic" msgid "&Automatic"
msgstr "S&amodejno" msgstr "S&amodejno"
#: zrcolagui.cpp:111 #: zrcolagui.cpp:113
msgid "Set language according to keyboard layout automatically" msgid "Set language according to keyboard layout automatically"
msgstr "Samodejno nastavi jezik glede na izbrano tipkovnico" msgstr "Samodejno nastavi jezik glede na izbrano tipkovnico"
#: zrcolagui.cpp:118 #: zrcolagui.cpp:120
msgid "&Edit" msgid "&Edit"
msgstr "Ur&edi" msgstr "Ur&edi"
#: zrcolagui.cpp:122 #: zrcolagui.cpp:124
msgid "Edit Toolbar" msgid "&Edit Toolbar"
msgstr "Orodna vrstica za urejanje" msgstr "Orodna vrstica za ur&ejanje"
#: zrcolagui.cpp:122 #: zrcolagui.cpp:124
msgid "Toggle edit toolbar" msgid "Toggle edit toolbar"
msgstr "Prikaži/skrij orodno vrstico za urejanje" msgstr "Prikaži/skrij orodno vrstico za urejanje"
#: zrcolagui.cpp:126 #: zrcolagui.cpp:128
msgid "Compose Toolbar" msgid "&Compose Toolbar"
msgstr "Orodna vrstica za sestavljanje" msgstr "Orodna vrsti&ca za sestavljanje"
#: zrcolagui.cpp:126 #: zrcolagui.cpp:128
msgid "Toggle compose toolbar" msgid "Toggle compose toolbar"
msgstr "Prikaži/skrij orodno vrstico za sestavljanje" msgstr "Prikaži/skrij orodno vrstico za sestavljanje"
#: zrcolagui.cpp:129 #: zrcolagui.cpp:134
msgid "Character Catalo&g"
msgstr "Katalo&g znakov"
#: zrcolagui.cpp:134
msgid "Toggle character catalog panel"
msgstr "Prikaži/skrij katalog znakov"
#: zrcolagui.cpp:137
msgid "&View" msgid "&View"
msgstr "Po&gled" msgstr "Po&gled"
#: zrcolagui.cpp:136 #: zrcolagui.cpp:144
msgid "&Help" msgid "&Help"
msgstr "Po&moč" msgstr "Po&moč"
#: zrcolagui.cpp:141 #: zrcolagui.cpp:149
msgid "Cut" msgid "Cut"
msgstr "Izreži" msgstr "Izreži"
#: zrcolagui.cpp:141 #: zrcolagui.cpp:149
msgid "Cut selection" msgid "Cut selection"
msgstr "Izreži izbor" msgstr "Izreži izbor"
#: zrcolagui.cpp:143 #: zrcolagui.cpp:151
msgid "Copy" msgid "Copy"
msgstr "Kopiraj" msgstr "Kopiraj"
#: zrcolagui.cpp:143 #: zrcolagui.cpp:151
msgid "Copy selection" msgid "Copy selection"
msgstr "Kopiraj izbor" msgstr "Kopiraj izbor"
#: zrcolagui.cpp:145 #: zrcolagui.cpp:153
msgid "Paste" msgid "Paste"
msgstr "Prilepi" msgstr "Prilepi"
#: zrcolagui.cpp:145 #: zrcolagui.cpp:153
msgid "Paste selection" msgid "Paste selection"
msgstr "Prilepi izbor" msgstr "Prilepi izbor"
#: zrcolagui.cpp:148 #: zrcolagui.cpp:156
msgid "Edit" msgid "Edit"
msgstr "Urejanje" msgstr "Urejanje"
#: zrcolagui.cpp:151 #: zrcolagui.cpp:159
msgid "Send Composed" msgid "Send Composed"
msgstr "Pošlji sestavljeno" msgstr "Pošlji sestavljeno"
#: zrcolagui.cpp:153 #: zrcolagui.cpp:161
msgid "Send Decomposed" msgid "Send Decomposed"
msgstr "Pošlji razstavljeno" msgstr "Pošlji razstavljeno"
#: zrcolagui.cpp:162 #: zrcolagui.cpp:170
msgid "Compose" msgid "Compose"
msgstr "Sestavljanje" msgstr "Sestavljanje"
#: zrcolagui.cpp:166 #: zrcolagui.cpp:174
msgid "Character Catalog"
msgstr "Katalog znakov"
#: zrcolagui.cpp:178
msgid "(De)Composer" msgid "(De)Composer"
msgstr "Raz/Sestavljalnik" msgstr "Raz/Sestavljalnik"
#: zrcolagui.cpp:201 #: zrcolagui.cpp:213
msgid "Decomposed Text" msgid "Decomposed Text"
msgstr "Razstavljeno besedilo" msgstr "Razstavljeno besedilo"
#: zrcolagui.cpp:221 #: zrcolagui.cpp:233
msgid "Decomposed Unicode Dump" msgid "Decomposed Unicode Dump"
msgstr "Unicode razstavljenega" msgstr "Unicode razstavljenega"
#: zrcolagui.cpp:248 #: zrcolagui.cpp:260
msgid "Composed Text" msgid "Composed Text"
msgstr "Sestavljeno besedilo" msgstr "Sestavljeno besedilo"
#: zrcolagui.cpp:268 #: zrcolagui.cpp:280
msgid "Composed Unicode Dump" msgid "Composed Unicode Dump"
msgstr "Unicode sestavljenega" msgstr "Unicode sestavljenega"
@ -215,7 +227,7 @@ msgstr "Unicode sestavljenega"
msgid "INS" msgid "INS"
msgstr "INS" msgstr "INS"
#: zrcolagui.h:80 MSIBuild/En.Win32.Debug.Feature-2.idtx:4 #: zrcolagui.h:86 MSIBuild/En.Win32.Debug.Feature-2.idtx:4
#: MSIBuild/En.Win32.Debug.Shortcut-2.idtx:4 #: MSIBuild/En.Win32.Debug.Shortcut-2.idtx:4
#: MSIBuild/En.x64.Debug.Feature-2.idtx:4 #: MSIBuild/En.x64.Debug.Feature-2.idtx:4
#: MSIBuild/En.x64.Debug.Shortcut-2.idtx:4 #: MSIBuild/En.x64.Debug.Shortcut-2.idtx:4
@ -237,6 +249,9 @@ msgstr "1250"
msgid "Input system for linguistic use" msgid "Input system for linguistic use"
msgstr "Vnašalni sistem za jezikoslovno rabo" msgstr "Vnašalni sistem za jezikoslovno rabo"
#~ msgid "Character &Groups"
#~ msgstr "Skupine &znakov"
#~ msgid "Language:" #~ msgid "Language:"
#~ msgstr "Jezik:" #~ msgstr "Jezik:"

View File

@ -19,12 +19,6 @@
#pragma once #pragma once
#include "../include/zrcola.h"
#include "zrcolaapp.h"
#include "zrcolacomppnl.h"
#include "zrcolafrm.h"
#include "zrcolakeyhndlr.h"
#include <wx/ffile.h> #include <wx/ffile.h>
#include <wx/msgdlg.h> #include <wx/msgdlg.h>
#include <wx/persist.h> #include <wx/persist.h>
@ -43,3 +37,11 @@
#include <ShObjIdl.h> #include <ShObjIdl.h>
#include <ShlGuid.h> #include <ShlGuid.h>
#endif #endif
#include "../include/zrcola.h"
#include "zrcolaapp.h"
#include "zrcolachrgrid.h"
#include "zrcolachrcatpnl.h"
#include "zrcolacomppnl.h"
#include "zrcolafrm.h"
#include "zrcolakeyhndlr.h"

View File

@ -30,7 +30,9 @@
wxIMPLEMENT_APP(ZRColaApp); wxIMPLEMENT_APP(ZRColaApp);
ZRColaApp::ZRColaApp() : wxApp() ZRColaApp::ZRColaApp() :
m_mainWnd(NULL),
wxApp()
{ {
} }
@ -112,9 +114,9 @@ bool ZRColaApp::OnInit()
wxFAIL_MSG(wxT("ZRCola.zrcdb is not a valid ZRCola database.")); wxFAIL_MSG(wxT("ZRCola.zrcdb is not a valid ZRCola database."));
} }
wxZRColaFrame* mainFrame = new wxZRColaFrame(); m_mainWnd = new wxZRColaFrame();
wxPersistentRegisterAndRestore<wxZRColaFrame>(mainFrame); wxPersistentRegisterAndRestore<wxZRColaFrame>(m_mainWnd);
mainFrame->Show(); m_mainWnd->Show();
return true; return true;
} }

View File

@ -25,6 +25,7 @@ class ZRColaApp;
#pragma once #pragma once
#include "zrcolafrm.h"
#include <wx/app.h> #include <wx/app.h>
#include <wx/config.h> #include <wx/config.h>
#include <wx/intl.h> #include <wx/intl.h>
@ -61,6 +62,8 @@ public:
ZRCola::langchar_db m_lc_db; ///< Language character database ZRCola::langchar_db m_lc_db; ///< Language character database
ZRCola::language_db m_lang_db; ///< Language database ZRCola::language_db m_lang_db; ///< Language database
wxZRColaFrame *m_mainWnd; ///< Main window
protected: protected:
wxLocale m_locale; ///< Current locale wxLocale m_locale; ///< Current locale
}; };

191
ZRCola/zrcolachrcatpnl.cpp Normal file
View File

@ -0,0 +1,191 @@
/*
Copyright 2015-2016 Amebis
This file is part of ZRCola.
ZRCola is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ZRCola is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with ZRCola. If not, see <http://www.gnu.org/licenses/>.
*/
#include "stdafx.h"
//////////////////////////////////////////////////////////////////////////
// wxZRColaCharacterCatalogPanel
//////////////////////////////////////////////////////////////////////////
BEGIN_EVENT_TABLE(wxZRColaCharacterCatalogPanel, wxZRColaCharacterCatalogPanelBase)
EVT_MENU(wxZRColaCharacterCatalogPanel::wxID_FOCUS_DECOMPOSED, wxZRColaCharacterCatalogPanel::OnFocusDecomposed)
END_EVENT_TABLE()
wxZRColaCharacterCatalogPanel::wxZRColaCharacterCatalogPanel(wxWindow* parent) : wxZRColaCharacterCatalogPanelBase(parent)
{
std::fstream dat((LPCTSTR)((ZRColaApp*)wxTheApp)->GetDatabasePath(), std::ios_base::in | std::ios_base::binary);
if (dat.good()) {
if (stdex::idrec::find<ZRCola::recordid_t, ZRCola::recordsize_t, ZRCOLA_RECORD_ALIGN>(dat, ZRCOLA_DB_ID, sizeof(ZRCola::recordid_t))) {
ZRCola::recordsize_t size;
dat.read((char*)&size, sizeof(ZRCola::recordsize_t));
if (dat.good()) {
ZRCola::chrgrp_rec rec(m_cg_db);
if (rec.find(dat, size)) {
dat >> rec;
if (!dat.good()) {
wxFAIL_MSG(wxT("Error reading character group data from ZRCola.zrcdb."));
m_cg_db.idxRnk.clear();
m_cg_db.data .clear();
}
} else
wxFAIL_MSG(wxT("ZRCola.zrcdb has no character group data."));
}
} else
wxFAIL_MSG(wxT("ZRCola.zrcdb is not a valid ZRCola database."));
}
if (!m_cg_db.idxRnk.empty()) {
// Populate character group list.
for (size_t i = 0, n = m_cg_db.idxRnk.size(); i < n; i++) {
const ZRCola::chrgrp_db::chrgrp &cg = m_cg_db.idxRnk[i];
wxString
label(cg.data, cg.name_len),
label_tran2(wxGetTranslation(label, wxT("ZRCola-zrcdb")));
m_choice->Insert(label_tran2, i);
}
m_cg_id = m_cg_db.idxRnk[0].id;
m_choice->Select(0);
// Update grid by simulating wxEVT_COMMAND_CHOICE_SELECTED event.
wxCommandEvent e(wxEVT_COMMAND_CHOICE_SELECTED, m_grid->GetId());
e.SetInt(0);
OnChoice(e);
}
// Register frame specific hotkey(s).
{
wxAcceleratorEntry entries[1];
entries[0].Set(wxACCEL_NORMAL, WXK_ESCAPE, wxID_FOCUS_DECOMPOSED);
SetAcceleratorTable(wxAcceleratorTable(_countof(entries), entries));
}
}
wxZRColaCharacterCatalogPanel::~wxZRColaCharacterCatalogPanel()
{
}
void wxZRColaCharacterCatalogPanel::OnChoice(wxCommandEvent& event)
{
ZRCola::chrgrp_db::chrgrp &cg = m_cg_db.idxRnk[event.GetSelection()];
m_cg_id = cg.id;
m_grid->SetCharacters(wxString(cg.data + cg.name_len, cg.char_len));
// As size of the grid might have changed, relayout the panel.
Layout();
event.Skip();
}
void wxZRColaCharacterCatalogPanel::OnGridClick(wxGridEvent& event)
{
ZRColaApp *app = (ZRColaApp*)wxTheApp;
if (app->m_mainWnd) {
app->m_mainWnd->m_panel->m_decomposed->WriteText(m_grid->GetCellValue(event.GetRow(), event.GetCol()));
app->m_mainWnd->m_panel->m_decomposed->SetFocus();
}
event.Skip();
}
void wxZRColaCharacterCatalogPanel::OnGridKeyDown(wxKeyEvent& event)
{
if (event.GetKeyCode() == WXK_RETURN) {
ZRColaApp *app = (ZRColaApp*)wxTheApp;
if (app->m_mainWnd) {
app->m_mainWnd->m_panel->m_decomposed->WriteText(m_grid->GetCellValue(m_grid->GetCursorRow(), m_grid->GetCursorColumn()));
app->m_mainWnd->m_panel->m_decomposed->SetFocus();
event.StopPropagation();
return;
}
}
event.Skip();
}
void wxZRColaCharacterCatalogPanel::OnFocusDecomposed(wxCommandEvent& event)
{
ZRColaApp *app = (ZRColaApp*)wxTheApp;
if (app->m_mainWnd) {
app->m_mainWnd->m_panel->m_decomposed->SetFocus();
event.StopPropagation();
return;
}
event.Skip();
}
//////////////////////////////////////////////////////////////////////////
// wxPersistentZRColaCharacterCatalogPanel
//////////////////////////////////////////////////////////////////////////
wxPersistentZRColaCharacterCatalogPanel::wxPersistentZRColaCharacterCatalogPanel(wxZRColaCharacterCatalogPanel *wnd) : wxPersistentWindow<wxZRColaCharacterCatalogPanel>(wnd)
{
}
wxString wxPersistentZRColaCharacterCatalogPanel::GetKind() const
{
return wxT(wxPERSIST_TLW_KIND);
}
void wxPersistentZRColaCharacterCatalogPanel::Save() const
{
const wxZRColaCharacterCatalogPanel * const wnd = static_cast<const wxZRColaCharacterCatalogPanel*>(GetWindow());
SaveValue(wxT("charGroup"), wnd->m_cg_id);
}
bool wxPersistentZRColaCharacterCatalogPanel::Restore()
{
wxZRColaCharacterCatalogPanel * const wnd = static_cast<wxZRColaCharacterCatalogPanel*>(GetWindow());
// Restore selected character group.
int cg_id;
if (RestoreValue(wxT("charGroup"), &cg_id)) {
for (size_t i = 0, n = wnd->m_cg_db.idxRnk.size(); i < n; i++) {
const ZRCola::chrgrp_db::chrgrp &cg = wnd->m_cg_db.idxRnk[i];
if (cg.id == cg_id) {
wnd->m_cg_id = cg.id;
wnd->m_choice->Select(i);
// Update grid by simulating wxEVT_COMMAND_CHOICE_SELECTED event.
wxCommandEvent e(wxEVT_COMMAND_CHOICE_SELECTED, wnd->m_grid->GetId());
e.SetInt(i);
wnd->OnChoice(e);
break;
}
}
}
return true;
}

79
ZRCola/zrcolachrcatpnl.h Normal file
View File

@ -0,0 +1,79 @@
/*
Copyright 2015-2016 Amebis
This file is part of ZRCola.
ZRCola is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ZRCola is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with ZRCola. If not, see <http://www.gnu.org/licenses/>.
*/
///
/// Forward declarations
///
class wxZRColaCharacterCatalogPanel;
#pragma once
#include "zrcolagui.h"
#include <zrcolaui/chargroup.h>
#include <wx/persist/window.h>
///
/// ZRCola character groups panel
///
class wxZRColaCharacterCatalogPanel : public wxZRColaCharacterCatalogPanelBase
{
public:
enum
{
wxID_FOCUS_DECOMPOSED = 6000,
};
wxZRColaCharacterCatalogPanel(wxWindow* parent);
virtual ~wxZRColaCharacterCatalogPanel();
friend class wxPersistentZRColaCharacterCatalogPanel; // Allow saving/restoring window state.
protected:
virtual void OnChoice(wxCommandEvent& event);
virtual void OnGridClick(wxGridEvent& event);
virtual void OnGridKeyDown(wxKeyEvent& event);
void OnFocusDecomposed(wxCommandEvent& event);
DECLARE_EVENT_TABLE()
protected:
ZRCola::chrgrp_db m_cg_db; ///< Character group database
int m_cg_id; ///< Selected character group ID
};
///
/// Supports saving/restoring wxZRColaCharacterCatalogPanel state
///
class wxPersistentZRColaCharacterCatalogPanel : public wxPersistentWindow<wxZRColaCharacterCatalogPanel>
{
public:
wxPersistentZRColaCharacterCatalogPanel(wxZRColaCharacterCatalogPanel *wnd);
virtual wxString GetKind() const;
virtual void Save() const;
virtual bool Restore();
};
inline wxPersistentObject *wxCreatePersistentObject(wxZRColaCharacterCatalogPanel *wnd)
{
return new wxPersistentZRColaCharacterCatalogPanel(wnd);
}

108
ZRCola/zrcolachrgrid.cpp Normal file
View File

@ -0,0 +1,108 @@
/*
Copyright 2015-2016 Amebis
This file is part of ZRCola.
ZRCola is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ZRCola is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with ZRCola. If not, see <http://www.gnu.org/licenses/>.
*/
#include "stdafx.h"
//////////////////////////////////////////////////////////////////////////
// wxZRColaCharGrid
//////////////////////////////////////////////////////////////////////////
BEGIN_EVENT_TABLE(wxZRColaCharGrid, wxGrid)
EVT_SIZE(wxZRColaCharGrid::OnSize)
END_EVENT_TABLE()
wxZRColaCharGrid::wxZRColaCharGrid() :
m_isResizing(false),
wxGrid()
{
}
wxZRColaCharGrid::wxZRColaCharGrid(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name) :
m_isResizing(false),
wxGrid(parent, id, pos, size, wxWANTS_CHARS, name)
{
// Cell Defaults
SetDefaultRowSize(wxZRColaCharacterGridRowHeight);
}
void wxZRColaCharGrid::SetCharacters(const wxString &chars)
{
m_chars = chars;
// Build and set new grid data.
size_t char_len = m_chars.Length();
int rows = std::max<int>((char_len + m_numCols - 1) / m_numCols, 1);
wxGridStringTable *table = new wxGridStringTable(rows, m_numCols);
for (int r = 0, i = 0; r < rows; r++)
for (int c = 0; c < m_numCols; c++, i++)
table->SetValue(r, c, i < char_len ? wxString(1, m_chars[i]) : wxEmptyString);
SetTable(table, true);
}
void wxZRColaCharGrid::OnSize(wxSizeEvent& event)
{
event.Skip();
if (m_isResizing)
return;
m_isResizing = true;
// Calculate initial estimate of columns and rows.
wxSize size(event.GetSize());
size_t
char_len = m_chars.Length();
int
width = size.GetWidth() - m_rowLabelWidth - m_extraWidth,
cols = std::max<int>(width / wxZRColaCharacterGridColumnWidth, 1),
rows = std::max<int>((char_len + cols - 1) / cols, 1);
if (m_colLabelHeight + rows*wxZRColaCharacterGridRowHeight + m_extraHeight > size.GetHeight()) {
// Vertical scrollbar will be shown. Adjust the width and recalculate layout to avoid horizontal scrollbar.
width = std::max<int>(width - wxSystemSettings::GetMetric(wxSYS_VSCROLL_X, this), 0);
cols = std::max<int>(width / wxZRColaCharacterGridColumnWidth, 1);
rows = std::max<int>((char_len + cols - 1) / cols, 1);
}
BeginBatch();
if (cols != m_numCols) {
// Build and set new grid data.
wxGridStringTable *table = new wxGridStringTable(rows, cols);
for (int r = 0, i = 0; r < rows; r++)
for (int c = 0; c < cols; c++, i++)
table->SetValue(r, c, i < char_len ? wxString(1, m_chars[i]) : wxEmptyString);
SetTable(table, true);
}
// Set column widths to stretch to full width.
for (int c = 0, x_l = 0; c < cols; c++) {
int x_r = (c + 1)*width/cols;
SetColSize(c, x_r - x_l);
x_l = x_r;
}
EndBatch();
m_isResizing = false;
}

64
ZRCola/zrcolachrgrid.h Normal file
View File

@ -0,0 +1,64 @@
/*
Copyright 2015-2016 Amebis
This file is part of ZRCola.
ZRCola is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ZRCola is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with ZRCola. If not, see <http://www.gnu.org/licenses/>.
*/
///
/// Forward declarations
///
class wxZRColaCharGrid;
#pragma once
#include <wx/grid.h>
///
/// Character grid layout
///
#define wxZRColaCharacterGridColumnWidth 35
#define wxZRColaCharacterGridRowHeight 35
///
/// ZRCola character grid
///
class wxZRColaCharGrid : public wxGrid
{
public:
wxZRColaCharGrid();
wxZRColaCharGrid(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxWANTS_CHARS, const wxString& name = wxGridNameStr);
///
/// Sets new array of characters to display
///
/// \param[in] chars The string containing characters to display
///
void SetCharacters(const wxString &chars);
protected:
void OnSize(wxSizeEvent& event);
DECLARE_EVENT_TABLE()
protected:
wxString m_chars; ///< Array of Unicode characters to display in the grid
private:
bool m_isResizing; ///< Prevents nesting of OnSize() method.
};

View File

@ -46,7 +46,6 @@ public:
wxZRColaComposerPanel(wxWindow* parent); wxZRColaComposerPanel(wxWindow* parent);
virtual ~wxZRColaComposerPanel(); virtual ~wxZRColaComposerPanel();
friend class wxZRColaFrame; // Allow main frame direct access to our members.
friend class wxPersistentZRColaComposerPanel; // Allow saving/restoring window state. friend class wxPersistentZRColaComposerPanel; // Allow saving/restoring window state.
protected: protected:

View File

@ -48,6 +48,9 @@ wxBEGIN_EVENT_TABLE(wxZRColaFrame, wxZRColaFrameBase)
EVT_MENU (wxID_TOOLBAR_EDIT , wxZRColaFrame::OnToolbarEdit ) EVT_MENU (wxID_TOOLBAR_EDIT , wxZRColaFrame::OnToolbarEdit )
EVT_UPDATE_UI (wxID_TOOLBAR_COMPOSE , wxZRColaFrame::OnToolbarComposeUpdate ) EVT_UPDATE_UI (wxID_TOOLBAR_COMPOSE , wxZRColaFrame::OnToolbarComposeUpdate )
EVT_MENU (wxID_TOOLBAR_COMPOSE , wxZRColaFrame::OnToolbarCompose ) EVT_MENU (wxID_TOOLBAR_COMPOSE , wxZRColaFrame::OnToolbarCompose )
EVT_UPDATE_UI (wxID_PANEL_CHRGRPS , wxZRColaFrame::OnPanelCharacterCatalogUpdate )
EVT_MENU (wxID_PANEL_CHRGRPS , wxZRColaFrame::OnPanelCharacterCatalog )
EVT_MENU (wxID_FOCUS_CHARACTER_CATALOG , wxZRColaFrame::OnPanelCharacterCatalogFocus )
EVT_MENU (wxID_ABOUT , wxZRColaFrame::OnAbout ) EVT_MENU (wxID_ABOUT , wxZRColaFrame::OnAbout )
wxEND_EVENT_TABLE() wxEND_EVENT_TABLE()
@ -127,6 +130,13 @@ wxZRColaFrame::wxZRColaFrame() :
pProfiles->Release(); pProfiles->Release();
} }
#endif #endif
// Register frame specific hotkey(s).
{
wxAcceleratorEntry entries[1];
entries[0].Set(wxACCEL_NORMAL, WXK_F4, wxID_FOCUS_CHARACTER_CATALOG);
SetAcceleratorTable(wxAcceleratorTable(_countof(entries), entries));
}
} }
@ -144,7 +154,7 @@ wxZRColaFrame::~wxZRColaFrame()
UnregisterHotKey(wxZRColaHKID_INVOKE_COMPOSE); UnregisterHotKey(wxZRColaHKID_INVOKE_COMPOSE);
// Save wxAuiManager's state before return to parent's destructor. // Save wxAuiManager's state before return to parent's destructor.
// Since the later calls m_mgr.UnInit() the regular persistence mechanizm is useless to save wxAuiManager's state. // Since the later calls m_mgr.UnInit() the regular persistence mechanism is useless to save wxAuiManager's state.
wxPersistentAuiManager((wxAuiManager*)&m_mgr).Save(); wxPersistentAuiManager((wxAuiManager*)&m_mgr).Save();
} }
@ -358,6 +368,32 @@ void wxZRColaFrame::OnToolbarCompose(wxCommandEvent& event)
} }
void wxZRColaFrame::OnPanelCharacterCatalogUpdate(wxUpdateUIEvent& event)
{
event.Check(m_mgr.GetPane(m_panelChrCat).IsShown());
}
void wxZRColaFrame::OnPanelCharacterCatalog(wxCommandEvent& event)
{
wxAuiPaneInfo &paneInfo = m_mgr.GetPane(m_panelChrCat);
paneInfo.Show(!paneInfo.IsShown());
m_mgr.Update();
}
void wxZRColaFrame::OnPanelCharacterCatalogFocus(wxCommandEvent& event)
{
wxAuiPaneInfo &paneInfo = m_mgr.GetPane(m_panelChrCat);
if (!paneInfo.IsShown()) {
paneInfo.Show(true);
m_mgr.Update();
}
m_panelChrCat->SetFocus();
}
void wxZRColaFrame::OnAbout(wxCommandEvent& event) void wxZRColaFrame::OnAbout(wxCommandEvent& event)
{ {
wxMessageBox(wxString::Format(_("ZRCola v%s\nCopyright 2015-%s Amebis"), wxT(ZRCOLA_VERSION_STR), wxT(ZRCOLA_BUILD_YEAR_STR)), _("About ZRCola"), wxOK | wxICON_INFORMATION); wxMessageBox(wxString::Format(_("ZRCola v%s\nCopyright 2015-%s Amebis"), wxT(ZRCOLA_VERSION_STR), wxT(ZRCOLA_BUILD_YEAR_STR)), _("About ZRCola"), wxOK | wxICON_INFORMATION);
@ -537,8 +573,10 @@ void wxPersistentZRColaFrame::Save() const
const wxZRColaFrame * const wnd = static_cast<const wxZRColaFrame*>(GetWindow()); const wxZRColaFrame * const wnd = static_cast<const wxZRColaFrame*>(GetWindow());
wxPersistentZRColaComposerPanel(wnd->m_panel).Save(); wxPersistentZRColaComposerPanel(wnd->m_panel).Save();
SaveValue(wxT("langAuto"), wnd->m_lang_auto); wxPersistentZRColaCharacterCatalogPanel(wnd->m_panelChrCat).Save();
SaveValue(wxT("lang" ), wxString::FromAscii(wnd->m_lang, sizeof(wnd->m_lang)));
SaveValue(wxT("langAuto" ), wnd->m_lang_auto);
SaveValue(wxT("lang" ), wxString::FromAscii(wnd->m_lang, sizeof(wnd->m_lang)));
wxPersistentTLW::Save(); wxPersistentTLW::Save();
} }
@ -570,6 +608,7 @@ bool wxPersistentZRColaFrame::Restore()
memcpy(wnd->m_lang, ZRCOLA_LANG_VOID, sizeof(wnd->m_lang)); memcpy(wnd->m_lang, ZRCOLA_LANG_VOID, sizeof(wnd->m_lang));
wnd->UpdateDecomposedLanguage(); wnd->UpdateDecomposedLanguage();
wxPersistentZRColaCharacterCatalogPanel(wnd->m_panelChrCat).Restore();
wxPersistentZRColaComposerPanel(wnd->m_panel).Restore(); wxPersistentZRColaComposerPanel(wnd->m_panel).Restore();
return r; return r;

View File

@ -17,7 +17,6 @@
along with ZRCola. If not, see <http://www.gnu.org/licenses/>. along with ZRCola. If not, see <http://www.gnu.org/licenses/>.
*/ */
/// ///
/// Forward declarations /// Forward declarations
/// ///
@ -53,8 +52,9 @@ class wxZRColaFrame :
public: public:
enum enum
{ {
wxID_DECOMP_LANGUAGE_START = 6000, wxID_DECOMP_LANGUAGE_START = 6000,
wxID_DECOMP_LANGUAGE_END = 6099, wxID_DECOMP_LANGUAGE_END = 6099,
wxID_FOCUS_CHARACTER_CATALOG,
}; };
wxZRColaFrame(); wxZRColaFrame();
@ -82,6 +82,9 @@ protected:
void OnToolbarEdit(wxCommandEvent& event); void OnToolbarEdit(wxCommandEvent& event);
void OnToolbarComposeUpdate(wxUpdateUIEvent& event); void OnToolbarComposeUpdate(wxUpdateUIEvent& event);
void OnToolbarCompose(wxCommandEvent& event); void OnToolbarCompose(wxCommandEvent& event);
void OnPanelCharacterCatalogUpdate(wxUpdateUIEvent& event);
void OnPanelCharacterCatalog(wxCommandEvent& event);
void OnPanelCharacterCatalogFocus(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event); void OnAbout(wxCommandEvent& event);
wxDECLARE_EVENT_TABLE(); wxDECLARE_EVENT_TABLE();

View File

@ -7,6 +7,8 @@
#include "stdafx.h" #include "stdafx.h"
#include "zrcolachrgrid.h"
#include "zrcolagui.h" #include "zrcolagui.h"
// Using the construction of a static object to ensure that the help provider is set // Using the construction of a static object to ensure that the help provider is set
@ -119,13 +121,19 @@ wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxS
m_menuView = new wxMenu(); m_menuView = new wxMenu();
wxMenuItem* m_menuItemToolbarEdit; wxMenuItem* m_menuItemToolbarEdit;
m_menuItemToolbarEdit = new wxMenuItem( m_menuView, wxID_TOOLBAR_EDIT, wxString( _("Edit Toolbar") ) , _("Toggle edit toolbar"), wxITEM_CHECK ); m_menuItemToolbarEdit = new wxMenuItem( m_menuView, wxID_TOOLBAR_EDIT, wxString( _("&Edit Toolbar") ) , _("Toggle edit toolbar"), wxITEM_CHECK );
m_menuView->Append( m_menuItemToolbarEdit ); m_menuView->Append( m_menuItemToolbarEdit );
wxMenuItem* m_menuItemToolbarCompose; wxMenuItem* m_menuItemToolbarCompose;
m_menuItemToolbarCompose = new wxMenuItem( m_menuView, wxID_TOOLBAR_COMPOSE, wxString( _("Compose Toolbar") ) , _("Toggle compose toolbar"), wxITEM_CHECK ); m_menuItemToolbarCompose = new wxMenuItem( m_menuView, wxID_TOOLBAR_COMPOSE, wxString( _("&Compose Toolbar") ) , _("Toggle compose toolbar"), wxITEM_CHECK );
m_menuView->Append( m_menuItemToolbarCompose ); m_menuView->Append( m_menuItemToolbarCompose );
m_menuView->AppendSeparator();
wxMenuItem* m_menuItemPanelChrGrps;
m_menuItemPanelChrGrps = new wxMenuItem( m_menuView, wxID_PANEL_CHRGRPS, wxString( _("Character Catalo&g") ) , _("Toggle character catalog panel"), wxITEM_CHECK );
m_menuView->Append( m_menuItemPanelChrGrps );
m_menubar->Append( m_menuView, _("&View") ); m_menubar->Append( m_menuView, _("&View") );
m_menuHelp = new wxMenu(); m_menuHelp = new wxMenu();
@ -161,6 +169,10 @@ wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxS
m_toolbarCompose->Realize(); m_toolbarCompose->Realize();
m_mgr.AddPane( m_toolbarCompose, wxAuiPaneInfo().Name( wxT("toolbarCompose") ).Top().Caption( _("Compose") ).PinButton( true ).Dock().Resizable().FloatingSize( wxSize( -1,-1 ) ).LeftDockable( false ).RightDockable( false ).Row( 0 ).Layer( 1 ).ToolbarPane() ); m_mgr.AddPane( m_toolbarCompose, wxAuiPaneInfo().Name( wxT("toolbarCompose") ).Top().Caption( _("Compose") ).PinButton( true ).Dock().Resizable().FloatingSize( wxSize( -1,-1 ) ).LeftDockable( false ).RightDockable( false ).Row( 0 ).Layer( 1 ).ToolbarPane() );
m_panelChrCat = new wxZRColaCharacterCatalogPanel( this );
m_mgr.AddPane( m_panelChrCat, wxAuiPaneInfo() .Name( wxT("panelChrGrp") ).Left() .Caption( _("Character Catalog") ).PinButton( true ).Dock().Resizable().FloatingSize( wxDefaultSize ).Row( 1 ).BestSize( wxSize( 150,200 ) ).MinSize( wxSize( 100,100 ) ).Layer( 1 ) );
m_panel = new wxZRColaComposerPanel( this ); m_panel = new wxZRColaComposerPanel( this );
m_mgr.AddPane( m_panel, wxAuiPaneInfo() .Name( wxT("composerPanel") ).Center() .Caption( _("(De)Composer") ).CaptionVisible( false ).CloseButton( false ).PaneBorder( false ).Dock().Resizable().FloatingSize( wxDefaultSize ).Floatable( false ) ); m_mgr.AddPane( m_panel, wxAuiPaneInfo() .Name( wxT("composerPanel") ).Center() .Caption( _("(De)Composer") ).CaptionVisible( false ).CloseButton( false ).PaneBorder( false ).Dock().Resizable().FloatingSize( wxDefaultSize ).Floatable( false ) );
@ -307,3 +319,63 @@ wxZRColaComposerPanelBase::~wxZRColaComposerPanelBase()
m_composedHex->Disconnect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnComposedHexPaint ), NULL, this ); m_composedHex->Disconnect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnComposedHexPaint ), NULL, this );
} }
wxZRColaCharacterCatalogPanelBase::wxZRColaCharacterCatalogPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
{
wxBoxSizer* bSizer;
bSizer = new wxBoxSizer( wxVERTICAL );
wxArrayString m_choiceChoices;
m_choice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceChoices, 0 );
m_choice->SetSelection( 0 );
bSizer->Add( m_choice, 0, wxALL|wxEXPAND, 5 );
m_grid = new wxZRColaCharGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
// Grid
m_grid->CreateGrid( 0, 0 );
m_grid->EnableEditing( false );
m_grid->EnableGridLines( false );
m_grid->EnableDragGridSize( false );
m_grid->SetMargins( 0, 0 );
// Columns
m_grid->EnableDragColMove( false );
m_grid->EnableDragColSize( false );
m_grid->SetColLabelSize( 0 );
m_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
// Rows
m_grid->EnableDragRowSize( false );
m_grid->SetRowLabelSize( 0 );
m_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
// Label Appearance
// Cell Defaults
m_grid->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
m_grid->SetDefaultCellFont( wxFont( 20, 70, 90, 90, false, wxT("00 ZRCola") ) );
m_grid->SetDefaultCellAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
m_grid->SetMinSize( wxSize( 35,35 ) );
bSizer->Add( m_grid, 1, wxALL|wxEXPAND, 5 );
this->SetSizer( bSizer );
this->Layout();
bSizer->Fit( this );
// Connect Events
m_choice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( wxZRColaCharacterCatalogPanelBase::OnChoice ), NULL, this );
m_grid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( wxZRColaCharacterCatalogPanelBase::OnGridClick ), NULL, this );
m_grid->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( wxZRColaCharacterCatalogPanelBase::OnGridKeyDown ), NULL, this );
}
wxZRColaCharacterCatalogPanelBase::~wxZRColaCharacterCatalogPanelBase()
{
// Disconnect Events
m_choice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( wxZRColaCharacterCatalogPanelBase::OnChoice ), NULL, this );
m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( wxZRColaCharacterCatalogPanelBase::OnGridClick ), NULL, this );
m_grid->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( wxZRColaCharacterCatalogPanelBase::OnGridKeyDown ), NULL, this );
}

View File

@ -12,6 +12,8 @@
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include <wx/cshelp.h> #include <wx/cshelp.h>
#include <wx/intl.h> #include <wx/intl.h>
class wxZRColaCharGrid;
#include <wx/string.h> #include <wx/string.h>
#include <wx/bitmap.h> #include <wx/bitmap.h>
#include <wx/image.h> #include <wx/image.h>
@ -24,7 +26,8 @@
#include <wx/aui/aui.h> #include <wx/aui/aui.h>
#include <wx/aui/auibar.h> #include <wx/aui/auibar.h>
#include <wx/choice.h> #include <wx/choice.h>
#include "zrcolacomppnl.h" class wxZRColaCharacterCatalogPanel;
class wxZRColaComposerPanel;
#include <wx/statusbr.h> #include <wx/statusbr.h>
#include <wx/frame.h> #include <wx/frame.h>
#include <wx/textctrl.h> #include <wx/textctrl.h>
@ -32,6 +35,7 @@
#include <wx/statbox.h> #include <wx/statbox.h>
#include <wx/panel.h> #include <wx/panel.h>
#include <wx/splitter.h> #include <wx/splitter.h>
#include <wx/grid.h>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
@ -51,7 +55,8 @@ class wxZRColaFrameBase : public wxFrame
wxID_SEND_ABORT, wxID_SEND_ABORT,
wxID_DECOMP_LANG_AUTO, wxID_DECOMP_LANG_AUTO,
wxID_TOOLBAR_EDIT, wxID_TOOLBAR_EDIT,
wxID_TOOLBAR_COMPOSE wxID_TOOLBAR_COMPOSE,
wxID_PANEL_CHRGRPS
}; };
wxMenuBar* m_menubar; wxMenuBar* m_menubar;
@ -68,7 +73,7 @@ class wxZRColaFrameBase : public wxFrame
wxAuiToolBarItem* m_toolSendComposed; wxAuiToolBarItem* m_toolSendComposed;
wxAuiToolBarItem* m_toolSendDecomposed; wxAuiToolBarItem* m_toolSendDecomposed;
wxChoice* m_toolDecompLanguage; wxChoice* m_toolDecompLanguage;
wxZRColaComposerPanel* m_panel; wxZRColaCharacterCatalogPanel* m_panelChrCat;
wxStatusBar* m_statusBar; wxStatusBar* m_statusBar;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
@ -76,6 +81,7 @@ class wxZRColaFrameBase : public wxFrame
public: public:
wxZRColaComposerPanel* m_panel;
wxZRColaFrameBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 600,400 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL, const wxString& name = wxT("ZRCola") ); wxZRColaFrameBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 600,400 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL, const wxString& name = wxT("ZRCola") );
wxAuiManager m_mgr; wxAuiManager m_mgr;
@ -94,12 +100,10 @@ class wxZRColaComposerPanelBase : public wxPanel
protected: protected:
wxSplitterWindow* m_splitterDecomposed; wxSplitterWindow* m_splitterDecomposed;
wxPanel* m_panelDecomposedEdit; wxPanel* m_panelDecomposedEdit;
wxTextCtrl* m_decomposed;
wxPanel* m_panelDecomposedHex; wxPanel* m_panelDecomposedHex;
wxTextCtrl* m_decomposedHex; wxTextCtrl* m_decomposedHex;
wxSplitterWindow* m_splitterComposed; wxSplitterWindow* m_splitterComposed;
wxPanel* m_panelComposedEdit; wxPanel* m_panelComposedEdit;
wxTextCtrl* m_composed;
wxPanel* m_panelComposedHex; wxPanel* m_panelComposedHex;
wxTextCtrl* m_composedHex; wxTextCtrl* m_composedHex;
@ -113,6 +117,8 @@ class wxZRColaComposerPanelBase : public wxPanel
public: public:
wxTextCtrl* m_decomposed;
wxTextCtrl* m_composed;
wxZRColaComposerPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaComposerPanel") ); wxZRColaComposerPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaComposerPanel") );
~wxZRColaComposerPanelBase(); ~wxZRColaComposerPanelBase();
@ -131,4 +137,28 @@ class wxZRColaComposerPanelBase : public wxPanel
}; };
///////////////////////////////////////////////////////////////////////////////
/// Class wxZRColaCharacterCatalogPanelBase
///////////////////////////////////////////////////////////////////////////////
class wxZRColaCharacterCatalogPanelBase : public wxPanel
{
private:
protected:
wxChoice* m_choice;
wxZRColaCharGrid* m_grid;
// Virtual event handlers, overide them in your derived class
virtual void OnChoice( wxCommandEvent& event ) { event.Skip(); }
virtual void OnGridClick( wxGridEvent& event ) { event.Skip(); }
virtual void OnGridKeyDown( wxKeyEvent& event ) { event.Skip(); }
public:
wxZRColaCharacterCatalogPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaCharacterCatalog") );
~wxZRColaCharacterCatalogPanelBase();
};
#endif //__ZRCOLAGUI_H__ #endif //__ZRCOLAGUI_H__