diff --git a/ZRCola/ZRCola.fbp b/ZRCola/ZRCola.fbp index 8f702da..30a4204 100644 --- a/ZRCola/ZRCola.fbp +++ b/ZRCola/ZRCola.fbp @@ -244,6 +244,25 @@ separator2 none + + + 0 + 1 + Display character selector to select character to insert into text + wxID_INSERT_CHARACTER + wxITEM_NORMAL + &Insert Character... + m_menuInsertCharacter + none + F8 + + + + + + separator3 + none + Load From Icon Resource; send_composed.ico; [16; 16] 0 @@ -2235,5 +2254,968 @@ + + 0 + wxAUI_MGR_DEFAULT + + + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + wxZRColaCharSelectBase + + + wxDEFAULT_DIALOG_STYLE + + Character Selector + + + ZRColaCharSelect + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizerContent + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + bSizerColumns + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bSizerLeft + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + &Browse + + sbSizerBrowse + wxVERTICAL + none + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + 1 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_search + 1 + + + protected + 1 + + Resizable + 1 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnSearchText + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + 0 + 0 + + + + 1 + + 00 ZRCola,90,90,20,70,0 + wxALIGN_CENTRE + + wxALIGN_CENTRE + 0 + 1 + wxALIGN_CENTRE + 0 + + wxALIGN_CENTRE + 16 + 35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35 + + 1 + 0 + Dock + 0 + Left + 0 + 0 + 0 + 0 + 0 + 1 + + 1 + ,90,90,-1,70,0 + + 1 + 0 + 0 + wxID_ANY + + + + 0 + 0 + + 0 + + + 0 + + 1 + m_gridResults + 1 + + + protected + 1 + + Resizable + wxALIGN_CENTRE + 0 + + wxALIGN_CENTRE + 35,35,35,35,35,35,35,35,35,35 + 10 + 1 + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnResultSelectCell + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + Re&cently Used + + sbSizerRecent + wxVERTICAL + none + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + 0 + 0 + + + + 1 + + 00 ZRCola,90,90,20,70,0 + wxALIGN_CENTRE + + wxALIGN_CENTRE + 0 + 1 + wxALIGN_CENTRE + 0 + + wxALIGN_CENTRE + 16 + 35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35 + + 1 + 0 + Dock + 0 + Left + 0 + 0 + 0 + 0 + 0 + 1 + + 1 + ,90,90,-1,70,0 + + 1 + 0 + 0 + wxID_ANY + + + + 0 + 0 + + 0 + + + 0 + + 1 + m_gridRecent + 1 + + + protected + 1 + + Resizable + wxALIGN_CENTRE + 0 + + wxALIGN_CENTRE + 35 + 1 + 1 + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnRecentSelectCell + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizerRight + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + &Unicode + + sbSizerUnicode + wxVERTICAL + none + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 4 + + 0 + + 1 + m_unicode + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_CENTRE + + 0 + + wxString + wxFILTER_INCLUDE_CHAR_LIST + wxTextValidator + m_unicodeValid + + + + + + + + + + + + + + + + + + + + + + + + + + + OnUnicodeText + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + Preview + + sbSizerPreview + wxVERTICAL + none + + + 5 + wxALIGN_CENTER|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + 0 + 0 + + + + 1 + + 00 ZRCola,90,90,180,70,0 + wxALIGN_CENTRE + + wxALIGN_CENTRE + 0 + 1 + wxALIGN_CENTRE + 0 + + wxALIGN_CENTRE + 1 + 250 + + 1 + 0 + Dock + 0 + Left + 0 + 0 + 0 + 0 + 0 + 1 + + 1 + + + 0 + 0 + 0 + wxID_ANY + + + + 0 + 0 + + 0 + + + 0 + + 1 + m_gridPreview + 1 + + + protected + 1 + + Resizable + wxALIGN_CENTRE + 0 + + wxALIGN_CENTRE + 250 + 1 + 1 + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + wxID_ANY + Re&lated + + sbSizerRelated + wxVERTICAL + none + + + 5 + wxALIGN_CENTER|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + 0 + 0 + + + + 1 + + 00 ZRCola,90,90,20,70,0 + wxALIGN_LEFT + + wxALIGN_TOP + 0 + 1 + wxALIGN_CENTRE + 0 + + wxALIGN_CENTRE + 7 + 35,35,35,35,35,35,35 + + 1 + 0 + Dock + 0 + Left + 0 + 0 + 0 + 0 + 0 + 1 + + 1 + + + 1 + 0 + 0 + wxID_ANY + + + + 0 + 0 + + 0 + + + 0 + + 1 + m_gridRelated + 1 + + + protected + 1 + + Resizable + wxALIGN_CENTRE + 0 + + wxALIGN_CENTRE + 35,35,35 + 3 + 1 + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnRelatedSelectCell + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 5 + protected + 5 + + + + 5 + wxALL|wxEXPAND + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizerButtons + protected + + + + + + + + + + + + diff --git a/ZRCola/ZRCola.vcxproj b/ZRCola/ZRCola.vcxproj index d6beaaf..efdfaa2 100644 --- a/ZRCola/ZRCola.vcxproj +++ b/ZRCola/ZRCola.vcxproj @@ -83,6 +83,7 @@ + @@ -93,6 +94,7 @@ + diff --git a/ZRCola/ZRCola.vcxproj.filters b/ZRCola/ZRCola.vcxproj.filters index 0303d60..1fe9219 100644 --- a/ZRCola/ZRCola.vcxproj.filters +++ b/ZRCola/ZRCola.vcxproj.filters @@ -43,6 +43,9 @@ Source Files + + Source Files + @@ -69,6 +72,9 @@ Header Files + + Header Files + diff --git a/ZRCola/locale/sl_SI.po b/ZRCola/locale/sl_SI.po index 1e0cfcc..a420c8d 100644 --- a/ZRCola/locale/sl_SI.po +++ b/ZRCola/locale/sl_SI.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: ZRCola\n" -"POT-Creation-Date: 2016-05-06 14:24+0200\n" -"PO-Revision-Date: 2016-05-06 14:24+0200\n" +"POT-Creation-Date: 2016-05-11 09:00+0200\n" +"PO-Revision-Date: 2016-05-11 09:00+0200\n" "Last-Translator: Simon Rozman \n" "Language-Team: Amebis, d. o. o., Kamnik \n" "Language: sl_SI\n" @@ -17,156 +17,19 @@ msgstr "" "X-Poedit-KeywordsList: _\n" "X-Poedit-SearchPath-0: .\n" -#: zrcolaapp.cpp:155 -msgid "Esc" -msgstr "Esc" +#: zrcolafrm.cpp:93 zrcolagui.h:93 MSIBuild/En.Win32.Release.Feature-2.idtx:4 +#: MSIBuild/En.Win32.Release.Shortcut-2.idtx:4 +#: MSIBuild/En.x64.Release.Feature-2.idtx:4 +#: MSIBuild/En.x64.Release.Shortcut-2.idtx:4 +msgid "ZRCola" +msgstr "ZRCola" -#: zrcolaapp.cpp:157 -msgid "F1" -msgstr "F1" - -#: zrcolaapp.cpp:158 -msgid "F2" -msgstr "F2" - -#: zrcolaapp.cpp:159 -msgid "F3" -msgstr "F3" - -#: zrcolaapp.cpp:160 -msgid "F4" -msgstr "F4" - -#: zrcolaapp.cpp:161 -msgid "F5" -msgstr "F5" - -#: zrcolaapp.cpp:162 -msgid "F6" -msgstr "F6" - -#: zrcolaapp.cpp:163 -msgid "F7" -msgstr "F7" - -#: zrcolaapp.cpp:164 -msgid "F8" -msgstr "F8" - -#: zrcolaapp.cpp:165 -msgid "F9" -msgstr "F9" - -#: zrcolaapp.cpp:166 -msgid "F10" -msgstr "F10" - -#: zrcolaapp.cpp:167 -msgid "F11" -msgstr "F11" - -#: zrcolaapp.cpp:168 -msgid "F12" -msgstr "F12" - -#: zrcolaapp.cpp:170 -msgid "Print Screen" -msgstr "Print Screen" - -#: zrcolaapp.cpp:171 -msgid "Scroll Lock" -msgstr "Scroll Lock" - -#: zrcolaapp.cpp:172 -msgid "Pause" -msgstr "Pause" - -#: zrcolaapp.cpp:174 -msgid "Backspace" -msgstr "Backspace" - -#: zrcolaapp.cpp:175 -msgid "Tab" -msgstr "Tab" - -#: zrcolaapp.cpp:176 -msgid "Caps Lock" -msgstr "Caps Lock" - -#: zrcolaapp.cpp:177 -msgid "Return" -msgstr "Return" - -#: zrcolaapp.cpp:178 -msgid "Space" -msgstr "preslednica" - -#: zrcolaapp.cpp:180 -msgid "Shift" -msgstr "Shift" - -#: zrcolaapp.cpp:181 -msgid "Alt" -msgstr "Alt" - -#: zrcolaapp.cpp:182 -msgid "Ctrl" -msgstr "Ctrl" - -#: zrcolaapp.cpp:183 -msgid "Menu" -msgstr "Menu" - -#: zrcolaapp.cpp:185 -msgid "Insert" -msgstr "Insert" - -#: zrcolaapp.cpp:186 -msgid "Delete" -msgstr "Delete" - -#: zrcolaapp.cpp:187 -msgid "Page Up" -msgstr "Page Up" - -#: zrcolaapp.cpp:188 -msgid "Page Down" -msgstr "Page Down" - -#: zrcolaapp.cpp:189 -msgid "Home" -msgstr "Home" - -#: zrcolaapp.cpp:190 -msgid "End" -msgstr "End" - -#: zrcolaapp.cpp:192 -msgid "Left" -msgstr "Left" - -#: zrcolaapp.cpp:193 -msgid "Up" -msgstr "Up" - -#: zrcolaapp.cpp:194 -msgid "Right" -msgstr "Right" - -#: zrcolaapp.cpp:195 -msgid "Down" -msgstr "Down" - -#: zrcolaapp.cpp:197 -msgid "Num Lock" -msgstr "Num Lock" - -#: zrcolafrm.cpp:91 +#: zrcolafrm.cpp:105 #, c-format msgid "Select %s language for decomposition" msgstr "Izberi jezik %s za razstavljanje" -#: zrcolafrm.cpp:110 +#: zrcolafrm.cpp:127 msgid "" "ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality " "will not be available." @@ -174,11 +37,11 @@ msgstr "" "ZRColine bližnjice na tipkovnici Win+F5 ni mogoče registrirati. Nekaj " "funkcionalnosti ne bo na voljo." -#: zrcolafrm.cpp:110 zrcolafrm.cpp:112 +#: zrcolafrm.cpp:127 zrcolafrm.cpp:129 msgid "Warning" msgstr "Opozorilo" -#: zrcolafrm.cpp:112 +#: zrcolafrm.cpp:129 msgid "" "ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality " "will not be available." @@ -186,11 +49,11 @@ msgstr "" "ZRColine bližnjice na tipkovnici Win+F6 ni mogoče registrirati. Nekaj " "funkcionalnosti ne bo na voljo." -#: zrcolafrm.cpp:187 +#: zrcolafrm.cpp:212 msgid "Start ZRCola automatically on logon" msgstr "Samodejno zaženi ZRColo ob prijavi" -#: zrcolafrm.cpp:399 +#: zrcolafrm.cpp:459 #, c-format msgid "" "ZRCola v%s\n" @@ -199,7 +62,7 @@ msgstr "" "ZRCola v%s\n" "Vse pravice pridržane 2015-%s Amebis" -#: zrcolafrm.cpp:399 +#: zrcolafrm.cpp:459 msgid "About ZRCola" msgstr "O ZRColi" @@ -232,141 +95,169 @@ msgid "Select all text" msgstr "Izberi celotno besedilo" #: zrcolagui.cpp:84 +msgid "&Insert Character..." +msgstr "Vstav&i znak ..." + +#: zrcolagui.cpp:84 +msgid "Display character selector to select character to insert into text" +msgstr "Prikaži izbirnik znaka za izbor znaka za vstavljanje v besedilo" + +#: zrcolagui.cpp:90 msgid "&Send Composed" msgstr "Pošlji &sestavljeno" -#: zrcolagui.cpp:84 zrcolagui.cpp:159 +#: zrcolagui.cpp:90 zrcolagui.cpp:165 msgid "Send composed text to source window" msgstr "Pošlji sestavljeno besedilo izvornemu oknu" -#: zrcolagui.cpp:93 +#: zrcolagui.cpp:99 msgid "Send &Decomposed" msgstr "Pošlji &razstavljeno" -#: zrcolagui.cpp:93 zrcolagui.cpp:161 +#: zrcolagui.cpp:99 zrcolagui.cpp:167 msgid "Send decomposed text to source window" msgstr "Pošlji razstavljeno besedilo izvornemu oknu" -#: zrcolagui.cpp:102 +#: zrcolagui.cpp:108 msgid "Abort (De)composition" msgstr "Prekini raz/sestavljanje" -#: zrcolagui.cpp:102 +#: zrcolagui.cpp:108 msgid "Abort composition and return focus to source window" msgstr "Prekini sestavljanje in vrni fokus nazaj izvornemu oknu" -#: zrcolagui.cpp:111 +#: zrcolagui.cpp:117 msgid "&Language" msgstr "&Jezik" -#: zrcolagui.cpp:113 +#: zrcolagui.cpp:119 msgid "&Automatic" msgstr "S&amodejno" -#: zrcolagui.cpp:113 +#: zrcolagui.cpp:119 msgid "Set language according to keyboard layout automatically" msgstr "Samodejno nastavi jezik glede na izbrano tipkovnico" -#: zrcolagui.cpp:120 +#: zrcolagui.cpp:126 msgid "&Edit" msgstr "Ur&edi" -#: zrcolagui.cpp:124 +#: zrcolagui.cpp:130 msgid "&Edit Toolbar" msgstr "Orodna vrstica za ur&ejanje" -#: zrcolagui.cpp:124 +#: zrcolagui.cpp:130 msgid "Toggle edit toolbar" msgstr "Prikaži/skrij orodno vrstico za urejanje" -#: zrcolagui.cpp:128 +#: zrcolagui.cpp:134 msgid "&Compose Toolbar" msgstr "Orodna vrsti&ca za sestavljanje" -#: zrcolagui.cpp:128 +#: zrcolagui.cpp:134 msgid "Toggle compose toolbar" msgstr "Prikaži/skrij orodno vrstico za sestavljanje" -#: zrcolagui.cpp:134 +#: zrcolagui.cpp:140 msgid "Character Catalo&g" msgstr "Katalo&g znakov" -#: zrcolagui.cpp:134 +#: zrcolagui.cpp:140 msgid "Toggle character catalog panel" msgstr "Prikaži/skrij katalog znakov" -#: zrcolagui.cpp:137 +#: zrcolagui.cpp:143 msgid "&View" msgstr "Po&gled" -#: zrcolagui.cpp:144 +#: zrcolagui.cpp:150 msgid "&Help" msgstr "Po&moč" -#: zrcolagui.cpp:149 +#: zrcolagui.cpp:155 msgid "Cut" msgstr "Izreži" -#: zrcolagui.cpp:149 +#: zrcolagui.cpp:155 msgid "Cut selection" msgstr "Izreži izbor" -#: zrcolagui.cpp:151 +#: zrcolagui.cpp:157 msgid "Copy" msgstr "Kopiraj" -#: zrcolagui.cpp:151 +#: zrcolagui.cpp:157 msgid "Copy selection" msgstr "Kopiraj izbor" -#: zrcolagui.cpp:153 +#: zrcolagui.cpp:159 msgid "Paste" msgstr "Prilepi" -#: zrcolagui.cpp:153 +#: zrcolagui.cpp:159 msgid "Paste selection" msgstr "Prilepi izbor" -#: zrcolagui.cpp:156 +#: zrcolagui.cpp:162 msgid "Edit" msgstr "Urejanje" -#: zrcolagui.cpp:159 +#: zrcolagui.cpp:165 msgid "Send Composed" msgstr "Pošlji sestavljeno" -#: zrcolagui.cpp:161 +#: zrcolagui.cpp:167 msgid "Send Decomposed" msgstr "Pošlji razstavljeno" -#: zrcolagui.cpp:170 +#: zrcolagui.cpp:176 msgid "Compose" msgstr "Sestavljanje" -#: zrcolagui.cpp:174 +#: zrcolagui.cpp:180 msgid "Character Catalog" msgstr "Katalog znakov" -#: zrcolagui.cpp:178 +#: zrcolagui.cpp:184 msgid "(De)Composer" msgstr "Raz/Sestavljalnik" -#: zrcolagui.cpp:213 +#: zrcolagui.cpp:223 msgid "Decomposed Text" msgstr "Razstavljeno besedilo" -#: zrcolagui.cpp:233 +#: zrcolagui.cpp:243 msgid "Decomposed Unicode Dump" msgstr "Unicode razstavljenega" -#: zrcolagui.cpp:260 +#: zrcolagui.cpp:270 msgid "Composed Text" msgstr "Sestavljeno besedilo" -#: zrcolagui.cpp:280 +#: zrcolagui.cpp:290 msgid "Composed Unicode Dump" msgstr "Unicode sestavljenega" +#: zrcolagui.cpp:407 +msgid "&Browse" +msgstr "Pre&brskaj" + +#: zrcolagui.cpp:475 +msgid "Re¢ly Used" +msgstr "Nedavno &uporabljeni" + +#: zrcolagui.cpp:533 +msgid "&Unicode" +msgstr "&Unicode" + +#: zrcolagui.cpp:545 +msgid "Preview" +msgstr "Predogled" + +#: zrcolagui.cpp:580 +msgid "Re&lated" +msgstr "&Sorodni" + #: zrcolakeyhndlr.cpp:44 msgid "" "INS key is pressed. Type the Unicode code of desired character now (up to " @@ -375,28 +266,133 @@ msgstr "" "Pritisnjena tipka INS. Zdaj vtpikajte kodo Unicode želenega znaka (do štiri " "šestnajstiške števke: 0-9, A-F), nato izpustite INS." -#: zrcolagui.h:86 MSIBuild/En.Win32.Debug.Feature-2.idtx:4 -#: MSIBuild/En.Win32.Debug.Shortcut-2.idtx:4 -#: MSIBuild/En.x64.Debug.Feature-2.idtx:4 -#: MSIBuild/En.x64.Debug.Shortcut-2.idtx:4 -msgid "ZRCola" -msgstr "ZRCola" +#: zrcolagui.h:200 +msgid "Character Selector" +msgstr "Izbirnik znaka" # Windows charset for this language (decimal) -#: MSIBuild/En.Win32.Debug.Feature-2.idtx:3 -#: MSIBuild/En.Win32.Debug.Shortcut-2.idtx:3 -#: MSIBuild/En.x64.Debug.Feature-2.idtx:3 -#: MSIBuild/En.x64.Debug.Shortcut-2.idtx:3 +#: MSIBuild/En.Win32.Release.Feature-2.idtx:3 +#: MSIBuild/En.Win32.Release.Shortcut-2.idtx:3 +#: MSIBuild/En.x64.Release.Feature-2.idtx:3 +#: MSIBuild/En.x64.Release.Shortcut-2.idtx:3 msgid "1252" msgstr "1250" -#: MSIBuild/En.Win32.Debug.Feature-2.idtx:4 -#: MSIBuild/En.Win32.Debug.Shortcut-2.idtx:4 -#: MSIBuild/En.x64.Debug.Feature-2.idtx:4 -#: MSIBuild/En.x64.Debug.Shortcut-2.idtx:4 +#: MSIBuild/En.Win32.Release.Feature-2.idtx:4 +#: MSIBuild/En.Win32.Release.Shortcut-2.idtx:4 +#: MSIBuild/En.x64.Release.Feature-2.idtx:4 +#: MSIBuild/En.x64.Release.Shortcut-2.idtx:4 msgid "Input system for linguistic use" msgstr "Vnašalni sistem za jezikoslovno rabo" +#~ msgid "Esc" +#~ msgstr "Esc" + +#~ msgid "F1" +#~ msgstr "F1" + +#~ msgid "F2" +#~ msgstr "F2" + +#~ msgid "F3" +#~ msgstr "F3" + +#~ msgid "F4" +#~ msgstr "F4" + +#~ msgid "F5" +#~ msgstr "F5" + +#~ msgid "F6" +#~ msgstr "F6" + +#~ msgid "F7" +#~ msgstr "F7" + +#~ msgid "F8" +#~ msgstr "F8" + +#~ msgid "F9" +#~ msgstr "F9" + +#~ msgid "F10" +#~ msgstr "F10" + +#~ msgid "F11" +#~ msgstr "F11" + +#~ msgid "F12" +#~ msgstr "F12" + +#~ msgid "Print Screen" +#~ msgstr "Print Screen" + +#~ msgid "Scroll Lock" +#~ msgstr "Scroll Lock" + +#~ msgid "Pause" +#~ msgstr "Pause" + +#~ msgid "Backspace" +#~ msgstr "Backspace" + +#~ msgid "Tab" +#~ msgstr "Tab" + +#~ msgid "Caps Lock" +#~ msgstr "Caps Lock" + +#~ msgid "Return" +#~ msgstr "Return" + +#~ msgid "Space" +#~ msgstr "preslednica" + +#~ msgid "Shift" +#~ msgstr "Shift" + +#~ msgid "Alt" +#~ msgstr "Alt" + +#~ msgid "Ctrl" +#~ msgstr "Ctrl" + +#~ msgid "Menu" +#~ msgstr "Menu" + +#~ msgid "Insert" +#~ msgstr "Insert" + +#~ msgid "Delete" +#~ msgstr "Delete" + +#~ msgid "Page Up" +#~ msgstr "Page Up" + +#~ msgid "Page Down" +#~ msgstr "Page Down" + +#~ msgid "Home" +#~ msgstr "Home" + +#~ msgid "End" +#~ msgstr "End" + +#~ msgid "Left" +#~ msgstr "Left" + +#~ msgid "Up" +#~ msgstr "Up" + +#~ msgid "Right" +#~ msgstr "Right" + +#~ msgid "Down" +#~ msgstr "Down" + +#~ msgid "Num Lock" +#~ msgstr "Num Lock" + #~ msgid "`" #~ msgstr "`" diff --git a/ZRCola/stdafx.h b/ZRCola/stdafx.h index 44638e2..ac441da 100644 --- a/ZRCola/stdafx.h +++ b/ZRCola/stdafx.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/ZRCola/zrcolachrslct.cpp b/ZRCola/zrcolachrslct.cpp new file mode 100644 index 0000000..6593dc5 --- /dev/null +++ b/ZRCola/zrcolachrslct.cpp @@ -0,0 +1,89 @@ +/* + 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 . +*/ + +#include "stdafx.h" + + +////////////////////////////////////////////////////////////////////////// +// wxZRColaCharSelect +////////////////////////////////////////////////////////////////////////// + +wxZRColaCharSelect::wxZRColaCharSelect(wxWindow* parent) : wxZRColaCharSelectBase(parent) +{ + wxTextValidator *validator = dynamic_cast(m_unicode->GetValidator()); + if (validator) + validator->SetCharIncludes(wxT("0123456789ABCDEFabcdef")); +} + + +////////////////////////////////////////////////////////////////////////// +// wxPersistentZRColaCharSelect +////////////////////////////////////////////////////////////////////////// + +wxPersistentZRColaCharSelect::wxPersistentZRColaCharSelect(wxZRColaCharSelect *wnd) : wxPersistentWindow(wnd) +{ +} + + +wxString wxPersistentZRColaCharSelect::GetKind() const +{ + return wxT(wxPERSIST_TLW_KIND); +} + + +void wxPersistentZRColaCharSelect::Save() const +{ + const wxZRColaCharSelect * const wnd = static_cast(GetWindow()); + + // Code copied from wxPersistentTLW::Save() + const wxPoint pos = wnd->GetScreenPosition(); + SaveValue(wxPERSIST_TLW_X, pos.x); + SaveValue(wxPERSIST_TLW_Y, pos.y); +} + + +bool wxPersistentZRColaCharSelect::Restore() +{ + wxZRColaCharSelect * const wnd = static_cast(GetWindow()); + + // Code copied from wxPersistentTLW::Restore() + long + x wxDUMMY_INITIALIZE(-1), + y wxDUMMY_INITIALIZE(-1); + const wxSize size = wnd->GetSize(); + const bool hasPos = RestoreValue(wxPERSIST_TLW_X, &x) && + RestoreValue(wxPERSIST_TLW_Y, &y); + + if (hasPos) { + // to avoid making the window completely invisible if it had been + // shown on a monitor which was disconnected since the last run + // (this is pretty common for notebook with external displays) + // + // NB: we should allow window position to be (slightly) off screen, + // it's not uncommon to position the window so that its upper + // left corner has slightly negative coordinate + if (wxDisplay::GetFromPoint(wxPoint(x , y )) != wxNOT_FOUND || + wxDisplay::GetFromPoint(wxPoint(x + size.x, y + size.y)) != wxNOT_FOUND) + { + wnd->Move(x, y, wxSIZE_ALLOW_MINUS_ONE); + } + } + + return true; +} diff --git a/ZRCola/zrcolachrslct.h b/ZRCola/zrcolachrslct.h new file mode 100644 index 0000000..48d765e --- /dev/null +++ b/ZRCola/zrcolachrslct.h @@ -0,0 +1,59 @@ +/* + 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 . +*/ + + +/// +/// Forward declarations +/// +class wxZRColaCharSelect; + + +#pragma once + +#include "zrcolagui.h" + + +/// +/// ZRCola character select dialog +/// +class wxZRColaCharSelect : public wxZRColaCharSelectBase +{ +public: + wxZRColaCharSelect(wxWindow* parent); +}; + + +/// +/// Supports saving/restoring wxZRColaCharSelect state +/// +class wxPersistentZRColaCharSelect : public wxPersistentWindow +{ +public: + wxPersistentZRColaCharSelect(wxZRColaCharSelect *wnd); + + virtual wxString GetKind() const; + virtual void Save() const; + virtual bool Restore(); +}; + + +inline wxPersistentObject *wxCreatePersistentObject(wxZRColaCharSelect *wnd) +{ + return new wxPersistentZRColaCharSelect(wnd); +} diff --git a/ZRCola/zrcolafrm.cpp b/ZRCola/zrcolafrm.cpp index aa099f1..e42c658 100644 --- a/ZRCola/zrcolafrm.cpp +++ b/ZRCola/zrcolafrm.cpp @@ -39,6 +39,8 @@ wxBEGIN_EVENT_TABLE(wxZRColaFrame, wxZRColaFrameBase) EVT_MENU (wxID_SEND_DECOMPOSED , wxZRColaFrame::OnSendDecomposed ) EVT_MENU (wxID_SEND_ABORT , wxZRColaFrame::OnSendAbort ) + EVT_MENU (wxID_INSERT_CHARACTER , wxZRColaFrame::OnInsertCharacter ) + EVT_UPDATE_UI (wxID_DECOMP_LANG_AUTO , wxZRColaFrame::OnDecomposedLanguageAutoUpdate) EVT_MENU (wxID_DECOMP_LANG_AUTO , wxZRColaFrame::OnDecomposedLanguageAuto ) EVT_UPDATE_UI_RANGE(wxID_DECOMP_LANGUAGE_START, wxID_DECOMP_LANGUAGE_END, wxZRColaFrame::OnDecomposedLanguageUpdate ) @@ -59,6 +61,7 @@ wxEND_EVENT_TABLE() wxZRColaFrame::wxZRColaFrame() : m_lang_auto(true), m_hWndSource(NULL), + m_chrSelect(NULL), wxZRColaFrameBase(NULL) { { @@ -116,6 +119,9 @@ wxZRColaFrame::wxZRColaFrame() : // Set focus. m_panel->m_decomposed->SetFocus(); + m_chrSelect = new wxZRColaCharSelect(this); + wxPersistentRegisterAndRestore(m_chrSelect); + // Register global hotkey(s). if (!RegisterHotKey(wxZRColaHKID_INVOKE_COMPOSE, wxMOD_WIN, VK_F5)) wxMessageBox(_("ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality will not be available."), _("Warning"), wxOK | wxICON_WARNING); @@ -164,6 +170,9 @@ wxZRColaFrame::~wxZRColaFrame() UnregisterHotKey(wxZRColaHKID_INVOKE_DECOMPOSE); UnregisterHotKey(wxZRColaHKID_INVOKE_COMPOSE); + if (m_chrSelect) + delete m_chrSelect; + if (m_taskBarIcon) { m_taskBarIcon->Disconnect(wxEVT_TASKBAR_LEFT_DOWN, wxTaskBarIconEventHandler(wxZRColaFrame::OnTaskbarIconClick), NULL, this); delete m_taskBarIcon; @@ -246,6 +255,12 @@ void wxZRColaFrame::OnForwardEvent(wxCommandEvent& event) } +void wxZRColaFrame::OnInsertCharacter(wxCommandEvent& event) +{ + m_chrSelect->ShowModal(); +} + + void wxZRColaFrame::OnSendUpdate(wxUpdateUIEvent& event) { event.Enable(m_hWndSource ? true : false); diff --git a/ZRCola/zrcolafrm.h b/ZRCola/zrcolafrm.h index 7aebaac..deed9d1 100644 --- a/ZRCola/zrcolafrm.h +++ b/ZRCola/zrcolafrm.h @@ -26,6 +26,7 @@ class wxZRColaFrame; #pragma once #include "zrcolagui.h" +#include "zrcolachrslct.h" #include #include #include @@ -70,6 +71,7 @@ protected: void OnExit(wxCommandEvent& event); void OnForwardEventUpdate(wxUpdateUIEvent& event); void OnForwardEvent(wxCommandEvent& event); + void OnInsertCharacter(wxCommandEvent& event); void OnSendUpdate(wxUpdateUIEvent& event); void OnSendComposed(wxCommandEvent& event); void OnSendDecomposed(wxCommandEvent& event); @@ -118,10 +120,11 @@ protected: #endif protected: - bool m_lang_auto; ///< Automatic language selection according to keyboard layout - ZRCola::langid_t m_lang; ///< Language for decomposing - WXHWND m_hWndSource; ///< handle of the active window, when the ZRCola hotkey was pressed - wxTaskBarIcon *m_taskBarIcon; ///< Taskbar icon + bool m_lang_auto; ///< Automatic language selection according to keyboard layout + ZRCola::langid_t m_lang; ///< Language for decomposing + WXHWND m_hWndSource; ///< handle of the active window, when the ZRCola hotkey was pressed + wxTaskBarIcon *m_taskBarIcon; ///< Taskbar icon + wxZRColaCharSelect *m_chrSelect; ///< Character selection dialog }; diff --git a/ZRCola/zrcolagui.cpp b/ZRCola/zrcolagui.cpp index 6e4b6a7..7083998 100644 --- a/ZRCola/zrcolagui.cpp +++ b/ZRCola/zrcolagui.cpp @@ -80,6 +80,12 @@ wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxS m_menuEdit->AppendSeparator(); + wxMenuItem* m_menuInsertCharacter; + m_menuInsertCharacter = new wxMenuItem( m_menuEdit, wxID_INSERT_CHARACTER, wxString( _("&Insert Character...") ) + wxT('\t') + wxT("F8"), _("Display character selector to select character to insert into text"), wxITEM_NORMAL ); + m_menuEdit->Append( m_menuInsertCharacter ); + + m_menuEdit->AppendSeparator(); + wxMenuItem* m_menuItemSendComposed; m_menuItemSendComposed = new wxMenuItem( m_menuEdit, wxID_SEND_COMPOSED, wxString( _("&Send Composed") ) + wxT('\t') + wxT("F5"), _("Send composed text to source window"), wxITEM_NORMAL ); #ifdef __WXMSW__ @@ -383,3 +389,274 @@ wxZRColaCharacterCatalogPanelBase::~wxZRColaCharacterCatalogPanelBase() m_grid->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( wxZRColaCharacterCatalogPanelBase::OnGridKeyDown ), NULL, this ); } + +wxZRColaCharSelectBase::wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxDialog( parent, id, title, pos, size, style, name ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizerContent; + bSizerContent = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizerColumns; + bSizerColumns = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizerLeft; + bSizerLeft = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizerBrowse; + sbSizerBrowse = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("&Browse") ), wxVERTICAL ); + + m_search = new wxSearchCtrl( sbSizerBrowse->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + #ifndef __WXMAC__ + m_search->ShowSearchButton( true ); + #endif + m_search->ShowCancelButton( true ); + sbSizerBrowse->Add( m_search, 0, wxALL|wxEXPAND, 5 ); + + m_gridResults = new wxGrid( sbSizerBrowse->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + + // Grid + m_gridResults->CreateGrid( 10, 16 ); + m_gridResults->EnableEditing( false ); + m_gridResults->EnableGridLines( true ); + m_gridResults->EnableDragGridSize( false ); + m_gridResults->SetMargins( 0, 0 ); + + // Columns + m_gridResults->SetColSize( 0, 35 ); + m_gridResults->SetColSize( 1, 35 ); + m_gridResults->SetColSize( 2, 35 ); + m_gridResults->SetColSize( 3, 35 ); + m_gridResults->SetColSize( 4, 35 ); + m_gridResults->SetColSize( 5, 35 ); + m_gridResults->SetColSize( 6, 35 ); + m_gridResults->SetColSize( 7, 35 ); + m_gridResults->SetColSize( 8, 35 ); + m_gridResults->SetColSize( 9, 35 ); + m_gridResults->SetColSize( 10, 35 ); + m_gridResults->SetColSize( 11, 35 ); + m_gridResults->SetColSize( 12, 35 ); + m_gridResults->SetColSize( 13, 35 ); + m_gridResults->SetColSize( 14, 35 ); + m_gridResults->SetColSize( 15, 35 ); + m_gridResults->EnableDragColMove( false ); + m_gridResults->EnableDragColSize( false ); + m_gridResults->SetColLabelSize( 0 ); + m_gridResults->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Rows + m_gridResults->SetRowSize( 0, 35 ); + m_gridResults->SetRowSize( 1, 35 ); + m_gridResults->SetRowSize( 2, 35 ); + m_gridResults->SetRowSize( 3, 35 ); + m_gridResults->SetRowSize( 4, 35 ); + m_gridResults->SetRowSize( 5, 35 ); + m_gridResults->SetRowSize( 6, 35 ); + m_gridResults->SetRowSize( 7, 35 ); + m_gridResults->SetRowSize( 8, 35 ); + m_gridResults->SetRowSize( 9, 35 ); + m_gridResults->EnableDragRowSize( false ); + m_gridResults->SetRowLabelSize( 0 ); + m_gridResults->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Label Appearance + + // Cell Defaults + m_gridResults->SetDefaultCellFont( wxFont( 20, 70, 90, 90, false, wxT("00 ZRCola") ) ); + m_gridResults->SetDefaultCellAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + m_gridResults->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) ); + + sbSizerBrowse->Add( m_gridResults, 0, wxALL|wxEXPAND, 5 ); + + + bSizerLeft->Add( sbSizerBrowse, 0, wxALL|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizerRecent; + sbSizerRecent = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Re¢ly Used") ), wxVERTICAL ); + + m_gridRecent = new wxGrid( sbSizerRecent->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + + // Grid + m_gridRecent->CreateGrid( 1, 16 ); + m_gridRecent->EnableEditing( false ); + m_gridRecent->EnableGridLines( true ); + m_gridRecent->EnableDragGridSize( false ); + m_gridRecent->SetMargins( 0, 0 ); + + // Columns + m_gridRecent->SetColSize( 0, 35 ); + m_gridRecent->SetColSize( 1, 35 ); + m_gridRecent->SetColSize( 2, 35 ); + m_gridRecent->SetColSize( 3, 35 ); + m_gridRecent->SetColSize( 4, 35 ); + m_gridRecent->SetColSize( 5, 35 ); + m_gridRecent->SetColSize( 6, 35 ); + m_gridRecent->SetColSize( 7, 35 ); + m_gridRecent->SetColSize( 8, 35 ); + m_gridRecent->SetColSize( 9, 35 ); + m_gridRecent->SetColSize( 10, 35 ); + m_gridRecent->SetColSize( 11, 35 ); + m_gridRecent->SetColSize( 12, 35 ); + m_gridRecent->SetColSize( 13, 35 ); + m_gridRecent->SetColSize( 14, 35 ); + m_gridRecent->SetColSize( 15, 35 ); + m_gridRecent->EnableDragColMove( false ); + m_gridRecent->EnableDragColSize( false ); + m_gridRecent->SetColLabelSize( 0 ); + m_gridRecent->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Rows + m_gridRecent->SetRowSize( 0, 35 ); + m_gridRecent->EnableDragRowSize( false ); + m_gridRecent->SetRowLabelSize( 0 ); + m_gridRecent->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Label Appearance + + // Cell Defaults + m_gridRecent->SetDefaultCellFont( wxFont( 20, 70, 90, 90, false, wxT("00 ZRCola") ) ); + m_gridRecent->SetDefaultCellAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + m_gridRecent->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) ); + + sbSizerRecent->Add( m_gridRecent, 0, wxALL, 5 ); + + + bSizerLeft->Add( sbSizerRecent, 0, wxALL|wxEXPAND, 5 ); + + + bSizerColumns->Add( bSizerLeft, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizerRight; + bSizerRight = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizerUnicode; + sbSizerUnicode = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("&Unicode") ), wxVERTICAL ); + + m_unicode = new wxTextCtrl( sbSizerUnicode->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CENTRE ); + m_unicode->SetMaxLength( 4 ); + m_unicode->SetValidator( wxTextValidator( wxFILTER_INCLUDE_CHAR_LIST, &m_unicodeValid ) ); + + sbSizerUnicode->Add( m_unicode, 0, wxALL|wxEXPAND, 5 ); + + + bSizerRight->Add( sbSizerUnicode, 0, wxALL|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizerPreview; + sbSizerPreview = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Preview") ), wxVERTICAL ); + + m_gridPreview = new wxGrid( sbSizerPreview->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + + // Grid + m_gridPreview->CreateGrid( 1, 1 ); + m_gridPreview->EnableEditing( false ); + m_gridPreview->EnableGridLines( false ); + m_gridPreview->EnableDragGridSize( false ); + m_gridPreview->SetMargins( 0, 0 ); + + // Columns + m_gridPreview->SetColSize( 0, 250 ); + m_gridPreview->EnableDragColMove( false ); + m_gridPreview->EnableDragColSize( false ); + m_gridPreview->SetColLabelSize( 0 ); + m_gridPreview->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Rows + m_gridPreview->SetRowSize( 0, 250 ); + m_gridPreview->EnableDragRowSize( false ); + m_gridPreview->SetRowLabelSize( 0 ); + m_gridPreview->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Label Appearance + + // Cell Defaults + m_gridPreview->SetDefaultCellFont( wxFont( 180, 70, 90, 90, false, wxT("00 ZRCola") ) ); + m_gridPreview->SetDefaultCellAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + sbSizerPreview->Add( m_gridPreview, 0, wxALIGN_CENTER|wxALL, 5 ); + + + bSizerRight->Add( sbSizerPreview, 0, wxALL|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizerRelated; + sbSizerRelated = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Re&lated") ), wxVERTICAL ); + + m_gridRelated = new wxGrid( sbSizerRelated->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + + // Grid + m_gridRelated->CreateGrid( 3, 7 ); + m_gridRelated->EnableEditing( false ); + m_gridRelated->EnableGridLines( true ); + m_gridRelated->EnableDragGridSize( false ); + m_gridRelated->SetMargins( 0, 0 ); + + // Columns + m_gridRelated->SetColSize( 0, 35 ); + m_gridRelated->SetColSize( 1, 35 ); + m_gridRelated->SetColSize( 2, 35 ); + m_gridRelated->SetColSize( 3, 35 ); + m_gridRelated->SetColSize( 4, 35 ); + m_gridRelated->SetColSize( 5, 35 ); + m_gridRelated->SetColSize( 6, 35 ); + m_gridRelated->EnableDragColMove( false ); + m_gridRelated->EnableDragColSize( false ); + m_gridRelated->SetColLabelSize( 0 ); + m_gridRelated->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Rows + m_gridRelated->SetRowSize( 0, 35 ); + m_gridRelated->SetRowSize( 1, 35 ); + m_gridRelated->SetRowSize( 2, 35 ); + m_gridRelated->EnableDragRowSize( false ); + m_gridRelated->SetRowLabelSize( 0 ); + m_gridRelated->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Label Appearance + + // Cell Defaults + m_gridRelated->SetDefaultCellFont( wxFont( 20, 70, 90, 90, false, wxT("00 ZRCola") ) ); + m_gridRelated->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); + sbSizerRelated->Add( m_gridRelated, 0, wxALIGN_CENTER|wxALL, 5 ); + + + bSizerRight->Add( sbSizerRelated, 1, wxALL|wxEXPAND, 5 ); + + + bSizerColumns->Add( bSizerRight, 0, wxEXPAND, 5 ); + + + bSizerContent->Add( bSizerColumns, 1, wxEXPAND, 5 ); + + + bSizerContent->Add( 5, 5, 0, wxALL|wxEXPAND, 5 ); + + m_sdbSizerButtons = new wxStdDialogButtonSizer(); + m_sdbSizerButtonsOK = new wxButton( this, wxID_OK ); + m_sdbSizerButtons->AddButton( m_sdbSizerButtonsOK ); + m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL ); + m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel ); + m_sdbSizerButtons->Realize(); + + bSizerContent->Add( m_sdbSizerButtons, 0, wxALL|wxEXPAND, 5 ); + + + this->SetSizer( bSizerContent ); + this->Layout(); + bSizerContent->Fit( this ); + + // Connect Events + m_search->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaCharSelectBase::OnSearchText ), NULL, this ); + m_gridResults->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( wxZRColaCharSelectBase::OnResultSelectCell ), NULL, this ); + m_gridRecent->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( wxZRColaCharSelectBase::OnRecentSelectCell ), NULL, this ); + m_unicode->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaCharSelectBase::OnUnicodeText ), NULL, this ); + m_gridRelated->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( wxZRColaCharSelectBase::OnRelatedSelectCell ), NULL, this ); +} + +wxZRColaCharSelectBase::~wxZRColaCharSelectBase() +{ + // Disconnect Events + m_search->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaCharSelectBase::OnSearchText ), NULL, this ); + m_gridResults->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( wxZRColaCharSelectBase::OnResultSelectCell ), NULL, this ); + m_gridRecent->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( wxZRColaCharSelectBase::OnRecentSelectCell ), NULL, this ); + m_unicode->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaCharSelectBase::OnUnicodeText ), NULL, this ); + m_gridRelated->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( wxZRColaCharSelectBase::OnRelatedSelectCell ), NULL, this ); + +} diff --git a/ZRCola/zrcolagui.h b/ZRCola/zrcolagui.h index 901e9d7..92f3e7c 100644 --- a/ZRCola/zrcolagui.h +++ b/ZRCola/zrcolagui.h @@ -36,6 +36,10 @@ class wxZRColaComposerPanel; #include #include #include +#include +#include +#include +#include /////////////////////////////////////////////////////////////////////////// @@ -50,6 +54,7 @@ class wxZRColaFrameBase : public wxFrame enum { wxID_AUTOSTART = 1000, + wxID_INSERT_CHARACTER, wxID_SEND_COMPOSED, wxID_SEND_DECOMPOSED, wxID_SEND_ABORT, @@ -163,4 +168,38 @@ class wxZRColaCharacterCatalogPanelBase : public wxPanel }; +/////////////////////////////////////////////////////////////////////////////// +/// Class wxZRColaCharSelectBase +/////////////////////////////////////////////////////////////////////////////// +class wxZRColaCharSelectBase : public wxDialog +{ + private: + + protected: + wxSearchCtrl* m_search; + wxGrid* m_gridResults; + wxGrid* m_gridRecent; + wxTextCtrl* m_unicode; + wxGrid* m_gridPreview; + wxGrid* m_gridRelated; + wxStdDialogButtonSizer* m_sdbSizerButtons; + wxButton* m_sdbSizerButtonsOK; + wxButton* m_sdbSizerButtonsCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnSearchText( wxCommandEvent& event ) { event.Skip(); } + virtual void OnResultSelectCell( wxGridEvent& event ) { event.Skip(); } + virtual void OnRecentSelectCell( wxGridEvent& event ) { event.Skip(); } + virtual void OnUnicodeText( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRelatedSelectCell( wxGridEvent& event ) { event.Skip(); } + + + public: + wxString m_unicodeValid; + + wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Character Selector"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharSelect") ); + ~wxZRColaCharSelectBase(); + +}; + #endif //__ZRCOLAGUI_H__