kephra-0.4.3.34+dfsg.orig/0000755000175000017500000000000012320270630014360 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/LICENSE0000644000175000017500000004361411573645310015407 0ustar gregoagregoa GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program 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 2 of the License, or (at your option) any later version. This program 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 this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. kephra-0.4.3.34+dfsg.orig/MANIFEST0000644000175000017500000002352212320270630015515 0ustar gregoagregoabin/kephra Changes dev.pl doc/Bugs doc/interna/manifest.txt doc/interna/perlrules.txt doc/interna/sketch.txt doc/patches/current-fixes.txt doc/patches/outline_parser.pl doc/patches/print-draft.pl doc/Roadmap doc/StableReleases doc/TestingReleases doc/Todo ignore.txt inc/Module/Install.pm inc/Module/Install/Base.pm inc/Module/Install/Can.pm inc/Module/Install/Fetch.pm inc/Module/Install/Makefile.pm inc/Module/Install/MakeMaker.pm inc/Module/Install/Metadata.pm inc/Module/Install/Scripts.pm inc/Module/Install/Share.pm inc/Module/Install/TestBase.pm inc/Module/Install/Win32.pm inc/Module/Install/WriteAll.pm lib/Kephra.pm lib/Kephra/API.pm lib/Kephra/App.pm lib/Kephra/App/ContextMenu.pm lib/Kephra/App/EditPanel.pm lib/Kephra/App/EditPanel/Fold.pm lib/Kephra/App/EditPanel/Indicator.pm lib/Kephra/App/EditPanel/Margin.pm lib/Kephra/App/MainToolBar.pm lib/Kephra/App/MenuBar.pm lib/Kephra/App/Panel.pm lib/Kephra/App/Panel/CommandLine.pm lib/Kephra/App/Panel/Notepad.pm lib/Kephra/App/Panel/Output.pm lib/Kephra/App/Panel/TreeTool.pm lib/Kephra/App/SearchBar.pm lib/Kephra/App/StatusBar.pm lib/Kephra/App/StatusBar.pm~ lib/Kephra/App/TabBar.pm lib/Kephra/App/Window.pm lib/Kephra/CommandList.pm lib/Kephra/Config.pm lib/Kephra/Config/Default.pm lib/Kephra/Config/Default/CommandList.pm lib/Kephra/Config/Default/ContextMenus.pm lib/Kephra/Config/Default/GlobalSettings.pm lib/Kephra/Config/Default/Localisation.pm lib/Kephra/Config/Default/MainMenu.pm lib/Kephra/Config/Default/ToolBars.pm lib/Kephra/Config/File.pm lib/Kephra/Config/Global.pm lib/Kephra/Config/Interface.pm lib/Kephra/Config/Localisation.pm lib/Kephra/Config/Tree.pm lib/Kephra/Dialog.pm lib/Kephra/Dialog/Color.pm lib/Kephra/Dialog/Config.pm lib/Kephra/Dialog/Exit.pm lib/Kephra/Dialog/Info.pm lib/Kephra/Dialog/Keymap.pm lib/Kephra/Dialog/Notify.pm lib/Kephra/Dialog/Search.pm lib/Kephra/Document.pm lib/Kephra/Document/Change.pm lib/Kephra/Document/Data.pm lib/Kephra/Document/Property.pm lib/Kephra/Document/SyntaxMode.pm lib/Kephra/Edit.pm lib/Kephra/Edit/Comment.pm lib/Kephra/Edit/Convert.pm lib/Kephra/Edit/Format.pm lib/Kephra/Edit/Goto.pm lib/Kephra/Edit/History.pm lib/Kephra/Edit/Marker.pm lib/Kephra/Edit/Search.pm lib/Kephra/Edit/Search/InputTarget.pm lib/Kephra/Edit/Select.pm lib/Kephra/Edit/Special.pm lib/Kephra/EventTable.pm lib/Kephra/File.pm lib/Kephra/File/History.pm lib/Kephra/File/IO.pm lib/Kephra/File/Session.pm lib/Kephra/Help.pm lib/Kephra/Log.pm lib/Kephra/Macro.pm lib/Kephra/Menu.pm lib/Kephra/Plugin.pm lib/Kephra/Plugin/Demo.pm lib/Kephra/ToolBar.pm LICENSE Makefile.PL MANIFEST This list of files MANIFEST.SKIP META.yml README share/config/global/autosaved.conf share/config/global/autosaved.conf.old share/config/global/autosaved.conf~ share/config/global/data/notepad_content.txt share/config/global/data/search.yml share/config/global/sub/documentation/cesky.conf share/config/global/sub/documentation/deutsch.conf share/config/global/sub/documentation/english.conf share/config/global/sub/pbs.conf share/config/interface/appbars.yml share/config/interface/cache/index_l18n.yml share/config/interface/commands.conf share/config/interface/contextmenus.yml share/config/interface/icon/app/wxpl.ico share/config/interface/icon/set/jenne/app-exit.xpm share/config/interface/icon/set/jenne/bookmark0.xpm share/config/interface/icon/set/jenne/bookmark1.xpm share/config/interface/icon/set/jenne/bookmark2.xpm share/config/interface/icon/set/jenne/bookmark3.xpm share/config/interface/icon/set/jenne/bookmark4.xpm share/config/interface/icon/set/jenne/bookmark5.xpm share/config/interface/icon/set/jenne/bookmark6.xpm share/config/interface/icon/set/jenne/bookmark7.xpm share/config/interface/icon/set/jenne/bookmark8.xpm share/config/interface/icon/set/jenne/bookmark9.xpm share/config/interface/icon/set/jenne/clean-up.xpm share/config/interface/icon/set/jenne/colorpicker.xpm share/config/interface/icon/set/jenne/config-mode-full.xpm share/config/interface/icon/set/jenne/config-mode-html.xpm share/config/interface/icon/set/jenne/config-mode-perl.xpm share/config/interface/icon/set/jenne/config-preferences.xpm share/config/interface/icon/set/jenne/edit-bookmark.xpm share/config/interface/icon/set/jenne/edit-copy.xpm share/config/interface/icon/set/jenne/edit-cut.xpm share/config/interface/icon/set/jenne/edit-delete.xpm share/config/interface/icon/set/jenne/edit-edit.xpm share/config/interface/icon/set/jenne/edit-paste.xpm share/config/interface/icon/set/jenne/edit-redo.xpm share/config/interface/icon/set/jenne/edit-replace.xpm share/config/interface/icon/set/jenne/edit-undo.xpm share/config/interface/icon/set/jenne/editor-fullscreen.xpm share/config/interface/icon/set/jenne/empty.xpm share/config/interface/icon/set/jenne/favourite.xpm share/config/interface/icon/set/jenne/file-close.xpm share/config/interface/icon/set/jenne/file-new.xpm share/config/interface/icon/set/jenne/file-open.xpm share/config/interface/icon/set/jenne/file-print.xpm share/config/interface/icon/set/jenne/file-save-all.xpm share/config/interface/icon/set/jenne/file-save-as.xpm share/config/interface/icon/set/jenne/file-save.xpm share/config/interface/icon/set/jenne/find-next.xpm share/config/interface/icon/set/jenne/find-previous.xpm share/config/interface/icon/set/jenne/find-start.xpm share/config/interface/icon/set/jenne/go-fast-backward.xpm share/config/interface/icon/set/jenne/go-fast-forward.xpm share/config/interface/icon/set/jenne/go-first.xpm share/config/interface/icon/set/jenne/go-last.xpm share/config/interface/icon/set/jenne/go-next.xpm share/config/interface/icon/set/jenne/go-previous.xpm share/config/interface/icon/set/jenne/goto-last-edit.xpm share/config/interface/icon/set/jenne/goto-line.xpm share/config/interface/icon/set/jenne/help-documentation.xpm share/config/interface/icon/set/jenne/help-home.xpm share/config/interface/icon/set/jenne/help-info.xpm share/config/interface/icon/set/jenne/help-keyboard.xpm share/config/interface/icon/set/jenne/help-mail.xpm share/config/interface/icon/set/jenne/help-tip.xpm share/config/interface/icon/set/jenne/image.xpm share/config/interface/icon/set/jenne/line-wrap.xpm share/config/interface/icon/set/jenne/marker-next.xpm share/config/interface/icon/set/jenne/marker-previous.xpm share/config/interface/icon/set/jenne/marker.xpm share/config/interface/icon/set/jenne/note.xpm share/config/interface/icon/set/jenne/output-panel.xpm share/config/interface/icon/set/jenne/panel-close.xpm share/config/interface/icon/set/jenne/preview.xpm share/config/interface/icon/set/jenne/reload.xpm share/config/interface/icon/set/jenne/replace-next.xpm share/config/interface/icon/set/jenne/replace-previous.xpm share/config/interface/icon/set/jenne/replace-start.xpm share/config/interface/icon/set/jenne/run-skript.xpm share/config/interface/icon/set/jenne/stay-on-top.xpm share/config/interface/icon/splash/start_kephra.jpg share/config/interface/icon/splash/start_kephra.xpm share/config/interface/iconset_jenne.conf share/config/interface/mainmenu.yml share/config/localisation/cesky.conf share/config/localisation/deutsch.conf share/config/localisation/english.conf share/config/localisation/espanol.conf share/config/localisation/norsk.conf share/config/localisation/romana.conf share/config/macro/test.macro share/config/plugin/installed.conf share/config/session/current.yaml share/config/session/history.yml share/config/syntaxhighlighter/ada.pm share/config/syntaxhighlighter/as.pm share/config/syntaxhighlighter/asm.pm share/config/syntaxhighlighter/ave.pm share/config/syntaxhighlighter/baan.pm share/config/syntaxhighlighter/batch.pm share/config/syntaxhighlighter/conf.pm share/config/syntaxhighlighter/context.pm share/config/syntaxhighlighter/cpp.pm share/config/syntaxhighlighter/cs.pm share/config/syntaxhighlighter/cs2.pm share/config/syntaxhighlighter/css.pm share/config/syntaxhighlighter/diff.pm share/config/syntaxhighlighter/eiffel.pm share/config/syntaxhighlighter/err.pm share/config/syntaxhighlighter/forth.pm share/config/syntaxhighlighter/fortran.pm share/config/syntaxhighlighter/html.pm share/config/syntaxhighlighter/idl.pm share/config/syntaxhighlighter/java.pm share/config/syntaxhighlighter/js.pm share/config/syntaxhighlighter/latex.pm share/config/syntaxhighlighter/lisp.pm share/config/syntaxhighlighter/lua.pm share/config/syntaxhighlighter/make.pm share/config/syntaxhighlighter/matlab.pm share/config/syntaxhighlighter/nsis.pm share/config/syntaxhighlighter/pascal.pm share/config/syntaxhighlighter/perl.pm share/config/syntaxhighlighter/php.pm share/config/syntaxhighlighter/property.pm share/config/syntaxhighlighter/ps.pm share/config/syntaxhighlighter/python.pm share/config/syntaxhighlighter/ruby.pm share/config/syntaxhighlighter/scheme.pm share/config/syntaxhighlighter/sh.pm share/config/syntaxhighlighter/sql.pm share/config/syntaxhighlighter/tcl.pm share/config/syntaxhighlighter/tex.pm share/config/syntaxhighlighter/vb.pm share/config/syntaxhighlighter/vbs.pm share/config/syntaxhighlighter/xml.pm share/config/syntaxhighlighter/yaml.pm share/config/syntaxmode/perl.conf share/config/template/perl.conf share/help/cesky/navigace.txt share/help/cesky/tahle_verse.txt share/help/cesky/vitejte.txt share/help/deutsch/alle_funktionen.txt share/help/deutsch/besondere_funktionen.txt share/help/deutsch/diese_version.txt share/help/deutsch/lizenz/anerkennung.txt share/help/deutsch/lizenz/gpl.txt share/help/deutsch/navigation.txt share/help/deutsch/tastaturbelegung.txt share/help/deutsch/willkommen.txt share/help/english/all_feature.txt share/help/english/keymap.txt share/help/english/license/artistic.txt share/help/english/license/credits.txt share/help/english/license/gpl.txt share/help/english/license/lgpl.txt share/help/english/license/scintilla.txt share/help/english/license/wx.txt share/help/english/navigation.txt share/help/english/special_feature.txt share/help/english/this_version.txt share/help/english/welcome.txt share/help/romana/functiuni.txt t/01_compile.t t/02_config.t t/03_config_default.t t/04_config_data_tree.t t/10_new.t kephra-0.4.3.34+dfsg.orig/ignore.txt0000644000175000017500000000016411573645310016417 0ustar gregoagregoablib* Makefile Makefile.old Build Build.bat _build* pm_to_blib* *.tar.gz .lwpcookies cover_db pod2htm*.tmp Kephra-* kephra-0.4.3.34+dfsg.orig/Changes0000644000175000017500000014261311657601734015701 0ustar gregoagregoatodo: l18n version update l18n compare tool Config::Tree join & split keys ! update configs when update cpan installation ! EOL problem in UTF files 0.4.3.33 ' typos as reported by fabreg@fabreg.it 0.4.3.32 ] optimise CPAN appearance 0.4.3.31 ] installer, no .svn files 0.4.3.30 ] fixed module type :) 0.4.3.29 ] grmpfl, repair Meta.yml 0.4.3.28 ] with META.yml again 0.4.3.27 ] included Module::Install again 0.4.3.26 ? deleted xt which only can fail 0.4.3.25 ^ just released as stable on CPAN 0.4.3.24 ~ see all file in file dialogs even under linux and mac [ fixing layout of search dialog 0.4.3.23 ~ suspend interface caching due coding problems in cache files " ignore backup localisation files while creating l18n menus 0.4.3.22 + added spanish localisation (thanks to enriquee nell) [ less clutter in menu labels / moved dev to linux 0.4.3.21 + select content - just quotings [ add toggle script comment to selected text context menu ! repaired some POD's 0.4.3.20 ~ move selection moves now wordwise when part of line selected ' 2 doc typo in Kephra.pm 0.4.3.19 ~ move selection moves now only complete lines when selected none or several ! old l18n key in romana.conf 0.4.3.18 + insert rectangular selections + move line tabwise left and right with ++ ~ brace nav is caret pos aware (jumps from inside to inside or outside to outside) ~ toggle # comment with ++ ] automatically hides incomplete translations in enduser releases ! closed unnamed docs appeared in file history ! proper titelbar and tabbar visual updates while rename file ! folding and marker setting with left click on margin works again 0.4.3.17 + selecting right to left and right click deletes (clear) selection (left to right just cuts) ] hardening the feature of previous version ] config reload when changing current l18n works again " improved english l18n (mostly by enrico)++ 0.4.3.16 ! lang selection menu works again 0.4.3.15 ! wrong literals in default commandlist 0.4.3.14 ~ correcting toggle select ~ changing command ID select-toggle > select-toggle-simple ~ changing command ID select-content > select-toggle-content, 0.4.3.13 ] introduce command node type sub ] remove old unused command ID ] splashscreen closes on right time ! forgot last_edit pos after restart ! correcting prev_related_brace when jump to previous closinf brace of same depths ! crash while editing after closing doc 0.4.3.12 ~ jump from doc end to doc end (auto wrap) when navigating in related braces [ move edit_line submenu 2 up ' update and fix keymap ! left click on selection does copy in output panel too ! missing komma and bad arrows in default command list ! while brace navigation caret cant hidden in folded lines 0.4.3.11 + note selection works also in output panel + copy selection in output panel with + left click on selection does copy in output panel too ~ leaving notepad with F12 ~ moving zoom keybinding to strl+shift to allow type ~ again ~ # is written sharp in keymap to prevent quoting a la /# ] init commandline module ' keymap shows marker keybinding back to f2 ! note selection really appends ! fixed statusbar context menu ! fixed eol switch ! template menu updates again after saving active template file 0.4.3.10 + toggle select with ctrl+y + zoom in, out and back with ++<+>,++<-> and ++<0> ~ marker keybinding back to f2 [ adding zoom and select menu ! fixed goto_prev_marker_in_doc 0.4.3.9 ~ reorder tool menu ~ moved keybinding of marker to f4 and notepad to f12 ' updated keymap ' typos in en l18n ! insert on cursor ! copy quoted string works again 0.4.3.8 + new menu item tool-brace-completion + new tool: insert time/date ~ doc attr config_file now saved by session files ~ esc in searchbar closes bar, use ctrl+f to just leave ' improved docs: this version, all functions, TestReleases, README [ moved document-auto-indention and document-brace-indention into tools menu ] outsource all visual stuff inside the editpanel to Kephra::App::EditPanel::Indicator ! only recent l18n file open with * ! Kephra::Config::path_matches works as always intended, matches subpathes not just eq 0.4.3.7 ~ refined editpanel mouse control [ start Kephra::Macro.pm ! open toolbar file works again ! templates works again 0.4.3.6 + left click on selection does copy + middle click inserts selection ~ middle click on searchbar finds next / goto last edit ! acme unselect selected half document 0.4.3.5 + acme like mouse control: cut (left+middle) and paste (left+right) + acme like mouse control: search (middle) or goto last edit (if no text selected) ~ color picker understands now comma seperated decimal values too " switch position of last 2 tool menu item " new command ID: tool insert date time ' improved docs: navigation and this version 0.4.3.4 + bug and request tracker links in help menu ~ search in all current block for last_perl_var ? implemented 7 tests for t/04_config_data_tree.t ? uncommented 17 tests for t/02_config.t ' pod fixed by kristian++ 0.4.3.3 + insert_last_perl_var ~ replace to nothing again ? added t/04_config_data_tree.t " advanced czech localisation " added keyword default to perl lexer def ' updated keymap ' updated navigation [ added tool-perl-copy-string and tool-perl-insert-last-var to tool menu ! doc lang selection 0.4.3.2 ^ rerelease as CPAN stable version 0.4.3.1 ] xp mode for boot sequence " tool-output-selection-hex now on key alt+shift+f5 0.4.3 ' update credits 0.4.2.39 + copy surrounding quoted string with ++ " getting default settings of new files when opening empty files [ moving insert templates into tools menu ! file history menu works again ! crash when open empty files 0.4.2.38 + marker function do also from context menu pos 0.4.2.37 + folding per context menu on mouse position (idea my murphy++) " item view-editpanel-fold-toggle-level in markermargin_contextmenu was missing " searchbar autofocus no longer default ! cripple statusbarbar coding field to make it save for now 0.4.2.36 ! update of module::install to 1.0 0.4.2.35 ! bug in makefile 0.4.2.34 ! utf labels now work on windows too (linux did it automaticlly right) 0.4.2.33 ! release tool now does tgz with the right rights 0.4.2.32 ! fold all nodes works now even if caret is in area without folding ! fixed function and cursor visibility of toggle recursive code folding ! remerged forgotten win default settings 0.4.2.31 + refresh autosaved configs after cpan update ~ changed folding keybinding ~ fold here: ctrl+plus, level: alt+plus, recursively: alt+shift+plus 0.4.2.30 ~ xml formater keybinding is now Ctrl[+Shift]+I ! unified logic behind both transparency settings - 0 = no transparency 0.4.2.29 + safety belt for window modes on esc key [ +key code for hide tab bar at ctrl+alt+t ! new docs show correct codepage 0.4.2.28 + fullscreen mode + max editpanel mode (disables all bars) + transparent mode + you can combine stay on top and transparent mode with Ctrl+Alt+F11 [ new menu: view > main window; [ move cmd view-window-stay-on-top there [ created commands view-window-fullscreen, view-window-transparent, view-editpanel-maximize " changed default font of output panel to arial , 10 px 0.4.2.27 ] finer event freeze and thaw ! delete unnecessary ecaping of vars in title content definition ! save copy as ... works again ! fixed eventhandling in Kephra::Document::Data::evaluate_attributes ! fixed test suite 0.4.2.26 + writes files also in missing dirs ! new Kephra::Dialog API fix ! redo comment function calls in commands.conf to older less flexible but working way 0.4.2.25 + romanian localisation " bad config: invisible main menu ! old API uses 0.4.2.24 + add support for latin 1 coding (codepage property) ! reload and and insert file works again 0.4.2.23 + autorecognition via encode::guess + read and write utf 0.4.2.22 + save and restore textfold state in sessions and file history ~ change sibling to level fold 0.4.2.21 + file history is now a session, restore file with all saved property + switch menubar visibility ] localize some of last temp var ] simplify Dialog API 0.4.2.20 [ new icons for search abr ops, marker, script run, color picker ] starting dater due freezing text change event ] event group doc_change_went smaller: docchanges now faster due less events fired ! right linenumber margin size when starting with autosaved.conf as current doc 0.4.2.19 [ update menu view > contextmenus and make 2 new calls vor it (markermargin searchbar) ~ statusbar contextmenus have own switch, interactive means switch leftclick ~ changed markermargin contextmenu acording the order of margins " search date has own config file " new dir for config data files: search.yml and notepad_content.txt 0.4.2.18 ~ expanded markermargin contextmenu " repaired some issues in l18n and default global configs (due tools/confer.pl) ! folding works again ! global marker prev|next now can jump back to current doc if there more marker 0.4.2.17 + goto next and previous marker in all docs ~ global marker goto is now in search bar ~ not appending empty selection on notepad text ! fix marker save in session 0.4.2.16 + set bookmarks directly by mouse middleclick + save marked lines in the session file [ switched move left and right in document > change menu [ changed marker key binding to standard compliance ] refined add/restore in Kephra::File::Session 0.4.2.15 " move search data file into global/sub dir [ contextmenu on markermargin [ + marker menu 0.4.2.14 + output selection in dec and hex [ output menu [ file close submenu has icon ! file history works again 0.4.2.13 + set search dialo transparency unter dialog > search > transparency + notepad has line move ! fixed cursor pos on line move 0.4.2.12 + new tool: output the %ENV [ marker nav in searchbar 0.4.2.11 * marker functions + set marker by mouse [ bookmarks have now individual icons (jenne++) ] missing helpstring for menu entry causes no more warning 0.4.2.10 ~ autoconverts of EOL are now visible " minor bit in german tab status field help [ config access only through API [ cleaned Kephra.pm ! bookmarks work again ! fixed property handling for the different file defaults 0.4.2.9 " different default setting for new und open files " new icons from jenne++ 0.4.2.8 + color picker + statusbar has context help while mouse hover ] reformat to one API module ! tab info char in wrong tab ! encodings menu visible, also in the statusbar 0.4.2.7 ~ current dir is now always synched with current file ! wrong titlebar content after some close doc events 0.4.2.6 ] rest of renaming plugin -> panel for notepad and output ] rename bookmark.pm -> marker ! splashscreen works again 0.4.2.5 + can assign icons to menus [ rearranged file menu ! crash while folding 0.4.2.4 [ added encoding menu [ splitter are now without live update, has lot less flicker ' updated german help-forum link 0.4.2.3 ~ linenr margin width autosize works now per doc ] separated fold functions in own module ! change font works again on all edit tabs 0.4.2.2 ! most visual settings work global again ! dont loose caret while find and defold 0.4.2.1 + loading stautsbar from config + status field codepage " added keys app > statusbar > file and app > statusbar > node ] refactor Kephra::API::EventTable -> Kephra::EventTable ] refactor Kephra::API::CommandList -> Kephra::CommandList ] refactor Notepad, Output: Kephra::Plugin::* -> Kephra::App::Panel::* ] refactor Menu, ToolBar: Kephra::App::* -> Kephra::* ! all event react on selection correct again 0.4.2 testing release: new tabbar ~ event driven stuff works again ~ smaller tab width in notepad ! open autoconfig file works again ! reload global configs works again ! file changed notify works again 0.4.1.19 [ reduce clutter while boot and shut down ] changed all constants to &Wx::... syntax 0.4.1.18 ~ session save now docs in visual order ~ search findings even visible when hidden in folded line 0.4.1.17 ! sessions save does work again ! tabs and other doc settings work again ! file save works again ! reload file works without flaws 0.4.1.16 ! sessions do load again 0.4.1.15 ] 2 level tab number translation ~ moved motto from info box into localisation ~ visibility of tabbar can be set again ! move tabs by mouse has no side effects ! move tabs by keyboard works again 0.4.1.14 ' added doc/Roadmap file ~ doubleclick on panel splitter now reacts properly ! Bookmarks work again 0.4.1.13 + tabs are moveable by mouse now and still change in right order " english l18n synced with defaults ] extended/reformed Kephra::Document::Data a bit ! new tabbar works suddenly, ahm finally ! file save works again ! toolbar icon respond properly 0.4.1.12 " default l18n nsync again ! folding works again 0.4.1.11 ~ note-selection gets key binding: shift+f4 " new key : app > tabbar > movable_tabs " new key : app > tabbar > close_button " new key : app > tabbar > tablist_button " removed key : app > tabbar > visible ] shwitched Wx::NoteBook > Wx::AuiNoteBook ] win distro updates to Wx 0.93 ] displays Scintilla version correct for newest Wx 0.4.1.10 ! bug with output panel 0.4.1.9 ] new stc ref handling ] rewrite of whole Kephra::Document namespace ! new docs ain't readonly 0.4.1.8 + display @INC pathes + open online doc and native lang forum URL in default browser + recognizes now tab mode of opened file + conf_key tab_use_new and tab_use_open (default auto) ~ renamed fold margin label ~ doc property bracelight is now view option ~ tool-run-doc => tool-interpreter-run-doc (stop also) 0.4.1.7 + file > defaultsettings > EOL_new can now be 'OS' => new files have lineendings according the OS you currently run - no menu icons under mac ~ rearrange main app layout (right panel goes from toolbar to statusbar) ] define event groups ] new module Kephra::Document::Property for by user changeable doc property ! fixed autwrap on text search: finding next 0.4.1.6 + rearranged context menu of tab status bar cell, can change tab width there now ] patches from Andreas Kaschner++: ! fixes in 02_config.t, Notepad.pm, StatusBar.pm, Default/CommandList.pm 0.4.1.5 + convert spaces to its HTML entity [ moving folding menu to fold margin in view menu ] convert all ISO 8859-1 enteties except whitespace 0.4.1.4 + fold all (alt+shift+plus) + fold recursively (alt+shift+minus) + these calls now on right click on fold margin ~ changed key binding for fold: fold => alt+minus, fold siblings => alt+plus ~ fold mouse binding: left => here, midd => recursive, right => siblings, l+f => all ~ editpanel autofocus is now off per default [ unfolding when goto a hidden line ] convert more entities " some locale strings were translated to wrong language 0.4.1.3 + 2 new converter HTML entities to char and back + second fold marker style set editpanel > margin > fold > style to arrows or boxes + can set text margin to width of 3 px + note selection ~ config key app > panel > notepad > content renamed to content_file [ folding functions now in menu visible ! when text margin set 0 menu shows it now 0.4.1.2 + optional flagline shows where text is folded + option for keeping caret visible while folding ! fold siblings works now also in the first line 0.4.1.1 + key binding for fold ops: fold => alt+plus, fold siblings => alt+shift+plus ! fixed commandlist cache logic, refreshes now if needed 0.4.1 testing release: folding 0.4.0.12 [ unfolds all if hides folding margin [ less intrusive default color for folding markers [ less intrusive default color for line number 0.4.0.11 * code folding support + fold sibling nodes [ editpanel context menus don't open over margin anymore 0.4.0.10 + commandlist cache [ moved menu view_bars one position down ] commandlist and localisation modules nor hold their data internal (was global) " editpanel > margin > fold is now a node that holds forecolor, back and visible ! typo in Config::Default::GlobalSettings ! crash: typo in event resigning of Dialog::Search ! crash: old api call in file::session ! crash if hide main toolbar by next event 0.4.0.9 [ uncomment foldmargin view option [ darker (yellow) caret line (was nearly unvisible) ] new commandlist leaf: keycode ] rehashed parts of Kephra::API::CommandList 0.4.0.8 + autoplugging localisation system + added key editpanel > auto > focus ~ changed name convention for icons no more underscore => new-names.xpm ' updated roadmap in kephra.pm POD " panel icons were missing in default commandlist 0.4.0.7 + intial norsk localisation + new submodule Kephra::Config::Localisation, refactoring - removed stupid restrictions not to open emty files ~ open binary files (only_text = 0)is now default, problems with utf files ~ activate UTF8 for Config::General when locale file requires ] open localisation files function moved into Config::Localisation ! typo in localisation column, not cloumn 0.4.0.6 ] moving codepage setting from hard wired to config set ~ moving File::_age into File::IO ! output panel didn't worked 0.4.0.5 [ cleaner search dialog ! updating in localisation default config 0.4.0.4 + select interpreter with config key app > panel > output > interpreter_path + file missing dialog - remove dangerous ++ keybinding ( triggeres when want create @) [ find item history realtime update now works in search dialog [ cleaner search dialog ] rebuild notify dialog ] renewed parts of search module ! comboboxes in search dialog process enter ! crash on moving tabs 0.4.0.3 ! keep calm when just a unnamed doc is unsaved 0.4.0.2 ' updating key layout docs ~ close all key binding changed + => ++ ~ close app key binding changed + => + ! UTF problems on files with syntaxmode none 0.4.0.1 ' updating key layout docs ! quoting doc name in output panel eval ! crash while delete all bookmarks 0.4 stable release ' finished end user docs 0.3.10.24 ~ background color for brace highlighting ' more docs translation ! a Config::Global sub required a gone module ! internal doc propert reset didn't delete file name ! file > open > each_once works again 0.3.10.23 ~ hide config dialog ' update docs ! change doc 0.3.10.22 ! move tab right crashed 0.3.10.21 ~ in searchbar input now works ctrl+ ! fixed Config::load_defaults 0.3.10.20 [ forward calls from doc to doc::Internal via glob ! invalid Doc::name call in file.pm 0.3.10.19 + define output colors by config ~ new config option: interpreter for notpad eval ~ added '&' as default wordchar ! output used removed Doc API ! output restores cwd 0.3.10.18 ! 0 div in indent guid highlighting ! restore doc attribute from doc nr 0 correctly ! umlaut problem no longer ! clean up all lexer words 0.3.10.17 ] massive refactoring of Kephra::Document namespace ! restart timer when canceled app shutdown 0.3.10.16 ] sane doc nr validation ! false trigger of file changed notify dialog ! wrong win titel when open file ! fix default global settings hash 0.3.10.15 ! output panel can run scripts again 0.3.10.14 + perl eval of notepad + define find and replace item in notepad ! enable right tool button after doc change 0.3.10.13 ! cleanup doc internal mess ! fix stting of current syntaxmode 0.3.10.12 [ search finding better visible ! safer conf file parser init ! didn't remember changed syntaxstyle of opened file ! proper file dialog filter for config files 0.3.10.11 + exit without save ] rewritten parts of Edit::Goto.pm ] made localisation configs saner ! goto line dialog showed 1 line less than current ! fixing default localisation 0.3.10.10 ] founding Kephra::Log ] adapt makefile becaue no longer need Log::Dispatch ! wount crash when not find splashscreen image file ! reload settings when save active config file works again 0.3.10.9 ~ rename file > "Instert ..." into "insert from ..." ! searchbar input works again (they changes standart behavior when press enter) 0.3.10.8 ! fix event table data structure ! repair (beginnings of) czech localisation 0.3.10.7 - append option in output panel ] changed session.conf to yaml due sorting problems with current (2.4) C::G ] switch to Module::install 0.77 ! reload configs works again 0.3.10.6 + 3 close unsaved functions ' extend Kephra.pm POD [ save notepad with when resize [ rearrange file menu 0.3.10.5 ] copy configs unto userconfig when configs are old ] current filepath is known to interpreter when run script ! copied config files where readonly ! could not write autosaved file sessions when no file was there ! changed_notify_check could not handle deleted files 0.3.10.4 ' rewritten parts of Kephra.pm POD ! fix install problem hopefully 0.3.10.3 ] Keymap Dialog had no Version number ! caret visible on app start ! tried to load non existing notepad cache 0.3.10.2 ! fixed codepage setting ! fixed wordchar settings ! fixed and moved dev.pl outside the distro 0.3.10.1 [ changed panel layout: column division first ' POD fix for Panel API ! workaround for a Wx bug 0.3.10 ! add missing panel localisation ! resized output panel when started closed 0.3.9.18 + Output is resizable ans remembers its size + Notepad is resizable ans remembers its size ! Notepad knows its split staus after closed per mouse 0.3.9.17 + output panel has now a stop function to kill hanging prozesses [ enhance Notepad as STC that shares some settings with main STC ! fix perl lexer color definition 0.3.9.16 * notepad panel works completely + output panel recoveres its visibility state after restart ~ output panel open if run script ! output panel handles multiline output ! can run files with whitespace in name (patch by reneeb) 0.3.9.15 * output panel works now 0.3.9.14 ] internal file namespace cleanup 0.3.9.13 + added View Panel Menu + 2 entry for Notepad and Output ~ renamed Module API to Panel [ basic visuals for output panel 0.3.9.12 [ + goto line icon ~ switched to Config::General 2.4 in windistro ! fixed about dialog 0.3.9.11 ! restore curser pos in current file after restart ~ added __WARN__ and __DIE__ to perl lexer ! wordchar settings where missing 0.3.9.10 ] Gabor: added first logging functions ] renamed Config::Default::Global_Settings to Config::Default::GlobalSettings ! Gabor: optimized config file type recogition ! mismatch in 2 other Default modules names 0.3.9.9 ' documented API modules ' repaired some POD in main module [ fixed tabbar icon tooltip texts ] switched from YAML to YAML::Tiny (less code, less memory, all we need) ] new starter.exe that starts kre\wperl.exe 0.3.9.8 ' extending Kephra.pm's POD ] making DragAcceptFiles optional because not supported by GTK 0.3.9.7 ! seperator in Config::Embedded ] renamed Config::Embedded -> Config::Defaults ] rename pre dir into kre (kephra runtime environment) ] externalized into single files 0.3.9.6 ] complete new starter ] new Kephra::Config::init() method 0.3.9.5 ' added POD in Kephra.pm 0.3.9.4 + avennue highlighter + BAAN highlighter + .bat highlighter + diff highlighter + errorlist highlighter + makefile highlighter + matlab highlighter + property file highlighter ] configs and localisation for 8 new styles ' removed "all rightes reserved" 0.3.9.3 ! crash on file open ' this_version.txt update ] finished last Kephra::Config::Tree functions ] deleted not used Dialog::Search subs 0.3.9.2 + reintroduce fast splashscreen ~ splashscreen img and app icon now as xpm too ] shrinking strawberry distro from 28 to 23MB 0.3.9.1 ' POD fix ! toolbar appeared in wrong status bar cell 0.3.9 0.4 RC 2 0.3.8.14 ' formated and updated documentation ~ updated credits.txt (PCE -> Kephra) ~ rewritten Config::Tree functions so i could - remove Hash::Merge and Clone as dependencies 0.3.8.13 + added pbp.conf according to damians perl best practices ] cleaned Kephra::Edit::Search.pm ! crash when open global autoconfigs 0.3.8.12 ] cleaned bit the sub load_from() in Config::Global ] cleaned Config::Global a bit ] WxKeycodes for search dialog ! crash when searching with dialog 0.3.8.11 + added replace selection into context menu over selected text in editpanel ~ cleared replace selection labels ~ ignore in filechange notify dialog now works until next file change happens 0.3.8.10 - removed global default conf, replaced by embedded conf ] search dialog is now real dialog ! debugged embedded global conf 0.3.8.9 + embedded main menu settings ! can handle missing file session file ! hang while searching after closing search dialog 0.3.8.8 + + works in searchbar + embedded toolbar settings + embedded context menu settings ] rewritten parts of Kephra::Config::File ! debugged embedded localisation 0.3.8.7 + embedded commandlist ! prevent thread hangup due late fired timer event on shutdown ! added unicore utfdb to winball ! blockformat on width 0.3.8.6 + context menu over statusbar info field - select app language menu ! search dialog carret keeps position ! crash when ask for not existing menus 0.3.8.5 ] fixed and updated embedded configs ? more compile tests for modules that arent loaded on start ! crash on replace 0.3.8.4 ] thrown wx icons out of the distro ! crash on select all 0.3.8.3 [ put file sessions menu out of file menu on top level [ put goto-line into searchbar ] added Kephra::API::CommandList::run_cmd_by_keycode ~ document switch backs works out of search bar ! pos1 and end works in searchbar again 0.3.8.2 ! crash on search 0.3.8.1 + menu item switch view of tabbar contextmenu ~ folding view menu ! fix php lexer, new constant ! fix xml lexer ! crash while open help files in winball distro 0.3.8 bugfix release, 0.4 RC 1 0.3.7.12 + position searchbar in the middle between tabbar and edit panel ] hack to disabling acceleratorTable ~ new wx constants ! runs with latest Wx (0.83) again ! doc attr getter was flawed 0.3.7.11 ! empty statusbar syntaxmode field if kephra sarted with last doc with mode: "none" 0.3.7.10 [ nicer menus due fake transparent icons for menu items with no bitmaps ~ take config dialog again in the toolbar ! old Searchbar on config reload won't go 0.3.7.9 ! could't open first file ~ hiding print, expanding file menu again 0.3.7.8 [ new splashscreen (finally one with the right name in it) ! doc history can handle if non doc is open ! didnt start with no file open 0.3.7.7 ! fixed color of syntax mpode "none" after switiching from php ! rot tabs correctly while moving 0.3.7.6 ~ change Switch doc back to ++ ~ redesigned file menu ! added missing doclist event on doc switch ! open all files of dir now appears in right dir 0.3.7.5 + move tabs with ++ ] cleaned up App::TabBar API 0.3.7.4 + Ctrl+Shift+G works from the searchbar input 0.3.7.3 ! more internal doc add fixes 0.3.7.2 ~ move xml comment from + to + ! lot of internal bugs introduced due 0.3.7.1 0.3.7.1 ! EOL status works on empty docs again ! doc attributes and data is now deleted correctly while closing doc 0.3.7 testing release 0.3.6.12 ! fix naming convention in CPAN distro 0.3.6.11 ] updated tests to ned app name 0.3.6.10 + autonotify Dialog ] saner file open syntax ~ no autosave on unnamed files ~ autonify just once ! false autonotify on config files 0.3.6.9 ! small fixes 0.3.6.8 + autosave, define it under config key file > save > auto_save 0.3.6.7 ~ StatusBar Info with dotted numers ~ renamed API::Module.pm to Extention.pm 0.3.6.6 + tools to make CPAN distro (make_cpan_pl) 0.3.6.5 ' added POD documentation 0.3.6.4 ' translated this_version.txt from de to en ' translated special_feature.txt from de to en ~ changed item order in tab contextmenu 0.3.6.3 + new perl 5.10 keywords in Perl.pm + started Module for Plugin API : Kephra::API::Module + wrote Documentation of Perl main module ~ join lines now leaves a space between joined lines ~ join lines has key binding : ++ ! search dialog holds correct replace item when non text selected as new item ! fixing doc change in search bar input 0.3.6.2 + jump to doc begin and end from searchbar input whith +(|) + change doc from searchbar input whith +(|) ~ changed tablabel configfile marker from circumfix | | to prefix $ ~ empty config dialog visible again 0.3.6.1 + marking config files in tabs optionally with straight lines + added replace line Command to main menu ' wrote 'besondere_funktionen.txt' ] update embedded config 0.3.6 round up, bug fix and minor feature release 0.3.5.8 + load and store a backup file session + close searchbar now also with + while in the searchbar input + more menuoptions to set width of textmargin ' updated diese_version.txt ! search dialog crash (uncompled API module refactor) 0.3.5.7 + take autoautoindtion in statusbar tab-cell contextmenu ~ rename linebreak to line wrap ~ changing name in the docs ] upgrading windistro to PPI 1.2 ! fixing and fine tuning blockformat and line wrap 0.3.5.6 + blockformat ++, menu edit > format + line break, menu edit > format [ removed ambiguity in german mainmenu navigation with keyboard ! optimizing speed and undef value handling of menu data generation 0.3.5.5 + tabbar tabs numbering optional config key: app > tabbar > number_tabs + tabbar filename optional without ending: app > tabbar > file_info = [first]name ! seach dialog icon shows again ! file firs names now correct when it has no file ending ' some more documenting in default.conf 0.3.5.4 + firstname: new document property holds filname without ending + can use [$$firstname] as template variable too ] clean up ::Config::General.pm ] less subconfugs ~ renamed 'global\sub\localisation' to 'global\sub\documentation' 0.3.5.3 ! move document line and page wise from searchbar input [ use wx keycodes, less error prone 0.3.5.2 + reload templates on save + move document line and page wise from searchbar input [ internal cleanups ! reload all docs switched to last doc 0.3.5.1 ' advanced feature tour ' wrote german 'this version text' for release 0.4 ' reneame 'feature.txt' to 'all_feature.txt' ' some preparations for czech localisation 0.3.5 bug fix and feature release 0.3.4.15 ] moved icon path from \config\icon to \config\interface\icon\ 0.3.4.14 ~ changed File Menu order ! current pathes now contain volume name 0.3.4.13 - auto brace join ] beginnings of Modules and its handling ! cursor in searchbar's edit field now holds its position whilse writing 0.3.4.12 ~ insert templates 0.3.4.11 * Template Menu ] config nodes file > session and file history ] new config node file > templates ] renamed Edit::Changes in Edit::History ] cleaned up file session directory handling ] cleaned up path splitting 0.3.4.10 [ cleaned Kephra::App namespace 0.3.4.9 ! document editing commands did crash 0.3.4.8 ! refresh of find item history in searchbar ! chrash when context menu calls 0.3.4.7 * history File menu 0.3.4.6 + custom title bar 0.3.4.5 + multiple events on GUI element ! redo button ! better tabbar context menu (still some flaws) 0.3.4.4 + nonreactive toolbars (disable events) 0.3.4.3 ! reload config file when saving it in editor 0.3.4.2 ! searchbar fixes 0.3.4.1 ! exit dialog entitles also unnamed files 0.3.4 bug fix release [LOST due crash] 0.3.3.17 + switch syntaxhighlight when left click on third status pane ~ correct refresh while rename file [ file rename got shortcut +++ 0.3.3.16 + find next and prev in searchbar now also with F3 and shift+F3 ~ perl sigils and namespaceseparator now word chars ! searched first when setting find item with strg+F3 ! crash while call replace with confirmation 0.3.3.15 ~ doclist menu shows untitled ~ less events on doc change fired ! correct window title while open file or session reload if current doc is last ! state of find menu items ! crash when saving a file that was in a recently deleted dir 0.3.3.14 [ proper searchdialog replace input update [ put config dialog call into main menu [ searchbar find input size now changeable due config file ] config node "file > current > session" renamed to "file > session" ] config node "file > filter" renamed to "file > group" ! dynamic doc list menu is updating again 0.3.3.13 ~ config dialog cleanup ~ extracting ::Edit::Changes.pm ~ proper searchbar find input update ~ proper searchdialog find input update ~ doc edit commands much faster now, they use event freeze [ exit dialog shows file names again ! event freeze was brokes 0.3.3.12 ~ updated starter exe in win distro ~ benchmark output switchable 0.3.3.11 ~ search range items in main and searchbar context menu ~ doc change items in doclist menu 0.3.3.10 ~ merged with adams code version ~ cleaned eventlist freeze implementation ! crash while find or replace in all open docs with dialog ! search dialog lost icon when config in nonstandart path 0.3.3.9 + subconfigs from nested nodes + ability to store single contextmenu in seperate file ! warnings on empty commandlist nodes 0.3.3.8 ~ using Kephra::Config::File::load not YAML directly ~ simplified session files ] started Kephra::Config::Tree ' more benchmarks 0.3.3.7 [ german localisation correctoin, spell checks ~ build searchbar from configs, findinput is now sizeable 0.3.3.6 ! crash on view EOL 0.3.3.5 ! save first time rightmost doc 0.3.3.4 ~ some text folding preparations ! searchbar and search dialog dind't run 0.3.3.3 ~ reduced code in App::Window::load_icon ~ dissolving depreciated lib Kepher::App::STC > Kepher::App::EditPanel ! DND on Seachbarbar input 0.3.3.2 ! fix config for rename [ hiding error logs 0.3.3.1 ~ edit contex menu fixed and chenged [ item label: Fortran -> Fortran 90 ! change font 0.3.3 rounded up for test release 0.3.2.21 ] new namespace for line number margin ] slimmed events, faster now 0.3.2.20 ! fix toolbars visibilities ! fix searchbar contextmenu connector ! sane app gui part layout when changing language 0.3.2.19 + configurable middle click on tabbar ~ correct tooltip and status help msg on tabbar ! repaired tabbar 0.3.2.18 ~ lot of internal cleanup ] internal unified namespace App::ToolBar 0.3.2.17 + repairing subconfs + nearly comlete set of embedded config (interface missing) 0.3.2.16 + toolbar toggle buttons + eventsystem + dynamic toolbar with events 0.3.2.15 [ removed most search dialog button flicker ~ faster search dialog 0.3.2.14 ] toolbar rebuild - remove xrc interna ! crash on edit document calls 0.3.2.13 ] Config menu rebuild ] Help menu rebuild ] Menubar completly set to new Interface text compiler ~ ::App::Window::create - most xrc files except toolbar 0.3.2.12 ] View menu rebuild ] Document menu rebuild ] Search menu rebuild ] Document menu rebuild ] View menu rebuild ] moved braced nav to edit::goto modul ! brace nav crash 0.3.2.11 ] Edit menu rebuild ! crash while text refresh ! set bookmark annoyance 0.3.2.10 [ EOL checks ! fixed tabbar context menu 0.3.2.9 ] new Document::SyntaxMode, Edit::Goto and Edit::Select namespaces ] File menu rebuild ] dispatch own key events - shorten Events.pm ! replace all replaced with zero 0.3.2.8 ] moved last parts of visual.pm code Statusbar.pm and Toolbar.pm [ checkitem in syntaxmodeinfo contextmenu [ can_save_all now much faster 0.3.2.7 + rename files ! fixed check and radio item update 0.3.2.6 [ better goto line dialog ] + can_save_all Event which is set whenn there is an unsaved doc ! correct checkings and disabling on all menu items ! tab change event echo ! del mismatch in searchbar combobox 0.3.2.5 [ first main menu works with a submenu ] PCE::Config::Stettings to PCE::Config::Global, cleaned namespace ! fixing search dialog find combo loosing search item while search 0.3.2.4 [ no cursor or text deselection jump when save all files ] PCE::App namespace newly ordered ! crash on search dialog Drag'n Drop 0.3.2.3 + searchbar contextmenu ! pathname mismatch with numbers ! opening changing and save rightmost doc 0.3.2.2 + drag n drop in search dialog [ single wrong indention on tabbar contexmenu ] overall slimmed and cleaned up code ! no proper eol mode display in statusbar 0.3.2.1 ] cleaned up statusbar internals ! forgotten update call for document list update ! statusbar showed not correct number of document lines 0.3.2 ] more checks when loading GUI configs 0.3.1.14 + menuitem radiogroups + disable menuitems 0.3.1.13 ] unified commandlist value loading ! crash while change Localisation Language again 0.3.1.12 + documents contextmenu ] lot of cleadup in Edit.pm [ slightly changed goto behaviour 0.3.1.11 ] all contexmenu on gtc ] contexmenu-editpanel eval connector [ new german iso lacalisation ! crash when current doc setting in session file is to high 0.3.1.10 + icons in new contex menus ! crash while change Localisation Language 0.3.1.9 + contextmenu on selected text ] editpanel contextmenus working in minimal mode 0.3.1.8 ] adding contextmenu gui config file ] info dialog cleanup ] added embedded emergency localisation 0.3.1.7 ] cleaned app namespace ] cleaned up program name handling 0.3.1.6 + searchbar takes eventual selection as search item ! open button did disappear for after cliscked 0.3.1.5 + config key {app}{searchbar}{autofocus} sets focus to input while onmouseover ! cursor jump to begin when deleting bookmark ! deleting all bookmark ! crash if reload nonexisting file 0.3.1.4 ' keymap updated ~ goto last edit now on ++ ! open files from command line with pce was broken since 0.3.0 ! current doc pointer now correct even if there is only one doc 0.3.1.3 + brace navigation with + [ + now also switches focus back to editpanel [ button added on searchbar to call search dialog ] cleaned PCE::App::Event::key_down_filter 0.3.1.2 + delete back tab, + deletes now to naxt indention level ~ switch back now on + ] property handling while restoring file session now much slicker ! warning caused by checking more filenames that exist while open file ! fixing file session loading and restoring 0.3.1.1 [ fix in german toolbar "Suchdialog" [ caret position better visible when switching to document ! warning in info dialog when there is no patchlevel 0.3.1 ? testing release [ closing street holes 0.3.0.27 + block navigation reestablished 0.3.0.26 ! fixed blockindent 0.3.0.25 + Bookmarks are working now 0.3.0.24 ! fixed tab converter 0.3.0.23 + restoring bookmarks ! display of selection lines now correct 0.3.0.22 ! typo in toolbar 0.3.0.21 ! no label for unnamed files 0.3.0.20 + show selected lines in statusbar ~ shorter format::join_lines algorithm ! typo in searchflag refresh 0.3.0.19 + opens whole dir when dragged onto ! crash when try to drag dir into edititor ! find and replace dialog repaired and slightly optimized 0.3.0.18 + PCE now remembers current search and replace item ] rebuild some PCE::Edit::Search.pm sub, renamed config keys 0.3.0.17 + find input can now recieve dragged text 0.3.0.16 ~ searchbar hints do work now ~ find input history now works + introduced function mark all matches + editpanel can now recieve dragged files 0.3.0.15 ! repairing linenumbermargin autosize ! repairing english goto line menu call 0.3.0.14 ~ building up simple but usable Searchbar with some jitters 0.3.0.13 ! file data got lost after closing empty files 0.3.0.12 ~ toggle searchbar visibility ~ start SearchBar ! repair exit dialog 0.3.0.11 ~ established standart way of normalizing path slashes ~ better way to position context menus ~ Replace with confirm now on + on replace dialog ! tabbar buttons has right background color 0.3.0.10 + toggle visibilty of tabbar icons + toggle visibilty of tabbar seperator line ~ Show.pm now opens help & config files with full path ] simplified edit: line copy ! shown pathes now compatible to current OS ! reinsert tab seperator line ! toggle visibilty of tabbar works now 0.3.0.9 ~ rename config/general -> config/global ! rename tablabel when change language ! ensure inner data current doc pointer always set correct 0.3.0.8 + put EOL switch visibility into EOL status context menu ~ modulnames now all uppercase, sources cranked throug perltidy 0.3.0.7 ~ introducing use strict 2 all.pm ~ rewrite document namespace ~ Reorganising into a CPAN-compatible distribution 0.3.0.6 ~ refaktoring the app namespace (packages, methods, config keys) [ introducing pce::App::TabBar ! no more hang up on empty docs 0.3.0.5 ! fix tabbar consume too much height ! dont clear editpanel when close last writeprotected file -> pl2 ! dont recognize protection when open first write protected file -> pl2 0.3.0.4 + goto last edit ! mainframe was invisible under win when minimize and then close -> pl2 0.3.0.3 ~ update to wxperl 0.25 ] pce::document::internal founded pce::document::property deleted [ 2 icons in tabbar [ 3 new icons in toolbar config dialog aktivated 0.3.0.2 ! bugfix starting minized search dialog -> pl2 ] changed to sizer based searchdialog ] find modules renamed in search because its more than find like search menu 0.3.0.1 ! increment search lost caret visible -> pl2 [ rename localisation ref ] new icons left of search icons 0.3 ? full stable release 0.2.3.47 ] info dialog now displayes patch level ' finish english docu 0.2.3.46 + replace line ' translating doku ] new fresher icons, several new for coming new functions ] 2 more functions in the toolbar ] slicker help menu 0.2.3.45 ! fixed CVS vs Clone.pm clash 0.2.3.44 ' doku improvements ] faster splashscreen 0.2.3.43 ] Boundary check vor app_frame 0.2.3.42 ! Bugfix in pce::edit::format::del_trailing_spaces ... missing some 0.2.3.19 + strg+Enter menu item document_switch_back ... missing some 0.2.3 ? feature enhancement and bug fix * file sessions * on quit dialog for selecting files to save + open multiple files via dialog + history for search and replace strings + xp style now optional ] close current file with middle click on tabbar ! open empty files 0.2.2 ? feature enhancement and bug fix * search and replace in files + asm style + save on change doc + open statusmenu files via mainmenu [ internal sub now only have one _ prefix ! bug in search prev ! style repaint on save as bug ...yes here is inconsistancy due change 0.2.11 ? feature enhancement and bugfix release + find in selection + replace all in selection + replace with confirm in selection + menu item find from start + recognise selection from menu calls + Ctrl+Enter (in search dialog) closes dialog and finds first (find button behaviour) + set max tab width via config [ more benchmark ! reload autosettings fixed ! status context menu changes language properly ! dialog saves search and replace text first time like it should ! minor checkbox selection fix in search dialog ! bug in font change ! line wrap bug 0.2.10: ? new feature and maintain release * contextmenus on statusbar + shift+Enter in search dialog searches backward [ massive refracturing fore new namespace [ several new modules ! minor fixes in menu 0.2.09: ? testing and maintain release + call replace in find dialog ~ DND Files now only over tabbar ~ close other now with ctrl+shift+Q ~ better search menu [ massive refracturing fore new namespace ! minor fixes in menu, statusbar, and keymap 0.2.08: ? shiny little feature enhancement release + Drag 'n Drop Files from Explorer into the Editor 0.2.07: ? suporting porters release + pce.pl can now called under win from anywhere ! small bugs in show files 0.2.06: ? minor enhancement release + block navigation + open files in current directory 0.2.05: ? maintaince release for linux usage - direct document selection with Alt+Number [ path for config and help can now be set freely 0.2.04: ? major stable and bugfix release + view option: stay on top ] internal changes and cleanups ! bugfixes in menu and logic 0.2.03: ~ converter take now the whole text when nothing is selected ] internal cleanup 0.2.02: + delete trailing spaces ] cleaning internals 0.2.01: + 2 new options for opening files, replace new empty docs + single document mode + save last tilde files like that: file.name~ ! Bugfix in EOL Mode, the editor produced always cr+lf ! 2 Bugfixes in Main menu 0.2.00: ? major stable and bugfix release 0.1.99: + backup autosave file, and restore ist in emergency case - Bookmarks ! bugfixes 0.1.98: + save dialog on close and exit now contain cancel ] internal improvements ! bugfixes in Config 0.1.97: + jumpes to the file if you open an already opened file ] internal improvements ! bugfixes in main, config, file, document, STC ! bugfix in General::Config 0.1.96: + visual feature: switch back if you click on current a la opera + new option: start with an empty file + new option: open each file once + new option: open text files only ! bugfixes 0.1.95: + autoreload for config files + this version texts ~ better menus ! bugfixes 0.1.94: ! fix from ugly bug that eating docs, therefor HIGHLY RECOMMANDED updated + ask now for unsaved files to save on quit ~ minor optikal fixes in search dialog, save all icon, color of LLI 0.1.93: * settings for each document will handled seperately and saved to the next start these settings are at start cursorpos, syntaxstyle, EOL Mode, Tab usage + intention guides + caret line highlighting + autodetect EOL Mode + autodetect write protection + direct doc selection with Alt+Number ~ right margin color changesd ~ another app icon ~ search menu unfolded 0.1.89: ? bugfix release 0.1.87: * multiple document handling find, replace and bookmarks are still single document oriented 0.1.84: * find and replace dialog + win XP look 0.1.68: autosave options, customizable Syntaxstyle autoselect 0.1.64: german localisation 0.1.60: config: many new styles, contextmenu file menu: insert file, edit menu: format functions, convert functions document menu: eol mode, styles, spaces, write protection Statusbar: cursorpos, eol, spaces, style faster file reading, several bugs 0.1.31: save and load external configs, handling close window event many bug fixes, color and caret settings 0.1.24: SECOND COMPLETE RELEASE (incl. PRE 0.2pre1)! new config file, old removed, holds now all properties, default.conf, open, load and save config on the fly, release history, reopen, save copy as, Replace, Undo History, brace comment, 3Bookmarks, find selection new view options: hard tabs, whitespace, 4Margins, Line Wrap 0.1.12: Fontselect and many other fixes 0.1.11: Selection Move, fixes & updates 0.1.10: indent unindent, script comment uncomment, CSS Style, several fixes 0.1. 9: open Configfiles, goto line number, line move, fixes 0.1. 8: holds file, save before exit, fixed and updates 0.1. 7: find previous, C-style fixed, setEOLMode removed 0.1. 6: find, find next 0.1. 5: setEOLMode(removed), select and autoselect Syntaxstyle, C - Style, 0.1. 4: asks for filename if you save new file, better Perl-style 0.1. 3: Keyboard Map, Licenses, fix 0.1. 2: View Menu, View EOL, HTML-Style 0.1. 1: checkable Menuitems, english Toolbarhints, show License 0.1. 0: FIRST COMPLETE RELEASE(incl. PRE 0.2)!, smaller startexe, english Menu, long line indikator, colored gutter, 0.0.20: first syntaxstyle(perl), filename in tab, toggle linenumbermargin, fixes 0.0.19: pce.exe, undo, redo, cut, copy, paste, clear, select all filename in the title, warningboxes bugfixes 0.0.18: save file, bugfix 0.0.17: new file, open & save as 0.0.15: First Public Release!: shows the editbox! Legend: ^ purpose * big new feature + new feature ~ change - remove ? tests ! bugfix [ interface ] internals " configs ' help/docu / comment kephra-0.4.3.34+dfsg.orig/MANIFEST.SKIP0000644000175000017500000000001711601444340016256 0ustar gregoagregoa^\.hg .*.svn.* kephra-0.4.3.34+dfsg.orig/README0000644000175000017500000001177311573645310015263 0ustar gregoagregoaNAME kephra - crossplatform, GUI-Texteditor designed along Perl's Paradigms SYNOPSIS > kephra [] # start with certain files open DESCRIPTION This module install's a complete editor application with all its configs and documentation for your programming, web and text authoring. Philosophy Main Goals A visually harmonic and beautiful, sparing and elegantly programed Editor, that helpes you with all your daily tasks. It should be also able to operate in the way you prefer and be not afraid to try new things. In Depth I know, I know, there are plenty text editors out there, even some really mighty IDE, but still no perfect solution for many programmers. So lets learn from Perl 5 and 6 what it takes to build a tool thats powerful and fun to play with for hours and months. * make a low entry barrier (usable like notepad) * copy what people like and are used to and whats not inherently broken * give choices (TimTowtdi) * (e.g. deliver vi and emacs input style) * usable with menu, contextmenu, bars, mouse combo, key combos, commands ... * configure via dialog and yaml/conf files ... * highly configurable / adaptable to personal preferences * beauty / good integration on GUI, code and config level * solve things with minimal effort (no bloat / minimal dependencies) * still everything extendable by easy to write plugins I believe strongly that there is much more possible with GUI editors and text editors in general than we are used today. So I try to weave fresh ideas wherever I can and design Kephra in a way, that every programmer can alter and extend it easily. That can speed up progress or at least makes Kephra more comfortable for you. That is the plan, but we are currently not nearly that far. Features Beside all the basic stuff that would you expect from a notepad, we have file sessions, simple templates, recent closed files, and file functions applied to all files, where it makes sense. We have also a pile of advanced text navigation (on braces or blockwise), goto last edit or 10 doc spanning Bookmarks as well as find in files. Advanced undo, line editing (edit functions that take the current line as input), move selected text by mouse or keyboard. Formating funtions like blockformat, align blocks, indenting, commenting ... Documents have several properties like syntax styling, auto indention, tab width, tab use, write protection. View options contain switches for any GUI element and marker for: current line, end of line bytes, right margin, indetion guides, bracehiglighting, line wrap and font. Every menu and toolbar is evaluated from a simple yaml file, so you can change it easily by opening this files from the config menu. ROADMAP Overview Stable Release 0.4 This release was about getting the editor liquid or highly configurable. Its also about improvements in the user interface and of course the little things we missed. It also contains interpreter output panel and a notepad. Stable Release 0.5 This release is about getting Kephra into the world out there and adding feature that are most needed and removing most hindering barriers. Stable Release 0.6 This release will be about extending Kephra internal extentions and Plugins. This Cycle Testing 0.4.1 - code folding Testing 0.4.2 - folding and GUI refined, movable tabs, 2 more tools, doc data Testing 0.4.3 - utf, marker, folding finished, 3 more tools, help links Testing 0.4.4 - new mouse control, 2 more tools, docs updated Testing 0.4.5 - more encodings, config dialog Stable 0.5 - about dialog Future command line vor vi like usage tree lib extention: snippet lib and toolbox in one file browser Plugin API Coding support like L, outlining, help integration, debugger autocompletition and so on will be long time goals. Lets see where they fit in. SUPPORT OS: Linux, Mac and Win32 (Basically same es the module named Wx.) Perl: >= 5.6 (we use our :) ) AUTHORS * Herbert Breunung (main author) * Jens Neuwerk (author of icons, GUI advisor) * Andreas Kaschner (linux and mac ports) * Adam Kennedy (cpanification) * Renee Bäcker Emodule@renee-baecker.deE (color picker) * many more since we study other editors a lot and also the padre sources COPYRIGHT This Copyright applies only to the "Kephra" Perl software distribution, not the icons bundled within. Copyright 2004 - 2010 Herbert Breunung. All rights reserved. This program is free software, licensed under the GNU GPL as you can see in the LICENSE file in same directory or under http://www.gnu.org/licenses/. kephra-0.4.3.34+dfsg.orig/doc/0000755000175000017500000000000012300715027015127 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/doc/Todo0000644000175000017500000000131211573645310015764 0ustar gregoagregoaopen Issues, known problems Technical Issues: - file open clutter in Tabbar 0.4.4 + new mouse controls + 3 new tools 0.4.5 + more encodings + utf convert + config dialog 0.5 + about dialog 0.6 + plugin API, demo, syntaxchecker + extensions: commandline, tree lib tool long time: plugins: - filebrowser - project manager - outlining - commandline - command tree aka snippet lib internal: - Panel API - split output extension in output panel and interpreter tool ? nested menu prepare event + no global vars + all event trigger are local - every event handeled by eventtable --- Legend: ? dunno how to do + almost done - waitenskephra-0.4.3.34+dfsg.orig/doc/interna/0000755000175000017500000000000012300715027016567 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/doc/interna/sketch.txt0000644000175000017500000000567311573645310020634 0ustar gregoagregoa[name] pce = perfect coding enviroment | perl crypted extension | polymorphic code elements .... pce - pse? namensgebung aus kosmologischen gründen mit ein paar quantenphysikalischen Überlegungen(bootstrap-aufbau) aus elementen aufgebau soll der editor soll universal einsetzbar sein Perfekt - natürlich soll die software die beste sein perl - ist die sprache in der der editor geschrieben ist der geist von perl:(tismtowtdi)(maximale freiheit - kombinierbarkeit der kräfte von elementen ) alles ist schöpfung also auch wandlung nur gott ist ewig coding - es geht um textbeabeitung es geht um schiffrierung und sinngebung in verschiedenem syntax enviroment - nicht emacs aber es sollte alles bieten was ein programmierer braucht um texte zu bearbeiten [warum perl?] - perl ist effektiv, mächtig, unaufdringlich, schnell genug und meine lieblingssprache - idealer textprozessor/es geht um textbasierendes editieren - perl als scriptsprache erlaubt einheitliches format für quellcode, config, macros,plugins im einheitlichen namensraum!!! - da der quellcode perl ist, braucht man nur den editor um den editor zu verbessern (+eingebaute hilfen) [softwaredesign] - für win / lin(gtk) - bin anteil platformabhängig - src(perl + wx) plattformunabhängig - installer: NSIS / rpm - visual toolkit:wxPerl - nutzung vieler wichtiger open source gemeindschaften: scintilla(wxSTC), wxwindows, mozilla(wxMozilla), CPAN - autonom / keine detein benötigt ausser das was der interaktive downloadmanager ausspuckt - minimal perl(800kB) und andere opensource tools(tidy,cvs,7z,bzip) enthalten(je bedarf) - < 9MB incl perl und wxperl; <1 MB eigentlicher quellcode - autonome Module mit autoerkennung [config] - config in lokalen text-datein die jeden umzug überstehen - alles Konfigurierbar(graphisch und in textdatein) - teilverhalten in subconfigs splitbar / subconfigs frei einbindbar - alles ist automatisierbar / jede Aktion ist ein macrokommando - leichte übersetzung in andere sprachen [visual design] - viele Module - 1 Fenster - möglichst wenig dialogboxen - optionale kommandozeile (z.B 1für shell und eine für suchbefehle) - wiederverwendbare gleichstrukturierte module - mit gehaltener taste sollen module frei positionierbar sein - exotische schriftsätze später, dank pango geplante module/bennung noch unklar mehrfache instanzen eines module(2 texte parralel) sollen möglich sein [module] (neutron) kern/oberfläche/plugin,update& statuszentrale (proton) editorkomponente / visuals (elektron) kommandozeile / kommandozentral4 weitere: -projektverwaltung -schnittstelle zum dateisystem -semantische struktur -textbibliothek -kurzhilfen zur aktuellen programmiersprache / sprachbaum -shortcuts -vorschau/wxMozilla/wxIE vielleicht später auch für tex uä -streng geheime visualisierungs werkzeuge [extensions] kephra-0.4.3.34+dfsg.orig/doc/interna/perlrules.txt0000644000175000017500000001767011573645310021370 0ustar gregoagregoawarum ich kein python mag? -------------------------- Ehrlich gesagt hab ich mich von python bedroht gefühlt, so stark, dass ich unbedingt was machen musste um python ordentlich schlecht zu machen. Jetzt hinterher merk ich deutlicher, dass meine Angst, mit Perl nicht mehr in zu sein, kleingeistig war und dass mein Perl nie in der Versenkung verschwinden wird, eher glaub ich, dass perl6 die Python Entwickler hart fordern wird. Aber am Anfang machte es mich schon ärgerlich, dass Python in aller Munde und Perl nur noch von Historikern und Journalisten erwähnt wurde. Dass viele die ich bewundere Python als beste Scriptsprache schätzen war noch in Ordung aber das ganze verlor sein natürliches Gleichgewicht zumal die meisten Argumente nicht die cleversten sind. Gerade dass mir die ganze Diskussion um die beste Scriptsprache billig vorkam lockte meinen Senf dazu hervor. Computersprachen Generell bei Programmiersprachen gibt es grob 2 Kontraste. Einer liegt zwischen Mensch und Maschiene. Also vereinfacht zwischen langsamen und komplexen Programmiersprachen(perl, python, ruby oder haskell) die dem menschlichen denken nah sein sollen und den schnellen und (für Maschienen) einfachen Sprachen (assembler). C und C++ liegen irgendwo in der Mitte. Weil Computer immer schneller und breiter werden, waren Sprachen wie Ruby und Perl erst in den letzten Jahren praxistauglich. Der andere Kontrast liegt zwischen schlanken und umfangreichen Sprachen. Also die Frage was gehört zur Sprache und was gehört in die Bibliotheken und Erweiterungen. Weil Programme immer mehr werden und immer mehr Aufgaben übernehmen wird es auch hier immer sinnvoller Standartbibliotheken zu verwenden und Sprachen zu erweitern, damit es nicht jeder Nutzer für sich machen muss. Grade dafür sind wieder die maschienennahen Sprachen sehr gut. Grad die Standartbibliotheken (zB Wx) sollten so wie Perl auch in C geschrieben sein. Damit sind Perl-Programme schneller als mit in Perl geschrieben Bibliotheken. Doch warum kümmere ich mich nur um Perl und Python? Weil diese beiden Sprachen in der Praxiswelt grad ganz vorne stehen. Klar gibt es noch Visual Basic von Microsoft, das natürlich verbreitet wie Hölle ist, reiche Bibliotheken hat und auch so schön langsam ist das es sogar von Perl überhohlt wird. Aber das beachte ich nicht weil es nicht frei ist und auch nicht innovativ ist sondern ein MS UrBasic+OOP+COM. Auch TCL vernachlässige ich weil es Perl seit Jahren hinterherhechelt ohne dessen Mut zu besitzen. Lua ist eher das was TCL einmal sein wollte: eine kleine schnelle Erweiterungssprache und auch Ruby ist noch zu jung um wirklich hier mithalten zu können. Haskell, zuletzt, ist wirklich innovativ aber noch viel zu langsam und nicht tauglich für echte Programme. PHP wird gerne als beliebteste Scriptsprache genannt, aber PHP ist wie XLST Versuch die Datenstruktur über das Programm zu stellen. Für Leute die nicht einsehen wollen das man zum programmieren eine Programmiersprache brauch. PHP ist an HTML und XLST an XML gefesselt, aber ich wollte ja von freien Sprachen schreiben, es bleiben also die 2: Perl und Python technisch. Perl ist etwas älter, ausgereifter, hat mehr verwendbare Erweiterungen schreckt aber Anfänger mit vielen sehr sonderbaren Konstrukten ab die zum Teil noch aus der Saurierzeit der alten Unixwelt stammen und hat auch einige Entwicklungen(Unicode) etwas verschlafen. Python ist aufgeräumter und äusserlich konsequenter und versucht grad auf den letzten Feldern wie der Regex, nested scopes usw, wo Perl noch vorraus ist, dies aufzuhohlen. Python hat aber selber schon viele Eigenheiten die erst mal gelernt sein wollen (wie zb. open, open2, open3, open4; """ usw). Aber zu sehr Einzelheiten gegeneinander aufzuwiegen macht nicht so viel sinn weil beide Sprachen noch wachsen, fehlentwicklungen zurückgenommen werden und voneinander gelernt wird. Es gibt grosse Überschneidungen in vielen Dingen die sich praktisch bewährt haben. Wo liegen dann die grossen Unterschiede? Perl und Python wurden mit recht verschiedenen Denkansetzen geschaffen. Der grösste Unterschied zwischen Perl und Python liegt darin, dass Individualität und Genialität von Perl mehr zugelassen und gefördert wird als von Python. Python wurde geschaffen um leichter seinen Job zu machen und in der Freizeit genial zu sein. Perl lässt dem Entwickler mehr Freiheit zu entscheiden was gut ist. Dieses Vertrauen in meinen Stil dass mir Perl entgegenbringt hilft mir mich wohl zu fühlen. Grad emotionale Sachen werden von technisch orientierten Menschen als weniger wichtig abgetan, aber Grundvertrauen dass alles gut ist und dass jeder selber weiss was für ihn gut ist, ist sehr sehr wichtig und mehr als gesund: heilend! Ich sage aber nicht dass Python böse ist und mich schikanieren will. Python stammt von Schulsprachen wie ABC und Modula(Pascal). Auch wenn ich finde dass die Schöpfer von ABC und Pascal in der guten Absicht bessere Programmierer zu erziehen die Menschen etwas von ihren natürlichen Antrieben abbrachten, wollten sie den Schülern wertvolle Ideen mitgeben die ihnen helfen sollten. Es ist aber grundverkehrt die Nutzer zu diesen Prinzipien zu zwingen. Jeder Pädagoge weiss dass Zuneigung, Offenheit und Förderung der natürlichen Talente viel viel mehr bringt als zusammenhangslose Ratschläge und Zwänge, die nur Trotz oder Selbstzweifel fördern. Und der ausgelernte Programmierer mit eigener Persönlichkeit brauch nun überhaupt gar keinen der einem was vorschreibt, sondern ein Werkzeug, dass genau das macht was er möchte. Python meint auch, dass es wichtiger ist den Einstieg leicht zu machen als ganze Potentiale einzelner komplexer Befehle al gusto verknüpfen zu können. Damit wird Python aber zum schlechteren Werkzeug für die Erfahrenen und zu dem was Python von Anfang sein wollte: eine Lern- und Ausbildungssprache. Darin wird sie Perl immer überlegen sein obgleich man mit Auslassen der anspruchsvollen Konstrukte auch Perl leicht lernen kann wenn man keine Lust auf Schikane hat. Python's Papa Guido van Rossum sagt oft sinngemäss: "es ist besser sich anzupassen weil es die Zusammenarbeit erleichtert und man auch so nach Monaten leichter seine eigene Programme versteht", was ja grad bei komplexen Sprachen wie Perl oder Python wichtiger ist als in einfacheren wie C. Diese rückgratlose Jobmentalität widert mich an. Wenn ich FREUDE und BEGEISTERUNG beim verstehen von Algorithmen und deren Implementierung empfinde, kann ich mir sehr gut alles merken. Demenz ist Anzeichen unbewusster Verdrängung, fragen sie hierzu ihren Heilpraktiker. Und wenn ich Menschen mag, versteh ich auch leichter ihre Art zu denken und zu programmieren, auch wenn ich selber es anders machen würde. Die Krücke der Vereinheitlichung nuschelt immer zu mir, dass Leute gar nicht vorhaben einander zu mögen. Man erinnere sich: Liebe ist die Freude am Andersein des Gegenübers. Perls Schöpfer Larry Wall ist gottesgläubig und weiss das. Er meint, dass es für das Ganze besser ist wenn jeder er selbst bleibt und Freude daran hat. Und wenn es mir Spass macht möchte ich frei sein den verworrensten Quellcode schreiben der jeden obfuscation-contest gewinnt. Python würde mir diese Freiheit nie lassen. Das Ideal der Sauberkeit ist dort wichtiger als Freiheit, erinnert mich etwas an 33, auch wenn es unfair ist. Es gibt kein höheres Ideal dass mich zu etwas verpflichtet, dass man nicht möchte. Auch nicht in der Computerwissenschaft. Es ist sinnlos etwas zum Wohle von etwas anderem zu verletzen. Leider merkt das nicht jeder. Deswegen werden mit Python die zerbrechlichen kaum beachteten Seelen zum Wohle der Computerwissenschaft verbogen. Dabei sollen grad Scriptsprachen dem Menschen dienen. Grad hier sind soziale und spirituelle Dinge viel wichtiger als in früheren Computersprachen wo es noch mehr darum ging den Computer erstmal zum Funktionieren zu bekommen. Es ist faszinierend etwas Funktionierendes aufzubauen, aber Menschen wollen mehr als nur funktionieren. Warum gibt es Perl Poetry aber kaum mir bekannte Python Poetry?kephra-0.4.3.34+dfsg.orig/doc/interna/manifest.txt0000644000175000017500000002436411573645310021157 0ustar gregoagregoaDieser Text soll den Leser davon überzeugen das es noch einen Editor geben sollte, den PCE! Keine Angst vor der Textlänge, es macht Freude zu lesen, nur wen Eigenlob stört sollte den ersten Absatz verpassen.Weiter Beleidigung der Konkurenz unter EDITOREN. -------------------------- Hilfe! noch einen Editor -------------------------- Winsle nicht um Gnade, wenn dir dein Editor reicht fliehe. Doch weil kein Editor perfekt sein kann wirst du wohl noch ein paar Zeilen lang interessiert weiterlesen. Perl rulez! Ja, angeblich gibt es genug Editoren, für jeden Programmierertyp und Anlass den passenden. Es gibt mächtige Entwicklungsumgebungen(IDE's) für 'ne Programmiersprache, es gibt kleine schnelle Editoren mit denen man Text eingeben und speichern kann und Editoren die dies und das sehr gut können, sogar Betriebsysteme, die von sich behaupten sie seien ein Editor(Emacs), aber keinen perfekten Editor, kein perfect coding enviroment das alles kann was mit dem Bearbeiten von Textdateien zu tun hat. Viele Editoren haben Werkzeuge die nur auf bestimmte Probleme getrimmt sind. Kaum geht das Leben einen Schritt weiter wird es wenig brauchbar, richtig intelligente Werkzeuge sehe ich selten bis gar nicht und sind die Editoren in manchen Bereichen wirklich gut, braucht man eh noch einen zweiten oder dritten sobald man ein anderes Aufgabenfeld betritt. Die Grossen sind meist zu schwerfällig, fressen zu viel Platz und brauchen ihr eigenes Lernprogramm weil viele Funktionen nur auf umwegen erreichbar sind oder nur mit Tastenkombinationen die ich als Anfänger nicht kenne. Die kleinen Editoren sind meist nur ein notepad mit einigen zusätzlichen Möglichkeiten die die Überlegenheit dieser Programme zeigen sollen. Bis ich weiss welcher dieser 50 Editoren der überlegene ist wechsle ich mit einem Tastendruck lieber in den abgespeckten Modus des PCE und hol mir die Funktionen dazu die ich brauche. Mit dem PCE vor Augen wird man einsehen das die allermeisten Editoren halbfertig sind und das aufgespreizte Gefieder ihrer Features einen geistigen Rohbau verdecken soll. Und genau deswegen lässt das Thema Editor viele Coder zum Hulk werden, weil sie meinen genug getestet zu haben und lieber etwas programmieren statt sich ein Programm anzuschaun das sie eh nicht benutzen werden. Schreiben ist eigentlich 'ne Sache die nichts weiter braucht als Inspiration, einen Stift und den Drang etwas zu erschaffen. Das weiss ich. Doch wenn Software dann richtig. Und die Heuschreckenschwärme von Editoren die in den Downloadarchiven ihr Unwesen treiben beweisen doch: Alle Lebewesen streben im grossen Strudel gen Perfektion die leider noch nicht erreicht wurde. Also treffen wir einfach das Ziel mit dem -------------- Geheimrezept -------------- Ich denke diese Dinge sind: 1. eine universale Anwenbarkeit durch universale Anpassbarkeit und Erweiterbarkeit 2. zur Vermeidung jeglicher Dummenarbeit universale Automatisierbarkeit 2. einfache benutzung, klare struktur, gute hilfe 3. Sparsamkeit mit Speicher, Festplattenplatz, nicht zu langsame Ausführung 4. Freude an der Sache Und ich behaupte mal PCE wird all das erfüllen können. ------------------------- PCE- das allheilmittel? ------------------------- So ungefähr. PCE soll jedes Problem das mit Textbearbeitung(kein Office oder DTP) zu tun hat lösen können und jeden anderen Editor ersetzen. Er soll auch mit einigen neuen frischen Ideen kommen, für Begeisterung sorgen und die leute zum teilen und gegenseitigem helfen ermuntern. PCE wird sogar die Probleme lösen an die du noch nicht dachtest. Aber ich will nicht blenden, deswegen jetzt anfassbare -------- Fakten -------- PCE wird NICHT GROSS, zwischen 4 und 12MB, je nachdem welche Komponenten schon auf dem Rechner da sind. (1,2MB Perl) (7MB wxPerl incl Scintilla und erweiterungen) (1MB CVS) (1-2MB quellcode) (1MB hilfe) zur zeit ist das zip 3MB gross, wird wohl auf 4MB anwachsen, also ist der PCE auch downloadbar! PCE wird auch NICHT LANGSAM weil er Komponenten aus dem vorkompiliertem Wx-Framework benutzt und nur mit dem Kern bootet und Perl zur Laufzeit alles gebrauchte nachladen kann. Perl rulez! Im Moment startet er noch in 2,3 sec auf meinem 800 Duron und XP. PCE ist NICHT KOMPLIZIERT. Er wird installiert wie jedes andere Programm und soll einfacher benutzbar sein als andere Editoren. Er kann per Dialog oder direkt per xml/pm config-text-datei configuriert werden, und ohne Neuinstallation überall auf rechner der gleichen Platform hinkopiert werden. PCE ist PORTIERBAR zwischen Linux, Windows, später auch mac, weil der perl-quellcode identisch bleibt. Nur die für die Platform komilierten Packete müssen ausgetauscht werden. Das könnte man auch mit installieren und kopieren von Perl und WxPerl und einigem mehr selbst machen weil die Komponenten in einer einfachen Dateistruktur abgelegt sind. PCE ist LEICHT ERWEITERBAR. Obwohl Plugins in allen Sprachen möglich sein werden (für die es wollen), tun es ein paar zeilen perl auch. dafür muss man nicht wirklich Perl können javascipt niveau reicht. PCE versorgt einen mit allen Infos die man dafür braucht Alles bis jetzt ist ja nicht schlecht, aber nichts besonderes. der wirkliche Vorteil vom PCE kommt im folgenden Tennismatch. --------------- Advantage PCE --------------- Mit PCE geht es mir um das ultimative Editierspielzeug. Und ich weiss das ich es nie allein oder mit einem kleinen Team schaffen werde dieses Spielzeug bis zur Perfektion zu bauen. Deswegen wird PCE Opensorce unter der OSL-Lizens(www.opensource.org) veröffentlicht. So kann ich Opensource Software(OSS) wie z.B.Perl, wxPerl, Scintilla, CVS, Gecko und mehr nutzen und brauch nur den Rahmen zu entwerfen und hinzufügen was noch fehlt. Unterste Schicht bildet Perl darauf wxPerl und darauf liegt der eigentliche PCE in dessen Modulen noch mehr externe Programme oder Bibliotheken eingebunden sind. So kann ich mir das Beste was andere machen rauspicken. Fehler und Mehrfachentwicklungen werden vermieden und wir kommen so auch schnell aus dem Knick um etwas Nützliches zu schaffen: Einen Editor der allen erlaubt ihre selbsgemachten Verbesserungen auszutauschen. Das geht weil dank Perl und wxPerl der eigentliche Quellcode unter Linux und Windows(Mac später) identisch ist. Und dank Modularität kann auch jeder Nutzer nach Herzenslust Module austauschen, weglassen oder verbessern. Gerade dadurch das alle aus dem gleichen Baukasten schöpfen kann noch ein Webdesigner vom Scriptkiddie profitieren und ein Systemprogrammierer lernt Funktionen zu schätzen die sich Latex-Setzer ausgedacht hat. Aber eine offene Architektur hat noch mehr Vorteile: ---------------------------- das unperfekte ist perfekt ---------------------------- Warum wird soviel Software geschrieben? - weil es spass macht etwas zu erschaffen. Aber auch weil Menschen unterschiedlich denken und fühlen. Das meiste an Software ist leider viel zu unbeweglich. Wenn jeder alles leicht anpassen könnte gebe es weniger Neuentwicklungen und man hätte mehr Potential das man zusammenführen kann um etwas grösseres oder besseres zu schaffen. Am besten nutzt man dabei die Erfahrungen seiner Vorgänger. Informatiker sagen dazu: auf den Lebenszyklus von Sofware vertrauen. Das bedeutet man macht eine Sache so gut es geht (gut genug ist eine masseinheit für einen JAPH) um die Aufgaben zu lösen die man grad hat oder die auf kurz kommen werden. Dadurch kann kann man zügiger einen Stand abschliessen, um über den Bullshit den man verzapft zu reflektieren und es beim nächsten mal besser zu machen wenn man wieder bei 0 anfängt (rebuild from scratch). So schafft man sauberen code und auch ein programm zum wohlfühlen das die meisten praxisnahen Probleme lösen kann. Wenn man von Anfang an so plant, zeigt man Weisheit und Kenntnis von den Grundregeln des Lebens. Larry Wall(Perl - Gründer) macht das auch und ist deswegen ein guter Mensch. ------------------------ Bauklötze prägten mich ------------------------ Was einen guten Menschen auch ausmacht, ist Vertrauen in die Eigeninitiative und den guten Willen sich zu einigen. Auch deswegen ist der PCE ein Baukasten. Wenn die Module durch einfache und saubere Schnittstellen getrennt sind können verschiedene Leuten an verschiedenen Orten sie unabhängig schreiben. Diese Module geben dem PCE immer eine Gruppe an Funktionen die nach Bedarf, während PCE läuft, rein und raus geladen werden können. Diese kleineren Codebatzen kann man besser überblicken und was sehr schön ist: sie haben kleinere Lebenszyklen und reifen deswegen schneller. Und sie gliedern sich ein wie ein normaler Programmteil der alles überall aufrufen kann ohne das ich was dafür tun muss. Das kommt durch die als veraltet oder unseriös verlachte Offenheit der Perl-sprache. Viele moderen Sprachendesigner glauben wenn man alles kontrollieren kann wird alles besser. Als wenn Gesetze jemals für Gerechtigkeit sorgen können. Komplexe Strukturen sind zuweilen das elegante Mittel. Wann man es benutzt, sollte aber nich vorgeschrieben sein. Freiheit und Austausch ist wichtiger. Und Perl kann nun mal OOP und SP parallel. Warum wählte ich noch ausgerechnet Perl für PCE? ------------- Perl rulez! ------------- Perl steht für praktisches und cleveres denken das bis zu einer Spiritualität reichen kann. Letztlich plane ich hier aber einen Texteditor. Und Perl ist berühmt und berüchtigt für seine Fähigkeit Text zu bearbeiten. Perl ist sogar die schnellste Sprache darin, was echt überrascht da Perl sonst nicht das schnellste ist. Grade weil Compiler-Sprachen viel schneller sind meinen viele Programmierer das Scriptsprachen wie Perl für Applikationen(grosse Programme) nicht gut sind. Scriptsprachen haben haben aber grad für grosse Programme den Vorteil das sie viel kürzer sind. 10mal kürzer ist aus erfahrung normal. Das kommt, weil man bei Scriptsprachen mehr mit weniger sagen kann. Das gefällt mir. Die Entscheidung war gefallen. Ausserdem sind heutige Rechner schnell genug. Wozu eigentlich? Damit es einem die Arbeit erleichtert denk ich. Also bleibts bei Perl oder einer anderen grossen Scriptsprachen. Von denen es in echt nur 3 gibt. Und alles in allem ist Perl die beste Wahl. Allen Anhängern einer Kampfkunst kann ich das auch unter 4 Augen genauer erklären. Letztlich glaub ich ist Perl die ausgereifteste Computersprache überhaupt und wird es mit Perl 6 noch eine Weile bleiben. kephra-0.4.3.34+dfsg.orig/doc/Bugs0000644000175000017500000000004311573645310015757 0ustar gregoagregoa ! textchanged event triggers twicekephra-0.4.3.34+dfsg.orig/doc/patches/0000755000175000017500000000000012300715027016556 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/doc/patches/current-fixes.txt0000644000175000017500000000257611573645310022137 0ustar gregoagregoaBecause measuring text is slow, Scintilla avoids doing this as much as possible. If you want to find the width of the widest line, ensure the document is all styled (SCI_COLOURISE) then call SCI_POINTXFROMPOSITION on the last position of each line. --- use Encode; sub AppendText { my ($self, $text) = @_; my $string = decode("utf8", $text); $self->SUPER::AppendText($string); } my $string = utf8::is_utf8($text) ? $text : decode('utf8', $text); --- my @methods = reverse sort $text =~ m{^sub\s+(\w+)}gm; --- #!/usr/bin/perl -w use strict; use utf8; use CGI; use Encode qw(decode_utf8); binmode STDOUT, ':encoding(UTF-8)'; binmode STDIN, ':encoding(UTF-8)'; my $q = CGI->new; $q->charset('UTF-8'); print $q->header(); --- print "äöü"; use PerlIO::encoding; binmode($FH, ":encoding(cp1252)") ":encoding(iso- 8859-1) print decode_utf8($q->param('name')) --- $self->SetAcceleratorTable ( Wx::AcceleratorTable->new ( [ wxACCEL_ALT, 'P', $ID_ACCEL_SEARCH ], ... ) ); EVT_MENU( $self, $ID_ACCEL_SEARCH, sub { $self->_controls->set_focus_text } ); --- Wx::AcceleratorEntry( wxACCEL_ALT || wxACCEL_SHIFT || wxACCEL_CTRL || wxACCEL_NORMAL, 'D' || WXK_NUMPAD1, # ASCII must be UPPERCASE. see %Keycodes% 66666, # EVT_MENU( $frame, 66666, \&DoSomething ); ); kephra-0.4.3.34+dfsg.orig/doc/patches/outline_parser.pl0000644000175000017500000000534211573645310022162 0ustar gregoagregoa#!/usr/bin/perl use strict; use warnings; use PPI; use PPI::Dumper; my $file = shift @ARGV; my $doc = PPI::Document->new($file) or die "Could not open file: $!"; parse_package($doc); print " O\n"; sub parse_package { # find out the package name, if none, assume main. my $tree = shift; my $packages = $tree->find_first('PPI::Statement::Package'); if ($packages) { my $words = $packages->find('PPI::Token::Word'); print "[P] " . $$words[1] . "\n"; parse_includes($tree); print " |\n"; parse_subs($tree); print " |\n"; parse_shedules($tree); #parse_shedules()... } else { print "[P] main:\n"; parse_includes($tree); print " |\n"; parse_subs($tree); print " |\n"; parse_shedules($tree); # ... continue parsing. } } sub parse_includes { # parse use/require statements. my $tree = shift; my $includes = $tree->find('PPI::Statement::Include') or return; foreach my $include (@$includes) { #my $name = ${ $include->find('PPI::Token::Word') }[1]; print " `- [I] $include\n"; } } sub parse_subs { # parse subroutines. my $tree = shift; my $subs = $tree->find('PPI::Statement::Sub') or return; foreach my $sub (@$subs) { next if $sub->isa('PPI::Statement::Scheduled'); my $subroutine_name = ${ $sub->find('PPI::Token::Word') }[1]; my $subroutine_prototype = $sub->find_first('PPI::Token::Prototype'); my $comment = parse_comment($sub); print " `- [S] $subroutine_name $subroutine_prototype\t$comment\n"; parse_variables($sub); } } sub parse_shedules { # parse BEGIN/END/INITCHECK blocks etc. my $tree = shift; my $subs = $tree->find('PPI::Statement::Scheduled') or return; foreach my $sub (@$subs) { my $blockname = $sub->find_first('PPI::Token::Word'); print " `- [B] $blockname\n"; parse_variables($sub); } } sub parse_variables { # parse variables from any subset of the tree. my $tree = shift; my $declarations = $tree->find('PPI::Statement::Variable') or return; foreach my $declaration ( @{$declarations} ) { my $type_of_declaration = $declaration->find_first('PPI::Token::Word'); my $variable_name = $declaration->find_first('PPI::Token::Symbol'); print " | `- [D] $type_of_declaration $variable_name\n"; } } sub parse_comment { # prints the first comment in some subset of the tree. my $tree = shift; my $comment = $tree->find_first('PPI::Token::Comment') or return ""; return $comment->content(); } kephra-0.4.3.34+dfsg.orig/doc/patches/print-draft.pl0000644000175000017500000001557311573645310021370 0ustar gregoagregoause Wx::Print; package Printing; use strict; sub window { shift; shift; my $parent = shift; return PrintingDemoWindow->new( $parent, -1 ); } package PrintingDemoWindow; use strict; use vars qw(@ISA); @ISA = qw(Wx::Panel); use Wx qw(:sizer); use Wx::Event qw(EVT_BUTTON); sub new { my $class = shift; my $this = $class->SUPER::new( @_ ); my $top = Wx::BoxSizer->new( wxVERTICAL ); my $canvas = PrintingDemoCanvas->new( $this, -1 ); my $preview = Wx::Button->new( $this, -1, "Preview" ); my $print = Wx::Button->new( $this, -1, "Print" ); my $buttons = Wx::BoxSizer->new( wxHORIZONTAL ); $buttons->Add( $preview, 0, wxALL, 5 ); $buttons->Add( $print, 0, wxALL, 5 ); $top->Add( $canvas, 1, wxGROW ); $top->Add( $buttons, 0, wxGROW ); $this->SetSizer( $top ); $this->SetAutoLayout( 1 ); $this->{CANVAS} = $canvas; EVT_BUTTON( $this, $preview, \&OnPreview ); EVT_BUTTON( $this, $print, \&OnPrint ); return $this; } sub canvas { $_[0]->{CANVAS} } use Wx qw(wxTheApp); sub OnPreview { my( $this, $event ) = @_; my $prev = PrintingDemoPrintout->new( $this->canvas, "Preview" ); my $print = PrintingDemoPrintout->new( $this->canvas, "Print" ); my $preview = Wx::PrintPreview->new( $prev, $print ); my $frame = PrintingDemoPreviewFrame->new( $preview, wxTheApp->GetTopWindow, "Printing Demo Preview", [-1, -1], [600, -1] ); $frame->Initialize(); $frame->Show( 1 ); } sub OnPrint { my( $this, $event ) = @_; my $printer = Wx::Printer->new; my $printout = PrintingDemoPrintout->new( $this->canvas, "Print" ); $printer->Print( $this, $printout, 1 ); $printout->Destroy; } package PrintingDemoPreviewFrame; use base 'Wx::PlPreviewFrame'; sub Initialize { Wx::LogMessage( 'PrintingDemoPreviewFrame::Initialize' ); $_[0]->SUPER::Initialize; } sub CreateControlBar { Wx::LogMessage( 'PrintingDemoPreviewFrame::CreateControlBar' ); $_[0]->SetPreviewControlBar ( PrintingDemoControlBar->new( $_[0]->GetPrintPreview, $_[0] ) ); $_[0]->GetPreviewControlBar->CreateButtons; } package PrintingDemoControlBar; use base 'Wx::PlPreviewControlBar'; sub new { Wx::LogMessage( 'PrintingDemoControlBar::new' ); $_[0]->SUPER::new( $_[1], 0xffffffff, $_[2], [0, 0], [400, 40] ); } sub CreateButtons { Wx::LogMessage( 'PrintingDemoControlBar::CreateButtons' ); shift->SUPER::CreateButtons; } package PrintingDemoPrintout; use strict; use vars qw(@ISA); @ISA = qw(Wx::Printout); sub new { my $class = shift; my $canvas = shift; my $this = $class->SUPER::new( @_ ); $this->{CANVAS} = $canvas; return $this; } sub GetPageInfo { my $this = shift; Wx::LogMessage( "GetPageInfo" ); return ( 1, 2, 1, 2 ); } sub HasPage { my $this = shift; Wx::LogMessage( "HasPage: %d", $_[0] ); return $_[0] == 1 || $_[0] == 2; } sub OnBeginDocument { my $this = shift; Wx::LogMessage( "OnBeginDocument: %d, %d", @_ ); return $this->SUPER::OnBeginDocument( @_ ); } sub OnEndDocument { my $this = shift; Wx::LogMessage( "OnEndDocument" ); return $this->SUPER::OnEndDocument(); } sub OnBeginPrinting { my $this = shift; Wx::LogMessage( "OnBeginPrinting" ); return $this->SUPER::OnBeginPrinting(); } sub OnEndPrinting { my $this = shift; Wx::LogMessage( "OnEndPrinting" ); return $this->SUPER::OnEndPrinting(); } sub OnPrintPage { my( $this, $page ) = @_; my $dc = $this->GetDC(); # we need to set the appropriate scale my( $x_size, $y_size ) = ( $PrintingDemoCanvas::x_size, $PrintingDemoCanvas::y_size ); my( $xmargin, $ymargin ) = ( 50, 50 ); # total size ( borders on top/bottom, left/right ) my( $xsize, $ysize ) = ( $x_size + 2 * $xmargin, $y_size + 2 * $ymargin ); # dc size my( $xdc, $ydc ) = $dc->GetSizeWH(); # calculate the scale my( $xscale, $yscale ) = ( $xdc / $xsize, $ydc / $ysize ); my $scale = ( $xscale < $yscale ) ? $xscale : $yscale; # center the image my( $xoff, $yoff ) = ( ( $xdc - ( $scale * $x_size ) ) / 2.0, ( $ydc - ( $scale * $y_size ) ) / 2.0 ); # set the DC origin / scale $dc->SetUserScale( $scale, $scale ); $dc->SetDeviceOrigin( $xoff, $yoff ); if( $page == 1 ) { $this->{CANVAS}->OnDraw( $dc ); } if( $page == 2 ) { } # empty page } package PrintingDemoCanvas; use strict; use vars qw(@ISA); @ISA = qw(Wx::ScrolledWindow); use Wx qw(wxCURSOR_PENCIL wxWHITE); use Wx::Event qw(EVT_MOTION EVT_LEFT_DOWN EVT_LEFT_UP); use vars qw($x_size $y_size); ( $x_size, $y_size ) = ( 800, 800 ); sub new { my $class = shift; my $this = $class->SUPER::new( @_ ); $this->SetScrollbars( 1, 1, $x_size, $y_size ); $this->SetBackgroundColour( wxWHITE ); $this->SetCursor( Wx::Cursor->new( wxCURSOR_PENCIL ) ); EVT_MOTION( $this, \&OnMouseMove ); EVT_LEFT_DOWN( $this, \&OnButton ); EVT_LEFT_UP( $this, \&OnButton ); return $this; } use Wx qw(:font); use Wx qw(:colour :pen); sub OnDraw { my $this = shift; my $dc = shift; # my $font = Wx::Font->new( 20, wxSCRIPT, wxSLANT, wxBOLD ); # $dc->SetFont( $font ); $dc->DrawRotatedText( "Draw Here", 200, 200, 35 ); $dc->DrawEllipse( 20, 20, 50, 50 ); $dc->DrawEllipse( 20, $y_size - 50 - 20, 50, 50 ); $dc->DrawEllipse( $x_size - 50 - 20, 20, 50, 50 ); $dc->DrawEllipse( $x_size - 50 - 20, $y_size - 50 - 20, 50, 50 ); $dc->SetPen( Wx::Pen->new( wxRED, 5, 0 ) ); # wxGTK does not like DrawLines in this context foreach my $i ( @{$this->{LINES}} ) { my $prev; foreach my $j ( @$i ) { if( $j != ${$i}[0] ) { $dc->DrawLine( @$prev, @$j ); # $dc->DrawLines( $i ); } $prev = $j; } } } sub OnMouseMove { my( $this, $event ) = @_; return unless $event->Dragging; my $dc = Wx::ClientDC->new( $this ); $this->PrepareDC( $dc ); my $pos = $event->GetLogicalPosition( $dc ); my( $x, $y ) = ( $pos->x, $pos->y ); push @{$this->{CURRENT_LINE}}, [ $x, $y ]; my $elems = @{$this->{CURRENT_LINE}}; $dc->SetPen( Wx::Pen->new( wxRED, 5, 0 ) ); $dc->DrawLine( @{$this->{CURRENT_LINE}[$elems-2]}, @{$this->{CURRENT_LINE}[$elems-1]} ); } sub OnButton { my( $this, $event ) = @_; my $dc = Wx::ClientDC->new( $this ); $this->PrepareDC( $dc ); my $pos = $event->GetLogicalPosition( $dc ); my( $x, $y ) = ( $pos->x, $pos->y ); if( $event->LeftUp ) { push @{$this->{CURRENT_LINE}}, [ $x, $y ]; push @{$this->{LINES}}, $this->{CURRENT_LINE}; $this->ReleaseMouse(); } else { $this->{CURRENT_LINE} = [ [ $x, $y ] ]; $this->CaptureMouse(); } $dc->SetPen( Wx::Pen->new( wxRED, 5, 0 ) ); $dc->DrawLine( $x, $y, $x, $y ); } 1; kephra-0.4.3.34+dfsg.orig/doc/StableReleases0000644000175000017500000001403611573645310017764 0ustar gregoagregoarelease notes of all Kephra stable versions 0.5 {0.4.3} * new document property: encoding (8bit/utf-8) + utf works now * code folding support + 4 toggle functions: fold here, recursive, level, all + usable with mouse (fold margin) and keys ((|)[+]+<+>) + 2 styles for folding marker: boxes and arrows + optional flagline shows where text is folded * new tabbar + move tabs with mouse and keys + close icons on each tab + document menu in the right corner * marker added (F2+ or Searchbar or Left Click in Marker margin) + new tools + display @INC and %ENV + output selection in dec and hex + color picker, displays also selected color value + note selection on shift+f4 + changeable interpreter path-conf key: app > panel > output > interpreter_path + 3 new main window modes: fullscreen, max edit, transparent + improved stausbar, from a config file, with context help + save and restore textfold state in sessions and file history + convert HTML enteties + new help menu items open default browser with + online doc, native lang forum + bug tracker, feature wish tracker + file missing dialog + writes files also in missing dirs ~ end of line chars of new docs depends now on the running OS [ on splitters can now be clicked 0.4 * Searchbar * notepad panel extension * output panel extension for perl programs * new contextmenus: (on selected text, on searchbar, on tabbar, on statusbar) * customizable mainmenu, toolbars, contextmenus * File history menu * 10 doc spanning bookmarks * 8 new lexer: avennue BAAN .bat diff errorlist makefile matlab property * german with umlauts * files directories and can now be dragged into editpanel + new file with a template menu + open all files from a dir + rename files through file menu + load and store a backup file session + delete back tab, + deletes now to next indention level + brace navigation with + + goto last edit (++) + search dialog now quicker, less flicker and with drag n drop in + customizable title bar + optional new and close icon in tabbar + rectangular selection with keyboard (+) + number of selected lines are displayed in statusbar + blockformat ++, menu edit > format + line wrap under menu edit > format + firstname: new document property holds filname without ending + can use [$$firstname] as template variable too + reload templates on save + move document line and page wise from searchbar input + tabbar tabs numbering optional config key: app > tabbar > number_tabs + tabbar filename ending optional: app > tabbar > file_info = [first]name + autonotify (conf key file > open > auto_notify ) + autosave (conf key file > save > auto_save ) + Perl 5.10 keywords in the perl lexer + doc navigation from searchbar (hold ) ~ changed statusbar onclick behaviour ~ better goto line dialog ~ format and convert function much faster ~ block navigation now on +| ~ document switch back now on + ~ much less flicker in toolbar and tabbar ~ menu und toolbar items can now disable, be checked by internal events [ checkable and disable menu items [ shown pathes now OS compatibel ] runs with newest Wx and newest Perl ] added and removed dependencies 0.3 ? full stable release, more comfort * autoindent * bracelight and bracebadlight + braceindent and bracededent + leftclick on statusbar for changing settings shortcuts + leftclick on rightmost statusbarfield for getting infos about file + show unsaved and readonly status in tabs + show number of selected chars / cursor pos in % + optional warning dialog while overwriting files + replace line [ new fresher icons, several new for coming new functions [ 2 more functions in the toolbar [ more responsive cursor position display [ linenumbermargin has always enough width [ quit dialog now shows numbers and "unsaved files" [ faster splashscreen ] remember directory of session file ! php lexer fixed ! over 35 bugfixes 0.2 * multiple document handling with properies for each doc start cursorpos, syntaxstyle, EOL Mode, Tab usage * find and replace dialog + autosaves now all properties and configs and autoreload on next start + backup autosave file and restore ist in emergency case + visual feature: switch back if you click on current + file option: start with an empty file, open each file once, open text files only ' help text: this version texts + ask now for unsaved files to save on quit + view option: intention guides, caret line highlighting + autodetect EOL Mode, write protection + direct doc selection with Alt+Number + win XP look + customizable Syntaxstyle, select them and autoselect + german localisation + much faster reading of large files file menu: insert file, edit menu: format functions, convert functions document menu: eol mode, styles, spaces, write protection Statusbar: cursorpos, eol, spaces, style save and load external configs, handling close window event config: many new styles, contextmenu, color and caret settings file menu: reopen, save copy as, edit menu: Replace, Undo History, brace comment, Selection Move, line move indent unindent, script comment uncomment, search menu: find, find next, find previous, find selection, 3Bookmarks goto line number, view menu: hard tabs, whitespace, 4Margins, Line Wrap, font dialog, View EOL config menu: open, load and save config on the fly, default config file save before exit, Keyboard Map, Licenses C-style, CSS Style, HTML-Style, select and autoselect Syntaxstyle remember file, asks for filename if you save new file, better Perl-style 0.1: starter exe, english Menu, file menu: new file, open, save file, save as edit menu: undo, redo, cut, copy, paste, clear, select all view menu: linenumbermargin, long line indikator, colored gutter, first syntaxstyle(perl), filename in tab and the titlekephra-0.4.3.34+dfsg.orig/doc/Roadmap0000644000175000017500000000310411573645310016443 0ustar gregoagregoa1.0: - plugins: tree, commandline, projects, filesystem - tools: outline, tidy, debugger 0.7 Toolintegration + error highlighting/simple debugger + App::Ack 0.6 Plugin API + commandline and tree tool extention + simple file browser + tidy 0.5 polish for daily use 0.4.5 0.4.4 fresh docs, about dialog, more localisations 0.4.3 utf safe, cpan install, marker 0.4.2 new tabbar, better folding 0.4.1 folding, more converter 0.4 fully configurable 0.3.10 output and notepad panels 0.3.9 inline default configs now complete 0.3.8 move tabs 0.3.7 autosave, autonotify 0.3.6 new formater 0.3.5 file history and templates menu 0.3.4 open dir 0.3.3 new configurable GUI, commands and event system 0.3.2 brace navigation, contextmenu on text selection 0.3.1 searchbar, bookmarks, goto last edit, DnD files 0.3 more comfort + autoindent, bracelight, braceindent, block navigation + search and replace in files, search item history + file sessions, info symbols in tabbar, drag'n'drop of files + enhanced statusbar is now interactive and has contextmenus 0.2.3 file sessions, save on exit dialog 0.2.2 search and replace in files 0.2 multi document handling + find and replace dialog + opens with same docs and settings as on close, otional ask before close + autodetect EOL mode and write protection, faster IO + more customizable Syntaxstyles with autoselect by fileending + more visual helper, win XP look 0.1 first public stable release + edit only one document + syntaxhighlighting + basic file IO + some graphic markerkephra-0.4.3.34+dfsg.orig/doc/TestingReleases0000644000175000017500000004720411573645310020172 0ustar gregoagregoarelease notes of all Kephra testing versions 0.4.4 Acme {0.4.3.13} * acme like mouse control + paste (left+middle) + cut (left+right selected left to right) + delete (left+right - selected right to left) + search (middle on slection) or goto last edit (if no text selected) + middle (insert slection) inspired by from emacs * better basic editing + toggle selection with ctrl+y + select content items with ctrl+shift+y + insert rectangular selections + move line tabwise left and right with ++ * new tools: + copy surrounding quoted string + insert last used perl var in that block + insert time and date ~ moved to tools menu: autoindention, braceindention, bracecompletion + bug and request tracker links in help menu + zoom in, out and back with ++<+>,++<-> and ++<#> + works also in output panel + note slection (shift+f12) + copy with left click on selection + search selection with middle click + copy selection in output panel with ~ brace nav is caret pos aware (jumps from inside to inside or outside to outside) ~ replace to nothing enabled again ? 7 new tests, 17 reactivated " added keyword default to perl lexer def ' updated keymap and navigation ' pod fixed by kristian++ 0.4.3 SciTe * utf handling + open, change and save utf files + new document property: encoding + autodetect, read and write utf files + status field codepage [ added encoding menu under document > encoding ! conversion may still be problem ! utf menu label work again * Marker + goto prev|next [global], set/unset or delete marker + set/unset marker and bookmarks by mouse + session file stores marker positions [ marker nav in searchbar [ new bookmark icons (jenne++) + new tools + color picker + output selection in dec and hex + output %ENV + notepad has line move and goto search bar ~ templates moved into tools folder + reworked UI + romanian localisation + loading statusbar from config + statusbar has context help while mouse hover " added keys app > statusbar > file and app > statusbar > node [ contextmenus are more visually synced with statusbar + new main window modes + fullscreen mode + max editpanel mode (disables all bars) + transparent mode + you can combine stay on top and transparent mode with Ctrl+Alt+F11 + end all modes with esc key ~ code folding changes ~ fold function from context menu respond to clicked location ~ change sibling to level fold ~ changed key binding, all function are now [+ ] + <+> + editpanel margin context menu + all context menu now are optional + switch menubar visibility + can assign icons to menus (currently on file open and close ) + set search dialog transparency unter dialog > search > transparency + run script icon in main toolbar [ some icons reworked (jenne++) [ rearranged file and tools menu [ splitter are now without live update, has lot less flicker ~ autoconverts of EOL are now visible and easy to undo + save and restore textfold state in sessions and file history + writes files also in missing dirs + refresh autosaved configs after cpan update ~ line_nr margin width autosize works now per doc ~ current dir is now always synched with current file ' updated german help-forum link " different defaultsettings for new and opened files ! crash while folding ! all visual settings work global again ! all event react on selection correct again ! don't loose caret while find and defold ! fixed cursor pos on line move ! wrong tabbar content after some close doc events ! tab info chat in wrong tab ! bookmarks work again ! splashscreen works again ! fixed test suite 0.4.2 Phase 5 * folding changes + fold all (alt+shift+plus) + fold recursively (alt+shift+minus) + key binding for fold ops: fold => alt+minus, fold siblings => alt+plus ~ fold mouse binding: left => here, midd => recursive, right => siblings, l+f => all + optional flagline shows where text is folded + option for keeping caret visible while folding + second fold marker style set editpanel > margin > fold > style to arrows or boxes + open online doc and native lang forum URL in default browser + convert spaces to its HTML entity + convert all ISO 8859-1 enteties except whitespace + display @INC pathes + recognizes now tab mode of opened file + file > defaultsettings > EOL_new can now be 'OS' => new files have lineendings according the OS you currently run + note selection on shift+f4 - no menu icons under mac ~ doc property bracelight is now view option ~ editpanel autofocus is now off per default ~ rearranged main app layout (no more icons on tabbar) ~ rearranged context menu of tab status bar cell, now with more items ~ config key app > panel > notepad > content renamed to content_file [ moving folding menu to fold margin in view menu [ unfolding when goto a hidden line [ can set text margin to width of 3 px ] define event groups ] new module Kephra::Document::Property for by user changeable doc property " some locale strings were translated to wrong language ! countless fixes, many from Andreas Kaschner++: 0.4.1 Kommodo Edit * code folding support + fold sibling nodes + intial norsk localisation + intial czech localisation + select interpreter with config key app > panel > output > interpreter_path + file missing dialog + commandlist cache + autopluggable localisation system + added config key editpanel > auto > focus [ editpanel context menus don't open over margin anymore [ cleaner search dialog [ darker (yellow) caret line (was nearly unvisible) [ less intrusive default color for folding markers [ less intrusive default color for line number [ find item history realtime update now works in search dialog ] new commandlist leaf: keycode ] reworked parts of Kephra::API::CommandList ] reworked parts of Kephra::API::EventTable ] renewed parts of search module ] rebuild notify dialog ] moving codepage setting from hard wired to config set " editpanel > margin > fold is now a node that holds forecolor, back and visible ' updating key layout docs ' updated roadmap in kephra.pm POD ~ close app key binding changed + => + ~ changed name convention for icons no more underscore => new-names.xpm ~ open binary files (only_text = 0)is now default, problems with utf files ~ activate UTF8 for Config::General when locale file requires - close all key binding changed + - removed stupid restrictions not to open emty files ! 14 bugfixes 0.3.10 Padre * notepad panel extension * output panel extension for perl programs + added Menu: Tools + added Menu: View > Panel + avennue highlighter + BAAN highlighter + .bat highlighter + diff highlighter + errorlist highlighter + makefile highlighter + matlab highlighter + property file highlighter ~ added __WARN__ and __DIE__ to perl lexer [ splashscreen img and app icon now as xpm too [ + goto line icon [ fixed tabbar icon tooltip texts ] complete new starter ] internal file namespace cleanup ] renamed Config::Embedded -> Config::Defaults ] finished last Kephra::Config::Tree functions ] switched from YAML to YAML::Tiny (less code, less memory, all we need) ] making DragAcceptFiles optional because not supported by GTK ' added and extended POD for main and API Modules ' POD fix in Kephra.pm ' removed "all rightes reserved" ! restore curser pos in current file after restart ! fix perl lexer color definition ! fixed about dialog ! crash on file open ! Gabor: optimized config file type recogition ! toolbar appeared in wrong status bar cell ! wordchar settings where missing 0.3.9 Firefox + now complete embedded configs making Kephra selfhosting without config files + added pbp.conf according perl best practices + added replace selection into context menu over selected text in editpanel + context menu over statusbar info field + + works in searchbar + document switch backs works out of search bar + added pbp.conf according to damians perl best practices - removed default global and interface conf, replaced by embedded conf - removed select app language menu - remove Hash::Merge and Clone as dependencies [ put file sessions menu out of file menu on top level [ put goto-line into searchbar [ folding the upper half of the view menu ] lot of internal cleanups ' formated and updated documentation ? more compile tests for modules that arent loaded on start ! ignore in filechange notify dialog now works until next file change happens ! heavy bugfixing 0.3.8 + move tabs with ++ + Ctrl+Shift+G works from the searchbar input + position searchbar in the middle between tabbar and edit panel ~ change Switch doc back to ++ ~ move xml comment from + to + [ new splashscreen (finally one with the right name in it) ] wxperl 0.83 ! very much bug fixing 0.3.7 + autonotify (conf key file > open > auto_notify ) + autosave (conf key file > save > auto_save ) + Perl 5.10 keywords in the perl lexer + jump to doc begin and end from searchbar input whith +(|) + change doc from searchbar input whith +(|) + added replace line Command to main menu: Edit > Line > Replace ~ changed tablabel configfile : prefix $ ~ join lines now leaves a space between joined lines ~ join lines has key binding : ++ ' added POD documentation 0.3.6 + blockformat ++, menu edit > format + line wrap under menu edit > format + load and store a backup file session + firstname: new document property holds filname without ending + can use [$$firstname] as template variable too + reload templates on save + move document line and page wise from searchbar input + tabbar tabs numbering optional config key: app > tabbar > number_tabs + tabbar filename ending optional: app > tabbar > file_info = [first]name ~ renamed 'global\sub\localisation' to 'global\sub\documentation' ~ renamed 'config\icon' to 'config\interface\icon\' ~ reneame 'feature.txt' to 'all_feature.txt' [ removed ambiguity in german mainmenu navigation with keyboard [ use wx keycodes, less error prone ] less subconfigs ' some more documenting in default.conf ' advanced feature tour under 'special_feature.txt' ' some beginnings of czech localisation ! reload all docs switched to last doc ! move document line and page wise from searchbar input ! search dialog icon shows again ! optimizing speed and undef value handling of menu data generation ! file first names now correct when it has no file ending 0.3.5 * File history menu * Insert templates menu + custom title bar + option to make toolbars nonereactive (disable events) + multiple events on GUI element - auto brace join [ internal cleanups ! repaired searchbar ! exit dialog entitles also unnamed files ! some other bugs 0.3.4 + Open all files of a dir + searchbar contextmenu extended for search range + documentlist menu extended ] code claenup ~ changed statusbar onclick behaviour ~ format and convert function much faster ! many bug fixes 0.3.3 ? new configurable GUI, commands and event system + rebuild mainmenu + new reaktiv toolbar + searchbar contextmenu + rename files + drag n drop in search dialog [ checkable and disable main menu items [ tooltips and status help on tabbar icons ] faster tab change ~ better goto line dialog ~ search dialog quicker and with less flicker ! several bugfixes 0.3.2 ? beginning new configurable GUI system, rebuild contexmenus * brace navigation with + * new contextmenu on selected text + umlauts, disable checkitems and radioitems in context menus + new dynamic contextmenu on tabbar for selecting current document + delete back tab, + deletes now to next indention level + + now also switches focus back to editpanel ~ document switch back now on + ~ goto last edit now on ++ ! some bug fixes and internal cleanups 0.3.1 Nedit ? bigger core changes, some new features * searchbar with incremental search and 3 buttons (fore, back, goto last edit) + 10 doc spanning bookmarks + goto last edit + optional new and close icon in tabbar + rectangular selection with keyboard + files can now be dragged into editpanel + directories can now be dragged into editpanel + number of selected lines are displayed in statusbar [ shown pathes now absolute and OS compatibel ] new internal document property handling ~ much less flicker in toolbar and tabbar ~ block navigation now on +| 0.3 ? full stable release, more comfort * autoindent * bracelight and bracebadlight + braceindent and bracededent + leftclick on statusbar for changing settings shortcuts + leftclick on rightmost statusbarfield for getting infos about file + show unsaved and readonly status in tabs + show number of selected chars / cursor pos in % + optional warning dialog while overwriting files + replace line [ new fresher icons, several new for coming new functions [ 2 more functions in the toolbar [ more responsive cursor position display [ linenumbermargin has always enough width [ quit dialog now shows numbers and "unsaved files" [ faster splashscreen ] remember directory of session file ! php lexer fixed ! over 35 bugfixes 0.2.3 ? feature enhancement and bug fix * file sessions * on quit dialog for selecting files to save + open multiple files via dialog + history for search and replace strings + xp style now optional [ close current file with middle click on tabbar ! open empty files 0.2.2(.0) (switched to 4 number version counting, but i leave the last zero out) ? feature enhancement and bug fix * search and replace in files + asm style + save on change doc + open statusmenu files via mainmenu [ internal sub now only have one _ prefix ! bug in search prev ! style repaint on save as bug 0.2.11 ? feature enhancement and bugfix release + find in selection + replace all in selection + replace with confirm in selection + menu item find from start + recognise selection from menu calls + Ctrl+Enter (in search dialog) closes dialog and finds first (find button behaviour) + set max tab width via config [ more benchmark ! reload autosettings fixed ! status context menu changes language properly ! dialog saves search and replace text first time like it should ! minor checkbox selection fix in search dialog ! bug in font change ! line wrap bug 0.2.10: ? new feature and maintain release * contextmenus on statusbar + shift+Enter in search dialog searches backward [ massive refracturing fore new namespace [ several new modules ! minor fixes in menu 0.2.09: ? testing and maintain release + call replace in find dialog ~ DND Files now only over tabbar ~ close other now with ctrl+shift+Q ~ better search menu [ massive refracturing fore new namespace ! minor fixes in menu, statusbar, and keymap 0.2.08: ? shiny little feature enhancement release + Drag 'n Drop Files from Explorer into the Editor 0.2.07: ? suporting porters release + pce.pl can now called under win from anywhere ! small bugs in show files 0.2.06: ? minor enhancement release + block navigation + open files in current directory 0.2.05: ? maintaince release for linux usage - direct document selection with Alt+Number [ path for config and help can now be set freely 0.2.04: ? major stable and bugfix release + view option: stay on top / internal changes and cleanups ! bugfixes in menu and logic 0.2.03: ~ converter take now the whole text when nothing is selected / internal cleanup 0.2.02: + delete trailing spaces / cleaning internals 0.2.01: + 2 new options for opening files, replace new empty docs + single document mode + save last tilde files like that: file.name~ ! Bugfix in EOL Mode, the editor produced always cr+lf ! 2 Bugfixes in Main menu 0.2.00: ? major stable and bugfix release 0.1.99: + backup autosave file, and restore ist in emergency case - Bookmarks ! bugfixes 0.1.98: + save dialog on close and exit now contain cancel / internal improvements ! bugfixes in Config 0.1.97: + jumpes to the file if you open an already opened file / internal improvements ! bugfixes in main, config, file, document, STC ! bugfix in General::Config 0.1.96: + visual feature: switch back if you click on current a la opera + new option: start with an empty file + new option: open each file once + new option: open text files only / bugfixes 0.1.95: + autoreload for config files + this version texts ~ better menus ! bugfixes 0.1.94: ! fix from ugly bug that eating docs, therefor HIGHLY RECOMMANDED updated + ask now for unsaved files to save on quit ~ minor optical fixes in search dialog, save all icon, color of LLI 0.1.93: * settings for each document will handled seperately and saved to the next start these settings are at start cursorpos, syntaxstyle, EOL Mode, Tab usage + intention guides + caret line highlighting + autodetect EOL Mode + autodetect write protection + direct doc selection with Alt+Number ~ right margin color changesd ~ another app icon ~ search menu unfolded 0.1.89: ? bugfix release 0.1.87: * multiple document handling find, replace and bookmarks are still single document oriented 0.1.84: * find and replace dialog + win XP look 0.1.68: autosave options, customizable Syntaxstyle autoselect 0.1.64: german localisation, much faster reading of large files file menu: insert file, edit menu: format functions, convert functions document menu: eol mode, styles, spaces, write protection Statusbar: cursorpos, eol, spaces, style save and load external configs, handling close window event config: many new styles, contextmenu, color and caret settings 0.1.24: SECOND COMPLETE RELEASE (incl. PRE 0.2pre1)! file menu: reopen, save copy as, edit menu: Replace, Undo History, brace comment, Selection Move, line move indent unindent, script comment uncomment, search menu: find, find next, find previous, find selection, 3Bookmarks goto line number, view menu: hard tabs, whitespace, 4Margins, Line Wrap, font dialog, View EOL config menu: open, load and save config on the fly, default config file autsaves now all properties, save before exit, Keyboard Map, Licenses C-style, CSS Style, HTML-Style, select and autoselect Syntaxstyle remember file, asks for filename if you save new file, better Perl-style 0.1: FIRST COMPLETE RELEASE(incl. PRE 0.2)!, startexe, english Menu, file menu: new file, open, save file, save as edit menu: undo, redo, cut, copy, paste, clear, select all view menu: linenumbermargin, long line indikator, colored gutter, first syntaxstyle(perl), filename in tab and the title the VERSION number is like a date in the development timeline of the program, no matter which part, a bigger number comes always after a smaller, Kephra 0.2 comes after pre 0.1.23 Legend: ^ purpose * big new feature + new feature ~ change - remove ? tests ! bugfix [ interface ] internals " configs ' help/docu / commentkephra-0.4.3.34+dfsg.orig/t/0000755000175000017500000000000012300715027014625 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/t/10_new.t0000644000175000017500000000123411574310053016105 0ustar gregoagregoa#!/usr/bin/perl -w # # Construct a Kephra object, but don't start it # use strict; use warnings; BEGIN { $| = 1; unshift @INC, './lib', '../lib'; } use Test::NoWarnings; use Test::More tests => 1; #use Test::Exception; #use Kephra::App; #use Kephra::Config; # #File::Spec->catdir($basedir, 'config'); #$Kephra::temp{path}{config} = './share/config'; #$Kephra::temp{path}{help} = './share/help'; # #$Kephra::STANDALONE = 'dev'; # #unlink 'share/config/global/autosaved.conf'; #unlink 'share/config/global/autosaved.conf~'; # # Create the new Kephra object #my $kephra = Kephra::App->new; #isa_ok( $kephra, 'Kephra::App' ); exit(0); kephra-0.4.3.34+dfsg.orig/t/01_compile.t0000644000175000017500000000247711573645310016764 0ustar gregoagregoa#!/usr/bin/perl -w # # Compile Testing for Kephra: # looking if all expected Modules are there and do compile # BEGIN { chdir '..' if -d '../t'; $| = 1; #unshift @INC, './lib', '../lib'; } use strict; use warnings; use lib 'lib'; #use blib; use Test::More; use Test::Script; use Test::NoWarnings; use File::Find qw(find); my @required_modules = qw( Cwd File::Find File::Spec::Functions Config::General YAML::Tiny Wx Wx::Perl::ProcessStream ); my $modules = 68; my @kephra_modules; find( sub { return if not -f $_ or $_ !~ /\.pm$/; my $module = $File::Find::name; $module =~ s{lib/}{}; $module =~ s{\.pm}{}; $module =~ s{/}{::}g; return if $module eq 'Kephra::Edit::Search::InputTarget'; push @kephra_modules, $module; }, 'lib'); # print "@modules"; #use Data::Dumper; # diag Dumper \@modules; my $tests = 4 + @required_modules + @kephra_modules; plan tests => $tests; ok( $] >= 5.006, 'Your perl is new enough' ); require_ok($_) for @required_modules, @kephra_modules; cmp_ok( scalar(@kephra_modules), '==', $modules, "$modules Kephra modules found" ); use_ok('Kephra', 'main module compiles'); TODO:{ # check the starter local $TODO = '"todo header"'; # tells what to do #script_compiles_ok('bin/kephra','starter compiles'); } exit(0); kephra-0.4.3.34+dfsg.orig/t/02_config.t0000644000175000017500000000704711573645310016600 0ustar gregoagregoa#!/usr/bin/perl -w # # Test various miscellaneous configurationh functions # BEGIN { $| = 1; push @INC, 'lib'; } use strict; use warnings; use lib 'lib'; use Test::More tests => 17; use Test::NoWarnings; use Test::Exception; #my $tests; # #plan tests => $tests + 1; #use Data::Dumper qw(Dumper); use Wx; use Kephra::Config; # # ##################################################################### # Kephra::Config::color # sub is_color { my ($it, $r, $g, $b, $name) = @_; isa_ok( $it, 'Wx::Colour' ); is( $it->Red, $r, "$name: ->Red ok" ); is( $it->Green, $g, "$name: ->Green ok" ); is( $it->Blue, $b, "$name: ->Blue ok" ); } # SCOPE: { my $black1 = Kephra::Config::color('000000'); my $white1 = Kephra::Config::color('FFFFFF'); my $black2 = Kephra::Config::color('0,0,0'); my $white2 = Kephra::Config::color('255,255,255'); is_color( $black1, 0, 0, 0, 'hex black' ); is_color( $black2, 0, 0, 0, 'dec black' ); is_color( $white1, 255, 255, 255, 'hex white' ); is_color( $white2, 255, 255, 255, 'dec white' ); # # Check errors #eval { #Kephra::Config::color(); #}; #like( $@, qr/Color string is not defined/, 'Caught undef error' ); #eval { #Kephra::Config::color('black'); #}; #like( $@, qr/Unknown color string/, 'Caught bad-string error' ); #BEGIN { $tests += 4*4 + 2; } } ##################################################################### # Kephra::Config::icon_bitmap # sub is_icon { my $it = shift; isa_ok( $it, 'Wx::Bitmap' ); } # #SCOPE: { # Set the default icon path for testing purposes #local $Kephra::config{app}->{iconset_path} = 'share/config/interface/icon/set/jenne'; # # edit_delete find_previous find_next goto_last_edit find_start # #my @known_good = qw{ #}; #foreach my $name ( @known_good ) { # Create using the raw name #my $icon1 = Kephra::Config::icon_bitmap( $name ); #is_icon( $icon1 ); # # Create using the .xpm name #my $icon2 = Kephra::Config::icon_bitmap( $name . '.xpm' ); #is_icon( $icon2 ); #} #} # ##################################################################### # Kephra::Config::File # #{ #require_ok('Kephra::Config::File'); #my $ref = Kephra::Config::File::load_node('share/config/interface/commands.conf', 'commandlist'); #is( ref($ref), 'HASH', 'commandlist is HASH' ); #BEGIN { $tests += 2; } #} # #TODO: { #local $TODO = 'throw exception if file type is incorrect'; #foreach my $file (qw(mainmenuyml ymainmenuyml)) { #throws_ok { Kephra::Config::File::_get_type($file) } 'Kephra::Exception', "invalid extension exception $file" ; #} #BEGIN { $tests += 2; } #} #{ #is( Kephra::Config::File::_get_type('/home/foo/.kephra/config/interface/mainmenu.yml'), 'yaml', 'type is yaml' ); #is( Kephra::Config::File::_get_type('share/config/interface/mainmenu.yml'), 'yaml', 'type is yaml' ); #BEGIN { $tests += 2; } #} # #{ #my $file_name = 'share/config/interface/mainmenu.yml'; #is( Kephra::Config::File::_get_type($file_name), 'yaml', 'type is yaml' ); #my $ref = Kephra::Config::File::load_node($file_name, 'full_menubar'); #is( ref($ref), 'ARRAY', 'full_menubar is ARRAY' ); #$Kephra::temp{path}{config} = 'share/config'; #my $menubar_def = Kephra::Config::File::load_from_node_data ( { #'responsive' => 1, #'file' => 'interface/mainmenu.yml', #'node' => 'full_menubar' #} ); #is( ref($menubar_def), 'ARRAY', 'full_menubar is ARRAY' ); #BEGIN { $tests += 3; } #} exit(0); kephra-0.4.3.34+dfsg.orig/t/04_config_data_tree.t0000644000175000017500000000236111573645310020604 0ustar gregoagregoa#!/usr/bin/perl -w # # testing public methods of Kephra::Config::Tree # BEGIN { chdir '..' if -d '../t'; $| = 1; } use strict; use warnings; use lib 'lib'; use Test::More tests => 7; use Test::NoWarnings; use Kephra::Config::Tree; my $simple = {'a'=>{ 'very' => {'deep' => 'hash'}}}; my $sub = Kephra::Config::Tree::subtree($simple, 'a/very'); is_deeply( $sub, {'deep' => 'hash'}, 'subtree' ); is_deeply( Kephra::Config::Tree::copy($simple), $simple, 'copy' ); my $more = {'a'=>{ 'second' => {'very' => {'deeep' => 'hash'}}}}; my $merge = Kephra::Config::Tree::merge($simple, $more); is_deeply( { 'a'=>{ 'very' => {'deep' => 'hash'}, 'second' => {'very' => {'deeep' => 'hash'}}, },}, $merge, 'merge'); my $simpelmo = {'a'=>{ 'very' => {'deep' => 'trick', 'far' => 'out'}}}; my $update = Kephra::Config::Tree::update($simple, $simpelmo); is_deeply( {'a'=>{'very' => {'deep' => 'trick'}}}, $update, 'update'); my $diff1 = Kephra::Config::Tree::diff($simple, $simpelmo); my $moremo = {'a'=>{'very' => {'deep' => {second => 'trick'}, 'far' => 'out'}}}; my $diff2 = Kephra::Config::Tree::diff($moremo, $simpelmo); is_deeply( $diff1, $simple, 'simple diff'); is_deeply( $diff2, {'a'=>{'very' => {'deep' => {second => 'trick'}}}}, 'complex diff'); exit(0);kephra-0.4.3.34+dfsg.orig/t/03_config_default.t0000644000175000017500000000230411573645310020274 0ustar gregoagregoa#!/usr/bin/perl -w # # # use strict; use warnings; use Test::More tests => 1; use Test::NoWarnings; #my $tests; # #my @files; #my @default_subs; # BEGIN { #if (opendir my $dh, "lib/Kephra/Config/Default/") { #@files = grep {$_ ne '.' and $_ ne '..'} readdir $dh; #} # #@default_subs = qw( #global_settings #commandlist #localisation #mainmenu #contextmenus #toolbars #); } # # TODO: Kephra::Config::Default::drop_xp_style_file # #plan tests => 1 + $tests; # #BEGIN { $tests += 3 * @files; } #foreach my $file (@files) { #my $module = "Kephra::Config::Default::" . substr $file, 0, -3; #require_ok($module); #can_ok($module, 'get'); #my $r = $module->get(); # #my $expected_ref = $file eq 'MainMenu.pm' ? 'ARRAY' : 'HASH'; #is ref($r), $expected_ref, "$file gets a $expected_ref ref"; #} # # #BEGIN { $tests += 1; } #{ #require_ok('Kephra::Config::Default'); #} # #BEGIN { $tests += @default_subs; } #foreach my $sub (@default_subs) { #my $r = Kephra::Config::Default->$sub; #my $expected_ref = $sub eq 'mainmenu' ? 'ARRAY' : 'HASH'; #is ref($r), $expected_ref, "$sub gets a $expected_ref ref"; #} exit(0);kephra-0.4.3.34+dfsg.orig/lib/0000755000175000017500000000000012300715216015130 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra.pm0000644000175000017500000004134112300715176016710 0ustar gregoagregoa# See end of file for docs package Kephra; use 5.006; use strict; use warnings; our $NAME = __PACKAGE__; # name of entire application our $VERSION = '0.4.3.34'; # version of entire app our $PATCHLEVEL; # has just stable versions our $STANDALONE; # starter flag for moveable installations our $LOGLEVEL; # flag for benchmark loggings our $BENCHMARK; # Configuration Phase sub load_modules { # -NI = not implemented or used, -DEP = depreciated require Cwd; require Encode; require Encode::Guess; require File::Find; require File::Spec::Functions; require File::UserConfig; require Config::General; # require YAML::Tiny; require Wx; # Core wxWidgets Framework #Wx->import( ':everything' ); # handy while debugging require Wx::AUI; # movable Panel controler require Wx::STC; # Scintilla editor component require Wx::DND; # Drag'n Drop & Clipboard support (only K::File) require Wx::Locale; # not yet in use require Wx::Perl::ProcessStream; # #require Wx::Print; # Printing Support (used only in Kephra::File ) #require Text::Wrap # for text formating # these will used in near future #require Perl::Tidy; # -NI perl formating #require PPI (); # For refactoring support #require Params::Util (); # Parameter checking #require Class::Inspector (); # Class checking # used internal modules, parts of kephra require Kephra::API; # API for most inter modul communication require Kephra::App; # App start & shut down sequence require Kephra::App::ContextMenu; # contextmenu manager require Kephra::App::EditPanel; # Events, marker, visual settings of the EP require Kephra::App::EditPanel::Indicator; # visual marker inside the edit panel require Kephra::App::EditPanel::Fold; # events and visual stuff of 4 EP marigins require Kephra::App::EditPanel::Margin;# events and visual stuff of 4 EP marigins require Kephra::App::MainToolBar; # toolbar below the main menu require Kephra::App::MenuBar; # main menu require Kephra::App::Panel::CommandLine;# require Kephra::App::Panel::TreeTool; # require Kephra::App::Panel::Notepad; # require Kephra::App::Panel::Output; # require Kephra::App::SearchBar; # Toolbar for searching and navigation require Kephra::App::StatusBar; # require Kephra::App::TabBar; # API 2 Wx::Notebook require Kephra::App::Window; # API 2 Wx::Frame and more require Kephra::CommandList; # require Kephra::Config; # low level config manipulation require Kephra::Config::Default; # build in emergency settings #require Kephra::Config::Default::CommandList; #require Kephra::Config::Default::ContextMenus; #require Kephra::Config::Default::GlobalSettings; #require Kephra::Config::Default::Localisation; #require Kephra::Config::Default::MainMenu; #require Kephra::Config::Default::ToolBars; require Kephra::Config::File; # API 2 ConfigParser: Config::General, YAML require Kephra::Config::Global; # API 4 config, general content level require Kephra::Config::Localisation; # load store change localisation require Kephra::Config::Interface; # loading Interface data menus, bars etc require Kephra::Config::Tree; # data tree manipulation require Kephra::Dialog; # API 2 dialogs, fileselectors, msgboxes #require Kephra::Dialog::Color; # color browsing tool #require Kephra::Dialog::Config; # config dialog #require Kephra::Dialog::Exit; # select files to be saved while exit program #require Kephra::Dialog::Info; # info box #require Kephra::Dialog::Keymap; # -NI #require Kephra::Dialog::Notify # inform about filechanges from outside #require Kephra::Dialog::Search; # find and replace dialog require Kephra::Document; # internal doc handling: create, destroy, etc require Kephra::Document::Change; # calls for changing current doc require Kephra::Document::Data; # manage data structure for all docs require Kephra::Document::Property; # user alterable document settings require Kephra::Document::SyntaxMode; # language specific settings require Kephra::Edit; # basic edit menu funktions require Kephra::Edit::Comment; # comment functions require Kephra::Edit::Convert; # convert functions require Kephra::Edit::Format; # formating functions require Kephra::Edit::History; # undo redo etc. require Kephra::Edit::Goto; # editpanel textcursor navigation require Kephra::Edit::Marker; # doc spanning bookmarks require Kephra::Edit::Search; # search menu functions require Kephra::Edit::Search::InputTarget; # enables darg n drob for comboboxes require Kephra::Edit::Select; # text selection require Kephra::Edit::Special; # collector of unsorted require Kephra::EventTable; # internal app API require Kephra::File; # file menu functions require Kephra::File::History; # list of recent used Files require Kephra::File::IO; # API 2 FS, read write files require Kephra::File::Session; # file session handling require Kephra::Help; # help docs system require Kephra::Macro; # macro recorder, creation, replay require Kephra::Menu; # base menu builder require Kephra::Plugin; # plugin manager require Kephra::Plugin::Demo; # cookbook for plugin authors require Kephra::ToolBar; # toolbar builder base } sub configdir { $_[0] and $_[0] eq $NAME and shift; File::UserConfig->configdir(@_); } sub import { #@_; } sub start { load_modules(); my $basedir; # $ENV{HOME}; # set locations of boot files my $config_sub_dir = 'config'; my $help_sub_dir = 'help'; my $start_file = 'autosaved.conf'; my $boot_file = File::Spec->catfile (Kephra::Config::Global::_sub_dir(), $start_file); my $splashscreen = 'interface/icon/splash/start_kephra.jpg'; if ($Kephra::STANDALONE) { $basedir = Cwd::cwd(); $basedir = File::Spec->catdir($basedir, 'share') if $Kephra::STANDALONE eq 'dev'; } else { my $copy_defaults; $basedir = Kephra::configdir(); if (not -d File::Spec->catdir($basedir, $config_sub_dir)) { $copy_defaults = 1 } else { my $boot_file = File::Spec->catfile( $basedir, $boot_file ); if (-r $boot_file) { my $config_tree = Kephra::Config::File::load($boot_file); $copy_defaults = 1 if not defined $config_tree->{about}{version} or $config_tree->{about}{version} ne $Kephra::VERSION; } } #if ($copy_defaults) { #my $dir = File::UserConfig->new(); #if ($^O =~ /(?:linux|darwin)/i) { #for (@INC) { #if (!-d File::Spec->catdir($_, $dir->dist())) { next; } #$dir->{sharedir_} = $_; #last; #} #File::Find::find( sub { #$dir->{sharedir} = $File::Find::dir #if ($File::Find::dir =~ /$dir->{dist}.+$config_sub_dir$/) #}, $dir->{sharedir_} #); #$dir->{sharedir} =~ s/$config_sub_dir$//; #if (!-d $dir->{configdir}) { mkdir($dir->{configdir}); } #File::Copy::Recursive::dircopy #("$dir->{sharedir}*", $dir->{configdir}) || warn("$!"); #File::Find::find(sub{ #if (-d $_) { chmod(0750,$_) } #elsif (-f $_) { chmod(0640,$_) } #},$dir->{configdir} #); #foreach (sort keys %$dir) {print "$_ : $dir->{$_}\n";} exit; #} #} } my $config_dir = File::Spec->catdir($basedir, $config_sub_dir); Kephra::Config::_dir( $config_dir ); #Kephra::App::splashscreen($splashscreen); #use Wx::Perl::SplashFast ( File::Spec->catfile($config_dir, $splashscreen), 150); Kephra::Config::Global::auto_file( File::Spec->catdir($config_dir, $boot_file) ); Kephra::Help::_dir( File::Spec->catdir($basedir, $help_sub_dir) ); #$Kephra::temp{path}{logger} = File::Spec->catdir($basedir, 'log'); # make .pm config files acessable - absolete when real syntax modes work push @INC, $config_dir; Kephra::App->new->MainLoop; # starter for the main app } 1; __END__ =head1 NAME Kephra - crossplatform GUI-Texteditor along Perl alike Paradigms =head1 SYNOPSIS > kephra [] # start with files already open =head1 DESCRIPTION This module install's a complete editor application with all its configs and documentation for your programming, web and text authoring. =head2 Philosophy =over 3 =item Main Goals A visually harmonic and beautiful, sparing and elegantly programed Editor, that helpes you with all your daily tasks. It should be also able to operate in the way you prefer and be not afraid to try new things. =item In Depth I know, I know, there are plenty text editors out there, even some really mighty IDE, but still no perfect solution for many programmers. So lets =over 2 learn from Perl what it takes to build a tool thats powerful and fun to play with for hours and months. =item * make a low entry barrier (usable like notepad) =item * copy what people like and are used to and whats not inherently broken =item * give choices (TimTowtdi) =over 2 =item * (e.g. deliver vi and emacs input style) =item * usable with menu, contextmenu, bars, mouse combo, key combos, commands ... =item * configure via dialog and yaml/conf files ... =back =item * highly configurable / adaptable to personal preferences =item * beauty / good integration on GUI, code and config level =item * solve things with minimal effort (no bloat / minimal dependencies) =item * still everything extendable by easy to write plugins =back I believe strongly that there is much more possible with GUI editors and text editors in general than we are used today. So I try to weave fresh ideas wherever I can and design Kephra in a way, that every programmer can alter and extend it easily. That can speed up progress or at least makes Kephra more comfortable for you. That is the plan, but we are currently not nearly that far. =item Name Especially from the last item derives the name, which is old egyptian and means something like heart. Because true beauty and a harmonic synchronisation of all parts of the consciousness begins when your heart awakens. Some call that true love. In egypt tradition this was symbolized with a rising sun (ra) and the principle of this was pictured as a scarab beatle with wings. Thats also a nice metaphor for an editor through which we give birth to programs, before they rise on their own. =item Details I believe that Kephra's agenda is very similar to Perl's. Its common wisdom that freedom means not only happiness but also life works most effective in freedom. So there should not only be more than one way to write a program, but also more than one way use an editor. You could: =over 3 =item * select menu items =item * make kombinations of keystrokes =item * point and click your way with the mouse =item * type short edit commands =back =back So the question should not be vi or emacs, but how to combine the different strengths (command input field and optional emacs-like keymap possibilities). Perl was also a combination of popular tools and concepts into a single powerful language. Though I don't want to just adopt what has proven to be mighty. There are a lot of tools (especially in the graphical realm) that are still waiting to be discovered or aren't widely known. In Perl we write and rewrite them faster and much more dense than in C or Java. Some function that help me every day a lot, I written were in very few lines. But many good tools are already on CPAN and Kephra should just be the glue and graphical layer to give you the possibilities of these module to your fingertips in that form you prefer. This helpes also to improve these modules, when they have more users that can give the authors feedback. It motivates the community, when we can use our own tools and the perl ecosystem does not depend on outer software like eclipse, even if it's sometimes useful. Perl's second slogan is "Keep easy things easy and make hard things possible". To me it reads "Don't scare away the beginners and grow as you go". And like Perl I want to handle the complex things with as least effort as possible. From the beginning Kephra was a useful program and will continue so. =head2 Features Beside all the basic stuff that you would expect I listed here some features by category in main menu: =over 2 =item File file sessions, history, simple templates, open all of a dir, insert, autosave by timer, save copy as, rename, close all other, detection if file where changed elsewhere =item Editing unlimited undo with fast modes, replace (clipboard and selection), line edit functions, move line/selection, indenting, block formating, delete trailing space, comment, convert (case, space or indention) rectangular selection with mouse and keyboard, auto- and braceindention =item Navigation bracenav, blocknav, doc spanning bookmarks, goto last edit, last doc, rich search, incremental search, searchbar and search dialog =item Tools run script (integrated output panel), notepad panel, color picker =item Doc Property syntax mode, codepage, tab use, tab width, EOL, write protection =item View all app parts and margins can be switched on and off, syntaxhighlighting bracelight, ight margin, indention guide, caret line, line wrap, EOL marker, visible whitespace, changeable font =item Configs config files to be opened through a menu: settings, all menus, commandID's, event binding, icon binding, key binding, localisation (translate just one file to transelate the app), syntaxmodes and some help texts to be opened as normal files =back =head1 ROADMAP =head2 Overview Enduser Release 0.1 a very simple editor Enduser Release 0.2 multiple documents, file session Enduser Release 0.3 searchbar and more comfort Enduser Release 0.4 This release was about getting the editor liquid or highly configurable. Its also about improvements in the user interface and of course the little things we missed. It also contains interpreter output panel and a notepad. Enduser Release 0.5 This release is about getting Kephra into the 'real' world out there and adding feature that are most needed and removing most hindering barriers. Folding, encodings, printing, .... and lot of minor tools and more help. Enduser Release 0.6 This release will be about extending Kephra internal extensions like a file brwoser, command line and tree lib as Plugin API. Enduser Release 0.7 Introducing Syntaxmodes, for language sensitive data and functionions. Enduser Release 0.8 more heavier stuff like debugger =head2 This Cycle =over 2 =item Testing 0.4.1 - code folding =item Testing 0.4.2 - folding and GUI refined, movable tabs, 2 more tools, doc data =item Testing 0.4.3 - utf, marker, folding finished, 3 more tools, help links =item Testing 0.4.4 - new mouse control, 2 more tools, updated docs =item Testing 0.4.5 - more encodings, local notepad =item Testing 0.4.6 - config dialog =item Stable 0.5 - about dialog =back =head1 SUPPORT Bugs should be reported via the CPAN bug tracker at L For other issues, contact the author. More info and resources you find on our sourceforge web page under: L =head1 ACKNOWLEDGMENTS =over =item * Herbert Breunung Elichtkind@cpan.orgE (main author) =item * Jens Neuwerk (author of icons, GUI advisor) =item * Andreas Kaschner (linux and mac ports) =item * Adam Kennedy Eadamk@cpan.orgE (cpanification) =item * Renee Bäcker Emodule@renee-baecker.deE (color picker) =item * Fabrizio Regalli Efabreg@fabreg.it (typos) =item * many more since we study other editors a lot and also the padre sources =back =head1 COPYRIGHT AND LICENSE This Copyright applies only to the "Kephra" Perl software distribution, not the icons bundled within. Copyright 2004 - 2010 Herbert Breunung. This program is free software; you can redistribute it and/or modify it under the terms of the GNU GPL. The full text of the license can be found in the LICENSE file included with this module. =cut kephra-0.4.3.34+dfsg.orig/lib/Kephra/0000755000175000017500000000000012300715221016336 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/Macro.pm0000644000175000017500000000017211573643454017760 0ustar gregoagregoapackage Kephra::Macro; our $VERSION = '0.00'; use strict; use warnings; sub create_from_cmd_list { return; } 1;kephra-0.4.3.34+dfsg.orig/lib/Kephra/Config.pm0000644000175000017500000001154611573643454020133 0ustar gregoagregoapackage Kephra::Config; our $VERSION = '0.35'; use strict; use warnings; use Cwd(); use File::Spec (); # # Files and Dirs # my $dir; sub _dir { if (defined $_[0]) {$dir = $_[0]} else {$dir} } # Generate a path to a configuration file sub filepath { File::Spec->catfile( $dir, @_ ) if $_[0] } sub existing_filepath { my $path = filepath( @_ ); unless ( -f $path ) { warn("The config file '$path' does not exist"); } return $path; } sub path_from_node { my $node = shift; return unless defined $node and ref $node eq 'HASH'; if (exists $node->{file}){ if (exists $node->{directory}){ return filepath($node->{directory}, $node->{file}); } else { return filepath($node->{file}); } } else { warn "Wrong node to build config path from." } } sub dirpath { File::Spec->catdir( $dir, @_ ) } sub existing_dirpath { my $path = dirpath( @_ ); unless ( -d $path ) { warn("The config directory '$path' does not exist"); } return $path; } sub standartize_path_slashes { File::Spec->canonpath( shift ) } sub path_matches { my $given = shift; return unless defined $given and $given and @_; for my $path (@_) { return 1 if defined $path and index (standartize_path_slashes($path), $given) > -1; } return 0; } sub open_file { open_file_absolute( filepath(@_) ) } sub open_file_absolute { Kephra::Document::add( $_[0] ); Kephra::Document::Data::set_attribute('config_file',1); Kephra::App::TabBar::refresh_current_label(); } # # Wx GUI Stuff # # Create a Wx::Colour from a config string # Either hex "0066FF" or decimal "0,128,255" is allowed. sub color { my $string = shift; return Kephra::App::warn("Color string is not defined") unless defined $string; # Handle hex format $string = lc $string; if ( $string =~ /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i ) { return Wx::Colour->new( hex $1, hex $2, hex $3 ); } # Handle comma-seperated if ( $string =~ /^(\d+),(\d+),(\d+)$/ ) { return Wx::Colour->new( $1 + 0, $2 + 0, $3 + 0 ); } # Unknown die "Unknown color string '$string'"; } # Create an icon bitmap Wx::Bitmap for a named icon sub icon_bitmap { # Find the path from the name my $name = shift; unless ( defined $name ) { warn "Did not provide an icon name to icon_bitmap"; return; } $name .= '.xpm' unless $name =~ /\.xpm$/ ; my $path = filepath( Kephra::API::settings()->{app}{iconset_path}, $name ); return Wx::Bitmap->new(16,16) unless -e $path; my $bitmap = Wx::Bitmap->new( $path, &Wx::wxBITMAP_TYPE_ANY ); unless ( $bitmap ) { warn "Failed to create bit map from $path"; return; } return $bitmap; } sub set_xp_style { my $xp_def_file = "$^X.manifest"; if ( $^O eq 'MSWin32' ) { if ( ( Kephra::API::settings()->{app}{xp_style} eq '1' ) and ( !-r $xp_def_file ) ) { Kephra::Config::Default::drop_xp_style_file($xp_def_file); } if ( ( Kephra::API::settings()->{app}{xp_style} eq '0' ) and ( -r $xp_def_file ) ) { unlink $xp_def_file; } } } # # misc helper stuff # sub build_fileendings2syntaxstyle_map { foreach ( keys %{ Kephra::API::settings()->{file}{endings} } ) { my $language_id = $_; my @fileendings = split( /\s+/, Kephra::API::settings()->{file}{endings}{$language_id} ); foreach ( @fileendings ) { $Kephra::temp{file}{end2langmap}{$_} = $language_id; } } } sub build_fileendings_filterstring { my $l18n = Kephra::Config::Localisation::strings()->{dialog}; my $files = $l18n->{file}{files}; my $all = $l18n->{general}{all} . " $files "; $all .= $^O =~ /win/i ? "(*.*)|*.*" : "(*)|*"; my $tfile = $Kephra::temp{file}; $tfile->{filterstring}{all} = $all; my $conf = Kephra::API::settings()->{file}; foreach ( keys %{$conf->{group}} ) { my ( $filter_id, $file_filter ) = ( $_, '' ); my $filter_name = ucfirst($filter_id); my @language_ids = split( /\s+/, $conf->{group}{$filter_id} ); foreach ( @language_ids ) { my @fileendings = split( /\s+/, $conf->{endings}{$_} ); foreach (@fileendings) { $file_filter .= "*.$_;"; } } chop($file_filter); $tfile->{filterstring}{all} .= "|$filter_name $files ($file_filter)|$file_filter"; } $tfile->{filterstring}{config} = "Config $files (*.conf;*.yaml)|*.conf;*.yaml|$all"; $tfile->{filterstring}{scite} = "Scite $files (*.ses)|*.ses|$all"; } sub _map2hash { my ( $style, $types_str ) = @_; my $stylemap = {}; # holds the style map my @types = split( /\s+/, $types_str ); foreach (@types) { $$stylemap{$_} = $style; } return ($stylemap); } sub _lc_utf { my $uc = shift; my $lc = ""; for ( 0 .. length($uc) - 1 ) { $lc .= lcfirst( substr( $uc, $_, 1 ) ); } $lc; } #pce:dialog::msg_box(undef,$mode,''); #Wx::wxUNICODE() 1; =head1 NAME Kephra::Config - low level config stuff and basics =head1 DESCRIPTION =cutkephra-0.4.3.34+dfsg.orig/lib/Kephra/CommandList.pm0000644000175000017500000001672411573643454021143 0ustar gregoagregoapackage Kephra::CommandList; our $VERSION = '0.15'; use strict; use warnings; use YAML::Tiny(); my %list; # the real commandlist my @keymap; # maps numerical key code to cmd call ref sub data { if (ref $_[0] eq 'HASH') { %list = %{$_[0]} } else { \%list } } sub clear { %list = () } sub file { Kephra::Config::filepath( _config()->{file}) } sub _config{ Kephra::API::settings()->{app}{commandlist} } #sub load_cache { %list = %{ YAML::Tiny::LoadFile( $_[0] ) }} #sub store_cache { YAML::Tiny::DumpFile( \%list ) } # @hash1{keys %hash2} = values %hash2; # refactor commandlist definition & localisation data into a format that can be # evaled and used by gui parts sub load { my $cmd_list_def = Kephra::Config::File::load_from_node_data( _config() ); $cmd_list_def = Kephra::Config::Default::commandlist() unless $cmd_list_def; assemble_data($cmd_list_def); } sub assemble_data { my $cmd_list_def = shift; no strict; local ($leaf_type, $cmd_id, $target_leafe); # copy data of a hash structures into specified commandlist leafes for my $key ( qw{call enable enable_event state state_event key icon} ) { _copy_values_of_nested_list($cmd_list_def->{$key}, $key); } my $l18n = Kephra::Config::Localisation::strings(); _copy_values_of_nested_list($l18n->{commandlist}{label},'label'); _copy_values_of_nested_list($l18n->{commandlist}{help}, 'help'); numify_key_code( keys %list ); undef $leaf_type; undef $cmd_id; undef $target_leafe; } sub eval_data { eval_cmd_data( keys %list ) } sub _copy_values_of_nested_list { my $root_node = shift; # source no strict; $target_leafe = shift; _parse_and_copy_node($root_node, '') if ref $root_node eq 'HASH'; } sub _parse_and_copy_node { my ($parent_node, $parent_id) = @_; no strict; for ( keys %$parent_node ){ $cmd_id = $parent_id . $_; $leaf_type = ref $parent_node->{$_}; if (not $leaf_type) { $list{$cmd_id}{$target_leafe} = $parent_node->{$_} if $parent_node->{$_}; } elsif ($leaf_type eq 'HASH'){ _parse_and_copy_node($parent_node->{$_}, $cmd_id . '-') } } } sub numify_key_code { my @cmd = @_; my ($item_data, $rest, $kcode, $kname, $i, $char); #rawdata, keycode my $k18n = Kephra::Config::Localisation::strings()->{key}; my $shift = $k18n->{meta}{shift}. '+'; my $alt = $k18n->{meta}{alt} . '+'; my $ctrl = $k18n->{meta}{ctrl} . '+'; my %keycode_map = ( back => &Wx::WXK_BACK, tab => &Wx::WXK_TAB, enter => &Wx::WXK_RETURN, esc => &Wx::WXK_ESCAPE, space => &Wx::WXK_SPACE, plus => 43, minus => 45, sharp => 47, tilde => 92, del=> &Wx::WXK_DELETE, ins => &Wx::WXK_INSERT, pgup => &Wx::WXK_PAGEUP, pgdn => &Wx::WXK_PAGEDOWN, home => &Wx::WXK_HOME, end => &Wx::WXK_END, left => &Wx::WXK_LEFT, up => &Wx::WXK_UP, right => &Wx::WXK_RIGHT, down => &Wx::WXK_DOWN, f1 => &Wx::WXK_F1, f2 => &Wx::WXK_F2, f3 => &Wx::WXK_F3, f4 => &Wx::WXK_F4, f5 => &Wx::WXK_F5, f6 => &Wx::WXK_F6, f7 => &Wx::WXK_F7, f8 => &Wx::WXK_F8, f9 => &Wx::WXK_F9,f10 => &Wx::WXK_F10,f11 => &Wx::WXK_F11,f12 => &Wx::WXK_F12, numpad_enter => &Wx::WXK_NUMPAD_ENTER ); for (@cmd){ $item_data = $list{$_}; next unless exists $item_data->{key}; $rest = $item_data->{key}; $kname = ''; $kcode = 0; while (){ $i = index $rest, '+'; last unless $i > 0; $char = lc substr $rest, 0, 1; if ($char eq 's') {$kname .= $shift; $kcode += 1000} elsif ($char eq 'c') {$kname .= $ctrl; $kcode += 2000} elsif ($char eq 'a') {$kname .= $alt; $kcode += 4000} $rest = substr $rest, $i + 1; } $kname .= exists $k18n->{$rest} ? $k18n->{$rest} : ucfirst $rest; $item_data->{key} = $kname; $kcode += length($rest) == 1 ? ord uc $rest : $keycode_map{$rest}; $item_data->{keycode} = $kcode; } } sub eval_cmd_data { my @cmd = @_; my ($item_data, $ico_path); for (@cmd){ my $item_data = $list{$_}; $item_data->{sub} = $item_data->{call}; $item_data->{sub} =~ tr/()&;/ /d if $item_data->{sub}; for my $node_type (qw(call state enable)) { $item_data->{$node_type} = eval 'sub {'.$item_data->{$node_type}.'}' if $item_data->{$node_type}; } if ($item_data->{call} and $item_data->{key}){ $keymap[$item_data->{keycode}] = $item_data->{call}; } next unless $item_data->{icon}; $item_data->{icon} = Kephra::Config::icon_bitmap($item_data->{icon}); } } # # external API - getting cmd date, manipulating content # sub new_cmd { replace_cmd(@_) unless exists $list{ $_[0] } } sub new_cmd_list { for (@_) { #new_cmd(); } } sub replace_cmd { my ($cmd_id, $properties) = @_; return unless ref $properties eq 'HASH'; # if node exist, copy juste assigned values if ( exists $list{$cmd_id}) { $list{$cmd_id}{$_} = $properties->{$_} for keys %$properties; } else { $list{$cmd_id} = $properties } numify_key_code($cmd_id); eval_cmd_data($cmd_id); } sub del_cmd { delete @list{$_[0]} } sub rename_cmd { my ($old_ID, $new_ID) = @_; return unless $new_ID and ref $list{$old_ID} eq 'HASH'; $list{$new_ID} = $list{$old_ID}; del_cmd($old_ID); } sub get_cmd_property { # explicit value of one command my $cmd_id = shift; my $leafe = shift; $list{$cmd_id}{$leafe} if ref $list{$cmd_id} eq 'HASH' and exists $list{$cmd_id}{$leafe}; } sub get_cmd_properties { # all values of one command my $cmd_id = shift; $list{$cmd_id} if ref $list{$cmd_id} eq 'HASH'; } sub get_property_list { # values of same type from different commands my $property = shift; my @result; for (@_) { push @result, $list{$_}{$property} if exists $list{$_}{$property} } return @result; } sub run_cmd_by_id { my $cmd_id = shift; $list{$cmd_id}{call}() if ref $list{$cmd_id}{call} eq 'CODE'; } sub run_cmd_by_keycode { my $keycode = shift; if (ref $keymap[$keycode] eq 'CODE'){ $keymap[$keycode](); return 1; } return 0; } sub del_temp_data{ my $l18n = Kephra::Config::Localisation::strings(); delete $l18n->{commandlist} if exists $l18n->{commandlist}; #delete $Kephra::localisation{key} # if exists $l18n->{key}; } =head1 NAME Kephra::API::CommandList - external API for user callable functions =head1 DESCRIPTION The CommandList is a dynamically changeable list, that contains all the function calls for every menu item, toolbar button and most other widget items. It holds also label, help text, key binding, icon and more for each command. All these properties have to be changed globally here in a clean way. These commands where used by different gui elements, that allows menu and toolbar definitions to be very compact, readable and and easy changeable. Names of commands contain dashes as separator of namespaces. =head1 SPECIFICATION CommandlistItem =over 4 =item * ID - unique identifier, hashkey, following hash is its value =item * call - CODEREF : actual action, performed when this command is called =item * sub - string : name of the called routine =item * enable - CODEREF : returns enable status (0 for disable) =item * enable_event - string : API::EventTable ID when to check to en/disable =item * state - CODEREF : that returns state value (for switches) =item * state_event - string : API::EventTable ID when to check is state changed =item * label - string : descriptive name =item * help - string : short help sentence =item * key - string : label of key binding =item * keycode - numeric keycode =item * icon - Wx::Bitmap =back =cut 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/ToolBar.pm0000644000175000017500000001000311774655572020262 0ustar gregoagregoapackage Kephra::ToolBar; our $VERSION = '0.08'; use strict; use warnings; my %toolbar; sub _all { \%toolbar } sub _ref { if (ref $_[1] eq 'Wx::ToolBar') {$toolbar{$_[0]}{ref} = $_[1]} elsif(exists $toolbar{$_[0]}{ref}) {$toolbar{$_[0]}{ref}} } sub _data { $toolbar{$_[0]} if stored($_[0]) } sub stored { 1 if ref $toolbar{$_[0]} eq 'HASH'} sub _create_empty { Wx::ToolBar->new( Kephra::App::Window::_ref(), -1, [-1,-1], [-1,-1], &Wx::wxTB_HORIZONTAL|&Wx::wxTB_DOCKABLE ); } sub create_new { my $bar_id = shift; my $bar_def = shift; my $bar = _ref($bar_id); # destroy old safely when overwrite $bar->Destroy if defined $bar and $bar; _ref ($bar_id, _create_empty()); create($bar_id, $bar_def); } sub create { my $bar_id = shift; my $bar_def = shift; eval_data($bar_id, assemble_data_from_def($bar_def)); } sub assemble_data_from_def { my $bar_def = shift; return unless ref $bar_def eq 'ARRAY'; my @tbds = (); # toolbar data structure my $cmd_data; # for my $item_def (@$bar_def){ # undef means null string $item_def = '' unless defined $item_def; my %item; # skipping commented lines next if substr($item_def, -1) eq '#'; # recursive call for submenus if (ref $item_def eq 'HASH'){} # "parsing" item data ($item{type}, $item{id}, $item{size}) = split / /, $item_def; # skip separators if (not defined $item{type} or $item{type} eq 'separator'){ $item{type} = ''; # handle regular toolbar buttons } elsif( substr( $item{type}, -4) eq 'item' ) { $cmd_data = Kephra::CommandList::get_cmd_properties( $item{id} ); # skipping when command call is missing next unless ref $cmd_data and exists $cmd_data->{call}; for ('call','enable','enable_event','state', 'state_event','label', 'help','icon'){ $item{$_} = $cmd_data->{$_} if $cmd_data->{$_} } #$item{type} = 'item'if not $cmd_data->{state} and $item{type} eq 'checkitem'; } push @tbds, \%item; } return \@tbds; } sub eval_data { my $bar_id = shift; my $bar_data = shift; my $bar = _ref($bar_id); return $bar unless ref $bar_data eq 'ARRAY'; my $win = Kephra::App::Window::_ref(); my $item_kind; my @rest_items = (); my $bar_item_id = defined $toolbar{$bar_id}{item_id} ? $toolbar{$bar_id}{item_id} : $Kephra::app{GUI}{masterID}++ * 100; $toolbar{$bar_id}{item_id} = $bar_item_id; my $respond = Kephra::API::settings()->{app}{toolbar}{responsive}; for my $item_data (@$bar_data){ if (not $item_data->{type} or $item_data->{type} eq 'separator'){ $bar->AddSeparator; } elsif (ref $item_data->{icon} eq 'Wx::Bitmap'){ if ($item_data->{type} eq 'checkitem'){ $item_kind = &Wx::wxITEM_CHECK } elsif ($item_data->{type} eq 'item'){ $item_kind = &Wx::wxITEM_NORMAL } else { next } my $item_id = $bar_item_id++; my $tool = $bar->AddTool( $item_id, '', $item_data->{icon}, &Wx::wxNullBitmap, $item_kind, $item_data->{label}, $item_data->{help} ); Wx::Event::EVT_TOOL ($win, $item_id, $item_data->{call}); if (ref $item_data->{enable} eq 'CODE' and $respond){ $tool->Enable( $item_data->{enable}() ); for my $event (split /,/, $item_data->{enable_event}){ Kephra::EventTable::add_call ( $event, $bar_id.'_tool_enable_'.$item_id, sub{ $bar->EnableTool( $item_id, $item_data->{enable}() ) }, $bar_id); } } if (ref $item_data->{state} eq 'CODE' and $item_data->{type} eq 'checkitem'){ $bar->ToggleTool( $item_id, $item_data->{state}() ); for my $event (split /,/, $item_data->{state_event}){ Kephra::EventTable::add_call ( $event, , $bar_id.'_tool_state_'.$item_id, sub{ $bar->ToggleTool( $item_id, $item_data->{state}() ) }, $bar_id ); } } } else { $item_data->{pos} = $bar_item_id % 100 + @rest_items; push @rest_items, $item_data; } } $bar->Realize; $bar->SetRows(1); _ref($bar_id, $bar); return \@rest_items; } sub destroy { my $bar_ID = shift; my $bar = _ref( $bar_ID ); return unless $bar; $bar->Destroy; Kephra::EventTable::del_own_subscriptions( $bar_ID ); } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Dialog/0000755000175000017500000000000012300715232017537 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/Dialog/Config.pm0000644000175000017500000000741611573643437021334 0ustar gregoagregoapackage Kephra::Dialog::Config; our $VERSION = '0.18'; use strict; use warnings; my $dialog; sub _ref { $dialog = ref $_[0] eq 'Wx::Dialog' ? $_[0] : $dialog } sub main { if ( !$Kephra::temp{dialog}{config}{active} or $Kephra::temp{dialog}{config}{active} == 0 ) { # init search and replace dialog $Kephra::temp{dialog}{config}{active} = 1; my $frame = Kephra::App::Window::_ref(); my $config = Kephra::API::settings()->{dialog}{config}; my $l18n = Kephra::Config::Localisation::strings(); my $d_l10n = $l18n->{dialog}{config}; my $g_l10n = $l18n->{dialog}{general}; my $m_l10n = $l18n->{app}{menu}; my $cl_l10n = $l18n->{commandlist}{label}; my $d_style= &Wx::wxNO_FULL_REPAINT_ON_RESIZE | &Wx::wxSYSTEM_MENU | &Wx::wxCAPTION | &Wx::wxMINIMIZE_BOX | &Wx::wxCLOSE_BOX; #$d_style |= &Wx::wxSTAY_ON_TOP if Kephra::API::settings()->{app}{window}{stay_on_top}; # my $staticbox = Wx::StaticBox->new( $panel, -1, 'Wx::StaticBox' ); # my $button = Wx::Button->new( $panel, -1, 'Button 3' ); # my $nsz = Wx::StaticBoxSizer->new( $staticbox, &Wx::wxVERTICAL); # $panel->SetSizer($nsz); # $nsz->Add( $button, 0, &Wx::wxGROW|&Wx::wxTOP, 5 ); # making window & main design my $d = Wx::Dialog->new( $frame, -1, ' '.$d_l10n->{title}, [ $config->{position_x}, $config->{position_y} ], [ 470, 560 ], $d_style); my $icon_bmp = Kephra::CommandList::get_cmd_property ('view-dialog-config', 'icon'); my $icon = Wx::Icon->new; $icon->CopyFromBitmap($icon_bmp) if ref $icon_bmp eq 'Wx::Bitmap'; $d->SetIcon($icon); _ref($d); # main panel #my $mainpanel = Wx::Panel->new( $d, -1, [-1,-1], [-1,-1] ); # tree of categories my $cfg_tree = Wx::Treebook->new( $d, -1, [-1,-1], [-1,-1], &Wx::wxBK_LEFT); my ($panel); # general settings my $pg = $panel->{general} = Wx::Panel->new( $cfg_tree ); $pg->{save} = Wx::StaticText->new( $pg, -1, 'Speichern'); $pg->{sizer} = Wx::BoxSizer->new(&Wx::wxVERTICAL); $pg->{sizer}->Add( $pg->{save} , 0, &Wx::wxLEFT, 5 ); $pg->SetSizer( $pg->{sizer} ); $cfg_tree->AddPage( $panel->{general}, 'General', 1); $panel->{Interface} = $cfg_tree->AddPage( undef, 'Interface', 1); $panel->{file} = $cfg_tree->AddPage( undef, 'File', 1); $cfg_tree->AddSubPage( undef, 'Defaults', 1); $cfg_tree->AddSubPage( undef, 'Save', 1); $cfg_tree->AddSubPage( undef, 'Endings', 1); $cfg_tree->AddSubPage( undef, 'Session', 1); $cfg_tree->AddPage( undef, 'Editpanel', 1); # button line $d->{apply_button} = Wx::Button->new ( $d, -1, $g_l10n->{apply} ); $d->{cancel_button} = Wx::Button->new( $d, -1, $g_l10n->{cancel}); Wx::Event::EVT_BUTTON( $d, $d->{apply_button}, sub {shift->Close} ); Wx::Event::EVT_BUTTON( $d, $d->{cancel_button},sub {shift->Close} ); my $button_sizer = Wx::BoxSizer->new(&Wx::wxHORIZONTAL); $button_sizer->Add( $d->{apply_button}, 0, &Wx::wxRIGHT, 14 ); $button_sizer->Add( $d->{cancel_button}, 0, &Wx::wxRIGHT, 22 ); # assembling lines my $d_sizer = Wx::BoxSizer->new(&Wx::wxVERTICAL); $d_sizer->Add( $cfg_tree, 1, &Wx::wxEXPAND|&Wx::wxALL, 14); $d_sizer->Add( $button_sizer, 0, &Wx::wxBOTTOM|&Wx::wxALIGN_RIGHT, 12); # release $d->SetSizer($d_sizer); $d->SetAutoLayout(1); $d->Show(1); Wx::Window::SetFocus( $d->{cancel_button} ); Wx::Event::EVT_CLOSE( $d, \&quit_config_dialog ); } else { my $d = _ref(); $d->Iconize(0); $d->Raise; } } # helper sub td { Wx::TreeItemData->new( $_[0] ) } sub quit_config_dialog { my ( $win, $event ) = @_; my $cfg = Kephra::API::settings()->{dialog}{config}; if ( $cfg->{save_position} == 1 ) { ( $cfg->{position_x}, $cfg->{position_y} ) = $win->GetPositionXY; } $Kephra::temp{dialog}{config}{active} = 0; $win->Destroy; } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Dialog/Notify.pm0000644000175000017500000001023711573643437021372 0ustar gregoagregoapackage Kephra::Dialog::Notify; our $VERSION = '0.06'; use strict; use warnings; our $dialog; sub file_changed { my $file_nr = shift;#Kephra::Document::Data::current_nr(); my $file_path = Kephra::Document::Data::get_attribute('file_path', $file_nr); my $file_name = Kephra::Document::Data::get_attribute('name', $file_nr); my $d10n = Kephra::Config::Localisation::strings()->{dialog}; my $g10n = $d10n->{general}; #$Kephra::app{dialog}{notify}{changed} $dialog = create_raw_dialog(3); $dialog->SetTitle($file_name . ' ' . $g10n->{changed}); $dialog->{msg}->SetLabel( $d10n->{file}{file_changed_msg} ); $dialog->{filename}->SetValue($file_path); $dialog->{btn}{1}->SetLabel( $g10n->{reload}); $dialog->{btn}{2}->SetLabel( $g10n->{save_reload} ); $dialog->{btn}{3}->SetLabel( $g10n->{ignore} ); Wx::Event::EVT_BUTTON($dialog, $dialog->{btn}{1}, sub { quit_dialog(); Kephra::File::reload_current(); } ); Wx::Event::EVT_BUTTON($dialog, $dialog->{btn}{2}, sub { quit_dialog(); Kephra::File::save_copy_as(); Kephra::File::reload_current() } ); Wx::Event::EVT_BUTTON($dialog, $dialog->{btn}{3}, sub { quit_dialog(); } ); #Kephra::Document::Data::get_attribute('did_notify', 'ignore', $file_nr); ready_dialog($dialog); } sub file_deleted { my $file_nr = shift;#Kephra::Document::current_nr(); my $file_path = Kephra::Document::Data::get_attribute('file_path', $file_nr); my $file_name = Kephra::Document::Data::get_attribute('name', $file_nr); my $d10n = Kephra::Config::Localisation::strings()->{dialog}; my $g10n = $d10n->{general}; # $Kephra::app{dialog}{notify}{deleted} $dialog = create_raw_dialog(4); $dialog->{msg}->SetLabel( $d10n->{file}{file_deleted_msg} ); $dialog->{btn}{1}->SetLabel( $g10n->{close}); $dialog->{btn}{2}->SetLabel( $d10n->{file}{save_as} ); $dialog->{btn}{3}->SetLabel( $g10n->{save} ); $dialog->{btn}{4}->SetLabel( $g10n->{ignore} ); Wx::Event::EVT_BUTTON($dialog, $dialog->{btn}{1}, sub { quit_dialog(); Kephra::File::close_current_unsaved() } ); Wx::Event::EVT_BUTTON($dialog, $dialog->{btn}{2}, sub { quit_dialog(); Kephra::File::save_as() } ); Wx::Event::EVT_BUTTON($dialog, $dialog->{btn}{3}, sub { quit_dialog(); Kephra::File::save_current() } ); $dialog->SetTitle($file_name . ' ' . $g10n->{deleted}); $dialog->{filename}->SetValue($file_path); Wx::Event::EVT_BUTTON($dialog, $dialog->{btn}{4}, sub { quit_dialog(); Kephra::Document::Data::set_attribute('did_notify', 'ignore', $file_nr); } ); ready_dialog($dialog); } sub create_raw_dialog { my $btn_count = shift || 3; my $dialog = Wx::Dialog->new( Kephra::App::Window::_ref(), -1, '', [-1,-1], [361, 145], &Wx::wxNO_FULL_REPAINT_ON_RESIZE | &Wx::wxSTAY_ON_TOP | &Wx::wxSYSTEM_MENU | &Wx::wxCAPTION | &Wx::wxCLOSE_BOX , ); Kephra::App::Window::load_icon ($dialog, Kephra::Config::filepath (Kephra::API::settings()->{app}{window}{icon})); #$dialog->SetBackgroundColour(&Wx::wxWHITE); Wx::Event::EVT_CLOSE( $dialog, \&quit_dialog ); # starting dialog layout my $h_sizer = Wx::BoxSizer->new(&Wx::wxHORIZONTAL); $dialog->{btn}{1} = Wx::Button->new( $dialog, -1, '' ); $h_sizer->Add( $dialog->{btn}{1} ,0, &Wx::wxLEFT, 0); for my $btn_nr (2 .. $btn_count) { $dialog->{btn}{$btn_nr} = Wx::Button->new( $dialog, -1, '' ); $h_sizer->Add( $dialog->{btn}{$btn_nr} ,0, &Wx::wxLEFT, 10); } $dialog->{msg} = Wx::StaticText->new($dialog, -1, ''); $dialog->{filename} = Wx::TextCtrl->new ( $dialog,-1, '', [-1,-1], [-1,-1], &Wx::wxTE_READONLY | &Wx::wxTE_CENTRE ); my $v_sizer = Wx::BoxSizer->new(&Wx::wxVERTICAL); $v_sizer->Add( $dialog->{msg} ,1, &Wx::wxCENTER | &Wx::wxTOP , 10 ); $v_sizer->Add( $dialog->{filename},0, &Wx::wxCENTER | &Wx::wxBOTTOM | &Wx::wxGROW, 10 ); $v_sizer->Add( $h_sizer ,0, &Wx::wxALL | &Wx::wxALIGN_CENTER_HORIZONTAL, 10 ); $dialog->SetSizer($v_sizer); return $dialog; } sub ready_dialog { $dialog = shift; $dialog->SetAutoLayout(1); $dialog->CenterOnScreen; $dialog->ShowModal; #$v_sizer->Fit($dialog); } sub quit_dialog { my ( $win, $event ) = @_; $dialog->Destroy(); } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Dialog/Info.pm0000644000175000017500000000346311640236402021001 0ustar gregoagregoapackage Kephra::Dialog::Info; our $VERSION = '0.08'; use strict; use warnings; sub combined { return simple(); my $info_win = Wx::Frame->new( Kephra::App::Window::_ref(), -1, " Info About Kephra", [ 100, 100 ], [ 460, 260 ], &Wx::wxSYSTEM_MENU | &Wx::wxCAPTION | &Wx::wxMINIMIZE_BOX | &Wx::wxCLOSE_BOX, ); Kephra::App::Window::load_icon( $info_win, Kephra::API::settings()->{app}{window}{icon} ); $info_win->SetBackgroundColour( Wx::Colour->new( 0xed, 0xeb, 0xdb ) ); # Wx::HyperlinkCtrl->new($win,-1,label,url,pos,size,wxHL_CONTEXTMENU) $info_win->Centre(&Wx::wxBOTH); $info_win->Show(1); } sub simple { my $info = Kephra::Config::Localisation::strings()->{dialog}{info}; my $sciv = 'Scintilla '; my $v = substr(&Wx::wxVERSION_STRING ,-5); if ($v eq '2.4.2'){$sciv .= '1.54'} elsif ($v eq '2.6.2'){$sciv .= '1.62'} elsif ($v eq '2.6.3'){$sciv .= '1.62'} elsif ($v eq '2.8.4'){$sciv .= '1.70'} elsif ($v eq '2.8.7'){$sciv .= '1.70'} elsif ($v eq '2.8.10'){$sciv .= '1.70'} my $content = "Kephra, $info->{motto}\n" . $info->{mady_by} . " Herbert Breunung\n\n" . $info->{licensed} . " GPL (GNU Public License) \n" . " ( $info->{detail} \n $info->{more} ) \n" . "$info->{homepage} http://kephra.sf.net\n\n" . $info->{contains} . ": \n" . " - Perl ". substr($],0,1).'.'.int(substr($],3,2)).'.'.substr($],7,1)."\n" . " - WxPerl $Wx::VERSION $info->{wrappes} \n" . " - " . &Wx::wxVERSION_STRING . " $info->{and} $sciv\n" . " - Config::General $Config::General::VERSION \n" . " - YAML::Tiny $YAML::Tiny::VERSION \n" ."\n\n $info->{dedication}" . ""; my $title = "$info->{title} $Kephra::NAME $Kephra::VERSION"; $title .= ' pl ' . $Kephra::PATCHLEVEL if $Kephra::PATCHLEVEL; Kephra::Dialog::msg_box( $content, $title ); } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Dialog/Search.pm0000644000175000017500000004404211573643437021330 0ustar gregoagregoapackage Kephra::Dialog::Search; our $VERSION = '0.27'; use strict; use warnings; sub _ID { 'search_dialog' } my $ref; sub _ref { $ref = ref $_[0] eq 'Wx::Dialog' ? $_[0] : $ref } my $highlight_search; # set 1 if searchbar turns red my $active; my %color = ( norm_fore => Wx::Colour->new( 0x00, 0x00, 0x55 ), norm_back => Wx::Colour->new( 0xff, 0xff, 0xff ), alert_fore => Wx::Colour->new( 0xff, 0x33, 0x33 ), alert_back => Wx::Colour->new( 0xff, 0xff, 0xff ), ); sub find { # call as find dialog my $d = ready(); my $selection = Kephra::App::EditPanel::_ref()->GetSelectedText; if ($selection and not $d->{selection_radio}->GetValue ) { Kephra::Edit::Search::set_find_item( $selection ); $d->{find_input}->SetValue( $selection ); } else {$d->{find_input}->SetValue( Kephra::Edit::Search::get_find_item())} $d->{replace_input}->SetValue( Kephra::Edit::Search::get_replace_item() ); Wx::Window::SetFocus( $d->{find_input} ); } sub replace { # call as replace dialog my $d = ready(); my $selection = Kephra::App::EditPanel::_ref()->GetSelectedText; if ( length $selection > 0 and not $d->{selection_radio}->GetValue ) { Kephra::Edit::Search::set_replace_item( $selection ); $d->{replace_input}->SetValue( $selection ); } else { $d->{replace_input}->SetValue(Kephra::Edit::Search::get_replace_item()); } $d->{find_input}->SetValue( $selection ); Wx::Window::SetFocus( $d->{replace_input} ); } sub ready { # display find and replace dialog if ( not $active ) { # prepare some internal var and for better handling my $edit_panel = Kephra::App::EditPanel::_ref(); my $attr = Kephra::Edit::Search::_attributes(); my $dsettings = Kephra::API::settings()->{dialog}{search}; my $l18n = Kephra::API::localisation(); my $label = $l18n->{dialog}{search}{label}; my $hint = $l18n->{dialog}{search}{hint}; my @find_history = (); my @replace_history = (); my $d_style = &Wx::wxNO_FULL_REPAINT_ON_RESIZE | &Wx::wxSYSTEM_MENU | &Wx::wxCAPTION | &Wx::wxMINIMIZE_BOX | &Wx::wxCLOSE_BOX; $d_style |= &Wx::wxSTAY_ON_TOP if $Kephra::config{app}{window}{stay_on_top}; $dsettings->{position_x} = 10 if $dsettings->{position_x} < 0; $dsettings->{position_y} = 10 if $dsettings->{position_y} < 0; $dsettings->{width} = Wx::wxMSW() ? 436 : 496; if ( Kephra::Edit::Search::_history()->{use} ) { @find_history = @{ Kephra::Edit::Search::get_find_history() }; @replace_history = @{ Kephra::Edit::Search::get_replace_history() }; } # init search and replace dialog and release Kephra::Edit::Search::_refresh_search_flags(); $active = 1; $Kephra::temp{dialog}{active}++; $highlight_search = 1; # make dialog window and main panel my $d = Wx::Dialog->new( Kephra::App::Window::_ref(), -1, $l18n->{dialog}{search}{title}, [ $dsettings->{position_x}, $dsettings->{position_y} ], [ -1 , 268 ], $d_style ); my $icon = Wx::Icon->new; my $icon_bmp = Kephra::CommandList::get_cmd_property ('view-dialog-find', 'icon'); $icon->CopyFromBitmap($icon_bmp) if ref $icon_bmp eq 'Wx::Bitmap'; $d->SetIcon($icon); $d->SetTransparent(1 - int ($dsettings->{transparency} * 255)) if defined $dsettings->{transparency}; _ref($d); # input boxes with labels $d->{find_label} = Wx::StaticText->new($d, -1, $label->{search_for} ); $d->{replace_label}= Wx::StaticText->new($d, -1, $label->{replace_with} ); $d->{find_input} = Wx::ComboBox->new ($d, -1,'', [-1,-1], [334,-1], [@find_history], &Wx::wxTE_PROCESS_ENTER ); $d->{find_input}->SetDropTarget ( Kephra::Edit::Search::InputTarget->new($d->{find_input}, 'find')); $d->{replace_input} = Wx::ComboBox->new ($d, -1, '', [-1,-1], [334,-1], [@replace_history], &Wx::wxTE_PROCESS_ENTER); $d->{replace_input}->SetDropTarget ( Kephra::Edit::Search::InputTarget->new($d->{replace_input}, 'replace')); $d->{sep_line} = Wx::StaticLine->new( $d, -1, [0,0], [420,1], &Wx::wxLI_HORIZONTAL,); # search attributes checkboxes $d->{inc_box} = Wx::CheckBox->new($d, -1, $label->{incremental}); $d->{case_box} = Wx::CheckBox->new($d, -1, $label->{case}); $d->{begin_box}= Wx::CheckBox->new($d, -1, $label->{word_begin}); $d->{word_box} = Wx::CheckBox->new($d, -1, $label->{whole_word}); $d->{regex_box}= Wx::CheckBox->new($d, -1, $label->{regex}); $d->{wrap_box} = Wx::CheckBox->new($d, -1, $label->{auto_wrap}); $d->{inc_box} ->SetValue( $attr->{incremental} ); $d->{case_box} ->SetValue( $attr->{match_case} ); $d->{begin_box}->SetValue( $attr->{match_word_begin} ); $d->{word_box} ->SetValue( $attr->{match_whole_word} ); $d->{regex_box}->SetValue( $attr->{match_regex} ); $d->{wrap_box} ->SetValue( $attr->{auto_wrap} ); # range radio group my $range_box = Wx::StaticBox->new($d, -1, $label->{search_in}, [-1,-1], [-1,-1], &Wx::wxSIMPLE_BORDER | &Wx::wxRAISED_BORDER, ); $d->{selection_radio}= Wx::RadioButton->new($d, -1, $label->{selection}); $d->{document_radio} = Wx::RadioButton->new($d, -1, $label->{document} ); $d->{all_open_radio} = Wx::RadioButton->new($d, -1, $label->{open_documents} ); ################### disable # buttons my $bmp = \&Kephra::Config::icon_bitmap; $d->{replace_back}=Wx::BitmapButton->new($d,-1,&$bmp('replace-previous.xpm')); $d->{replace_fore}=Wx::BitmapButton->new($d,-1,&$bmp('replace-next.xpm')); $d->{backward_button}=Wx::BitmapButton->new($d,-1,&$bmp('go-previous.xpm')); $d->{foreward_button}=Wx::BitmapButton->new($d,-1,&$bmp('go-next.xpm')); $d->{fast_back_button}=Wx::BitmapButton->new($d,-1,&$bmp('go-fast-backward.xpm')); $d->{fast_fore_button}=Wx::BitmapButton->new($d,-1,&$bmp('go-fast-forward.xpm')); $d->{first_button}=Wx::BitmapButton->new($d,-1,&$bmp('go-first.xpm')); $d->{last_button}=Wx::BitmapButton->new($d,-1,&$bmp('go-last.xpm')); $d->{search_button} = Wx::Button->new($d, -1, $label->{search} ); $d->{replace_button}= Wx::Button->new($d, -1, $label->{replace_all} ); $d->{confirm_button}= Wx::Button->new($d, -1, $label->{with_confirmation} ); $d->{close_button} = Wx::Button->new($d, -1, $l18n->{dialog}{general}{close} ); #tooltips / hints if ( $dsettings->{tooltips} ) { $d->{foreward_button}->SetToolTip( $hint->{forward}); $d->{backward_button}->SetToolTip( $hint->{backward}); $d->{fast_fore_button}->SetToolTip( $hint->{fast_forward}); $d->{fast_back_button}->SetToolTip( $hint->{fast_backward}); $d->{first_button}->SetToolTip( $hint->{document_start}); $d->{last_button}->SetToolTip( $hint->{document_end}); $d->{replace_fore}->SetToolTip( $hint->{replace_forward}); $d->{replace_back}->SetToolTip( $hint->{replace_backward}); $d->{case_box}->SetToolTip( $hint->{match_case}); $d->{begin_box}->SetToolTip( $hint->{match_word_begin}); $d->{word_box}->SetToolTip( $hint->{match_whole_word}); $d->{regex_box}->SetToolTip( $hint->{match_regex}); $d->{wrap_box}->SetToolTip( $hint->{auto_wrap}); $d->{inc_box}->SetToolTip( $hint->{incremental}); } # eventhandling Wx::Event::EVT_KEY_DOWN($d->{find_input}, \&find_input_keyfilter ); Wx::Event::EVT_KEY_DOWN($d->{replace_input}, \&replace_input_keyfilter ); Wx::Event::EVT_TEXT($d, $d->{find_input}, \&incremental_search ); Wx::Event::EVT_TEXT($d, $d->{replace_input}, sub { my $input = $d->{replace_input}; my $pos = $input->GetInsertionPoint; Kephra::Edit::Search::set_replace_item( $input->GetValue ); $input->SetInsertionPoint($pos); }); Wx::Event::EVT_CHECKBOX($d, $d->{case_box}, sub { $$attr{match_case} = $d->{case_box}->GetValue; Kephra::Edit::Search::_refresh_search_flags(); } ); Wx::Event::EVT_CHECKBOX($d, $d->{begin_box}, sub { $$attr{match_word_begin} = $d->{begin_box}->GetValue; Kephra::Edit::Search::_refresh_search_flags(); } ); Wx::Event::EVT_CHECKBOX($d, $d->{word_box}, sub { $$attr{match_whole_word} = $d->{word_box}->GetValue; Kephra::Edit::Search::_refresh_search_flags(); } ); Wx::Event::EVT_CHECKBOX($d, $d->{regex_box}, sub { $$attr{match_regex} = $d->{regex_box}->GetValue; Kephra::Edit::Search::_refresh_search_flags(); } ); Wx::Event::EVT_CHECKBOX($d, $d->{wrap_box}, sub { $$attr{auto_wrap} = $d->{wrap_box}->GetValue; } ); Wx::Event::EVT_CHECKBOX($d, $d->{inc_box}, sub { $$attr{incremental} = $d->{inc_box}->GetValue; } ); Wx::Event::EVT_RADIOBUTTON($d, $d->{selection_radio},sub {$attr->{in} = 'selection'}); Wx::Event::EVT_RADIOBUTTON($d, $d->{document_radio}, sub {$attr->{in} = 'document'}); Wx::Event::EVT_RADIOBUTTON($d, $d->{all_open_radio}, sub {$attr->{in} = 'open_docs'}); Wx::Event::EVT_BUTTON($d, $d->{foreward_button}, sub { &no_sel_range; Kephra::Edit::Search::find_next(); } ); Wx::Event::EVT_BUTTON($d, $d->{backward_button}, sub { &no_sel_range; Kephra::Edit::Search::find_prev(); } ); Wx::Event::EVT_BUTTON($d, $d->{fast_fore_button}, sub { &no_sel_range; Kephra::Edit::Search::fast_fore(); } ); Wx::Event::EVT_BUTTON($d, $d->{fast_back_button}, sub { &no_sel_range; Kephra::Edit::Search::fast_back(); } ); Wx::Event::EVT_BUTTON($d, $d->{first_button}, sub { &no_sel_range; Kephra::Edit::Search::find_first(); } ); Wx::Event::EVT_BUTTON($d, $d->{last_button}, sub { &no_sel_range; Kephra::Edit::Search::find_last(); } ); Wx::Event::EVT_BUTTON($d, $d->{replace_fore}, sub { &no_sel_range; Kephra::Edit::Search::replace_fore(); } ); Wx::Event::EVT_BUTTON($d, $d->{replace_back}, sub { &no_sel_range; Kephra::Edit::Search::replace_back(); } ); Wx::Event::EVT_BUTTON($d, $d->{search_button}, sub{ &Kephra::Edit::Search::find_first } ); Wx::Event::EVT_BUTTON($d, $d->{replace_button}, sub{ &Kephra::Edit::Search::replace_all } ); Wx::Event::EVT_BUTTON($d, $d->{confirm_button}, sub{ &Kephra::Edit::Search::replace_confirm } ); Wx::Event::EVT_BUTTON($d, $d->{close_button}, sub{ shift->Close() } ); Wx::Event::EVT_CLOSE( $d, \&quit_search_dialog ); my $ID = _ID(); my $add_call = \&Kephra::EventTable::add_call; &$add_call( 'find', $ID.'_color_refresh', \&colour_find_input, $ID); &$add_call( 'find.item.changed', $ID, sub { $d->{find_input}->SetValue(Kephra::Edit::Search::get_find_item()); $d->{find_input}->SetInsertionPointEnd; }, $ID); &$add_call( 'replace.item.changed', $ID, sub { $d->{replace_input}->SetValue(Kephra::Edit::Search::get_replace_item()); $d->{replace_input}->SetInsertionPointEnd; }, $ID); Kephra::EventTable::add_call('find.item.history.changed', $ID, sub { Kephra::App::_ref()->Yield(); my $cb = $d->{find_input}; $Kephra::temp{dialog}{search}{control} = 1; $cb->Clear(); $cb->Append($_) for @{ Kephra::Edit::Search::get_find_history() }; $cb->SetValue( Kephra::Edit::Search::get_find_item() ); $cb->SetInsertionPointEnd; $Kephra::temp{dialog}{search}{control} = 0; }, $ID); Kephra::EventTable::add_call('replace.item.history.changed', $ID, sub { my $cb = $d->{replace_input}; $Kephra::temp{dialog}{search}{control} = 1; $cb->Clear(); $cb->Append($_) for @{ Kephra::Edit::Search::get_replace_history() }; $cb->SetValue( Kephra::Edit::Search::get_replace_item() ); $cb->SetInsertionPointEnd; $Kephra::temp{dialog}{search}{control} = 0; }, $ID); # detecting and selecting search range # if selection is just on one line if ( $edit_panel->LineFromPosition( $edit_panel->GetSelectionStart ) != $edit_panel->LineFromPosition( $edit_panel->GetSelectionEnd ) ) { $attr->{in} = 'selection'; $d->{selection_radio}->SetValue(1); } elsif ( $attr->{in} eq 'open_docs' ) { $d->{all_open_radio}->SetValue(1); } else { $attr->{in} = 'document'; $d->{document_radio}->SetValue(1); } # assembling my $aborder = 15; my $option_sizer = Wx::BoxSizer->new(&Wx::wxVERTICAL); $option_sizer->Add( $d->{inc_box}, 0, &Wx::wxTOP, 0 ); $option_sizer->Add( $d->{case_box}, 0, &Wx::wxTOP, $aborder ); $option_sizer->Add( $d->{begin_box}, 0, &Wx::wxTOP, 5 ); $option_sizer->Add( $d->{word_box}, 0, &Wx::wxTOP, 5 ); $option_sizer->Add( $d->{regex_box}, 0, &Wx::wxTOP, 5 ); my $rbz = Wx::StaticBoxSizer->new( $range_box, &Wx::wxVERTICAL ); $rbz->Add( $d->{selection_radio}, 1, &Wx::wxTOP, 5 ); $rbz->Add( $d->{document_radio}, 1, &Wx::wxTOP, 5 ); $rbz->Add( $d->{all_open_radio}, 1, &Wx::wxTOP, 5 ); my $range_sizer = Wx::BoxSizer->new(&Wx::wxVERTICAL); $range_sizer->Add( $d->{wrap_box}, 0, &Wx::wxTOP|&Wx::wxALIGN_CENTER_HORIZONTAL, 0 ); $range_sizer->Add( $rbz, 0, &Wx::wxGROW | &Wx::wxTOP, 10 ); my $pad_grid = Wx::FlexGridSizer->new( 4, 2, 0 , 1 ); $pad_grid->Add( $d->{replace_back}, 0, &Wx::wxTOP|&Wx::wxBOTTOM, 10); $pad_grid->Add( $d->{replace_fore}, 0, &Wx::wxTOP|&Wx::wxBOTTOM, 10); $pad_grid->Add( $d->{backward_button}, 0, ,0); $pad_grid->Add( $d->{foreward_button}, 0, ,0); $pad_grid->Add( $d->{fast_back_button},0, ,0); $pad_grid->Add( $d->{fast_fore_button},0, ,0); $pad_grid->Add( $d->{first_button}, 0, ,0); $pad_grid->Add( $d->{last_button}, 0, &Wx::wxRIGHT, $aborder); my $pads_sizer = Wx::BoxSizer->new(&Wx::wxHORIZONTAL); $pads_sizer->Add( $option_sizer,0,&Wx::wxALIGN_LEFT ,0); $pads_sizer->Add( $range_sizer ,1,&Wx::wxALIGN_CENTER|&Wx::wxLEFT|&Wx::wxRIGHT|&Wx::wxGROW ,20); $pads_sizer->Add( $pad_grid ,0,&Wx::wxALIGN_RIGHT ,0); my $button_sizer = Wx::BoxSizer->new(&Wx::wxHORIZONTAL); $button_sizer->Add( $d->{search_button}, 0, &Wx::wxLEFT, $aborder ); $button_sizer->Add( $d->{replace_button}, 0, &Wx::wxLEFT, 10 ); $button_sizer->Add( $d->{confirm_button}, 0, &Wx::wxLEFT, 10 ); $button_sizer->AddStretchSpacer; $button_sizer->Add( $d->{close_button}, 0, &Wx::wxALIGN_RIGHT|&Wx::wxRIGHT, 15 ); my $b_grid = Wx::FlexGridSizer->new( 3, 2, 10, 0 ); $b_grid->Add($d->{find_label}, 0, &Wx::wxLEFT | &Wx::wxRIGHT | &Wx::wxALIGN_CENTER_VERTICAL | &Wx::wxALIGN_RIGHT, 10); $b_grid->Add($d->{find_input}, 1, &Wx::wxRIGHT, $aborder); $b_grid->Add($d->{replace_label}, 0, &Wx::wxLEFT | &Wx::wxRIGHT | &Wx::wxALIGN_CENTER_VERTICAL | &Wx::wxALIGN_RIGHT, 10); $b_grid->Add($d->{replace_input}, 1, &Wx::wxRIGHT, $aborder); $b_grid->AddSpacer(5); $b_grid->Add($pads_sizer, 1, &Wx::wxTOP|&Wx::wxGROW, 5); my $d_sizer = Wx::BoxSizer->new(&Wx::wxVERTICAL); $d_sizer->Add($b_grid, 1, &Wx::wxTOP , $aborder); $d_sizer->Add($d->{sep_line}, 0, &Wx::wxTOP | &Wx::wxALIGN_CENTER_HORIZONTAL | &Wx::wxGROW, 8); $d_sizer->Add($button_sizer, 0, &Wx::wxTOP | &Wx::wxBOTTOM | &Wx::wxGROW , 9); $d->SetSizer($d_sizer); $d->Fit(); #$d->SetAutoLayout(1); # go $d->Show(1); return $d; } else { my $d = _ref(); $d->Iconize(0); $d->Raise; return $d; } } # end of dialog constuction ########################## # dialog event functions # switch back from search in text selection to search in document # because if once looked in selection the finding is selected and this # settings makes no longer sense sub no_sel_range { my $dialog = _ref(); if ( $dialog->{selection_radio}->GetValue ) { $dialog->{document_radio}->SetValue(1); Kephra::Edit::Search::_attributes()->{in} = 'document'; } #$dialog->Refresh; #$dialog->Layout(); } # find input function sub find_input_keyfilter { my ( $input, $event ) = @_; my $dialog = _ref(); my $wx_frame = $dialog->GetParent; my $key_code = $event->GetKeyCode; if ($key_code == &Wx::WXK_RETURN) { no_sel_range(); if ($event->ControlDown){Kephra::Edit::Search::find_first(); $dialog->Close; } elsif ($event->ShiftDown ){Kephra::Edit::Search::find_prev() } else {Kephra::Edit::Search::find_next() } return; } elsif ($key_code == &Wx::WXK_ESCAPE) { $dialog->Close } elsif ($key_code == &Wx::WXK_TAB){ if ( $event->ShiftDown ) { $dialog->{close_button}->SetFocus } else { $dialog->{replace_input}->SetFocus} } $event->Skip; } sub colour_find_input { my $input = _ref()->{find_input}; my $pos = $input->GetInsertionPoint; my $found_something = Kephra::Edit::Search::_find_pos() > -1 ? 1 : 0; return if $highlight_search eq $found_something; $highlight_search = $found_something; if ($found_something){ $input->SetForegroundColour( $color{norm_fore} ); $input->SetBackgroundColour( $color{norm_back} ); } else { $input->SetForegroundColour( $color{alert_fore} ); $input->SetBackgroundColour( $color{alert_back} ); } $input->SetInsertionPoint($pos); $input->Refresh; } sub incremental_search { if ( Kephra::Edit::Search::_attributes()->{incremental} and not $Kephra::temp{dialog}{search}{control} ) { my $input = _ref()->{find_input}; Kephra::Edit::Search::set_find_item($input->GetValue); Kephra::Edit::Search::first_increment(); } } # replace input function sub replace_input_keyfilter { my ($input, $event) = @_; my $dialog = _ref(); my $key_code = $event->GetKeyCode; if ($key_code == &Wx::WXK_RETURN ) { if ( $event->ControlDown ) { Kephra::Edit::Search::replace_all(); $dialog->Close; } elsif ( $event->AltDown ) { replace_confirm($dialog) } else { Kephra::Edit::Search::replace_all() } } if ( $key_code == &Wx::WXK_ESCAPE) { $dialog->Close } elsif ($key_code == &Wx::WXK_TAB){ if ( $event->ShiftDown ) { $dialog->{find_input}->SetFocus } else { $dialog->{inc_box}->SetFocus } } $event->Skip; } sub replace_all { Kephra::Edit::Search::replace_all() } sub replace_confirm { Kephra::Edit::Search::replace_confirm() } sub raise_if_active { _ref()->Raise if $active } sub quit_search_dialog { my ( $win, $event ) = @_; my $config = Kephra::API::settings()->{dialog}{search}; ($config->{position_x}, $config->{position_y} ) = $win->GetPositionXY if $config->{save_position} == 1; $active = 0; $Kephra::temp{dialog}{active}--; Kephra::EventTable::del_own_subscriptions( _ID() ); $win->Destroy(); } ####################### 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Dialog/Keymap.pm0000644000175000017500000000400011573643437021337 0ustar gregoagregoapackage Kephra::Dialog::Keymap; our $VERSION = '0.02'; use strict; use warnings; sub keymap { my $frame = shift; elements::proton::show::keyboard_map(); return 0; if ( !$Kephra::temp{keymap}{dialog_active} || $Kephra::temp{keymap}{dialog_active} == 0 ) { # init win mit grunddesign $Kephra::temp{'keymap'}{'dialog_active'} = 1; my $l18n = Kephra::Localisation::strings()->{dialogs}{keyboard_map}; my $keymap_win = Wx::Frame->new( $frame, -1, ' ' . $l18n->{title}, [ 10, 10 ], [ 420, 460 ], &Wx::wxNO_FULL_REPAINT_ON_RESIZE | &Wx::wxSYSTEM_MENU | &Wx::wxCAPTION | &Wx::wxMINIMIZE_BOX | &Wx::wxCLOSE_BOX | &Wx::wxRESIZE_BORDER, ); $frame->{keymap_win} = $keymap_win; Kephra::App::Window::load_icon( $keymap_win, Kephra::API::settings()->{main}{icon} ); $keymap_win->SetBackgroundColour(&Wx::wxWHITE); #my $keymap_ground = Wx::Panel->new($keymap_win, -1, [0,0], [-1,-1], ,); my $keymap_label = Wx::Panel->new( $keymap_win, -1, [ 0, 0 ], [ 100, 22 ],, ); my $sizer = Wx::BoxSizer->new(&Wx::wxVERTICAL); #inhalt my $keymap_list = Wx::Grid->new( $keymap_win, -1, [ 0, 22 ], [ -1, -1 ], &Wx::wxWANTS_CHARS,, ); $keymap_list->AppendCols( 3, 0 ); $keymap_list->AppendRows( 3, 0 ); $keymap_list->SetColLabelValue( 1, 'Beschreibung' ); $keymap_list->SetRowLabelValue( 2, 'Kombintion' ); #$keymap_list->AppendRows(3, 1);SetColLabelValue and SetRowLabelValue $sizer->Add( $keymap_label, 0, &Wx::wxTOP | &Wx::wxGROW, 0 ); $sizer->Add( $keymap_list, 1, &Wx::wxBOTTOM | &Wx::wxGROW, 0 ); $keymap_win->SetSizer($sizer); $keymap_win->SetAutoLayout(1); $keymap_win->Centre(&Wx::wxBOTH); $keymap_win->Show(1); Wx::Event::EVT_CLOSE( $keymap_win, \&quit_keymap_dialog ); sub quit_keymap_dialog { my ( $win, $event ) = @_; $Kephra::temp{'keymap'}{'dialog_active'} = 0; $win->Destroy(); } } else { $frame->{'keymap_win'}->Iconize(0); $frame->{'keymap_win'}->Raise(); } } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Dialog/Exit.pm0000644000175000017500000001055711573643437021040 0ustar gregoagregoapackage Kephra::Dialog::Exit; our $VERSION = '0.07'; use strict; use warnings; sub save_on_exit { # checking settings if i should save or quit without question my $save = Kephra::API::settings()->{file}{save}{b4_quit}; if ($save eq '0') { return} elsif ($save eq '1') {&Kephra::File::save_all; return} # count unsaved dacuments? my $unsaved_docs = 0; for ( @{ Kephra::Document::Data::all_nr() } ) { $unsaved_docs++ if Kephra::Document::Data::get_attribute('modified', $_) } # if so... if ($unsaved_docs) { my $d18n = Kephra::Config::Localisation::strings()->{dialog}; my $dialog = $Kephra::app{dialog}{exit} = Wx::Dialog->new( Kephra::App::Window::_ref(), -1, $d18n->{file}{quit_unsaved}, [-1,-1], [-1,-1], &Wx::wxNO_FULL_REPAINT_ON_RESIZE | &Wx::wxCAPTION | &Wx::wxSTAY_ON_TOP, ); # starting dialog layout my $v_sizer = Wx::BoxSizer->new(&Wx::wxVERTICAL); my $h_sizer = Wx::BoxSizer->new(&Wx::wxHORIZONTAL); my $button_sizer = Wx::GridSizer->new( 1, 4, 0, 25 ); my ( @temp_sizer, @check_boxes ); my ( $border, $b_border, $max_width ) = ( 10, 20, 0 ); my ( $x_size, $y_size ); my ( $file_name, $check_label ); my $align_lc = &Wx::wxLEFT | &Wx::wxALIGN_CENTER_VERTICAL; my $l10n = Kephra::Config::Localisation::strings()->{dialog}{general}; # generating checkbox list of unsaved files for ( @{ Kephra::Document::Data::all_nr() } ) { if ( Kephra::Document::Data::get_attribute('modified', $_) ) { $file_name = Kephra::Document::Data::get_file_path($_) || Kephra::Config::Localisation::strings()->{app}{general}{untitled}; $check_label = 1 + $_ . ' ' . $file_name; $check_boxes[$_] = Wx::CheckBox->new($dialog, -1, $check_label); $check_boxes[$_]->SetValue(1); $temp_sizer[$_] = Wx::BoxSizer->new(&Wx::wxVERTICAL); $temp_sizer[$_]->Add($check_boxes[$_], 0, $align_lc, $border ); $v_sizer->Add( $temp_sizer[$_], 0, &Wx::wxTOP, $border ); $temp_sizer[$_]->Fit($dialog); ( $x_size, $y_size ) = $dialog->GetSizeWH; $max_width = $x_size if $x_size > $max_width; } } # seperator, label, buttons my $base_line = Wx::StaticLine->new( $dialog, -1, [-1,-1],[2000,2], &Wx::wxLI_HORIZONTAL); my $save_label = Wx::StaticText->new($dialog, -1, $l10n->{save} . ' : '); $dialog->{save_all} = Wx::Button->new($dialog, -1, $l10n->{all} ); $dialog->{save_sel} = Wx::Button->new($dialog, -1, $l10n->{selected} ); $dialog->{save_none}= Wx::Button->new($dialog, -1, $l10n->{none} ); $dialog->{cancel} = Wx::Button->new($dialog, -1, $l10n->{cancel} ); # events Wx::Event::EVT_BUTTON( $dialog, $dialog->{save_all}, sub { &quit_dialog; &Kephra::File::save_all} ); Wx::Event::EVT_BUTTON( $dialog, $dialog->{save_sel}, sub {&quit_dialog; save_selected(\@check_boxes)} ); Wx::Event::EVT_BUTTON( $dialog, $dialog->{save_none},sub {quit_dialog()} ); Wx::Event::EVT_BUTTON( $dialog, $dialog->{cancel}, sub { &quit_dialog; $dialog->{cancel} = 1; } ); Wx::Event::EVT_CLOSE( $dialog, sub {quit_dialog()}); # assembling the fix bottom of dialog layout $h_sizer->Add( $save_label, 0, $align_lc, $border ); $h_sizer->Add( $dialog->{save_all}, 0, $align_lc, $border + $b_border ); $h_sizer->Add( $dialog->{save_sel}, 0, $align_lc, $b_border ); $h_sizer->Add( $dialog->{save_none}, 0, $align_lc, $b_border ); $h_sizer->Add( $dialog->{cancel}, 0, $align_lc, $b_border ); $v_sizer->Add( $base_line, 0, &Wx::wxTOP | &Wx::wxCENTER, $border ); $v_sizer->Add( $h_sizer, 0, &Wx::wxTOP, $border ); # figuring dialog size $dialog->SetSizer($v_sizer); $v_sizer->Fit($dialog); ( $x_size, $y_size ) = $dialog->GetSizeWH; $h_sizer->Fit($dialog); ( $x_size, ) = $dialog->GetSizeWH; $max_width = $x_size if ( $x_size > $max_width ); $dialog->SetSize( $max_width + $b_border, $y_size + $border ); # go $dialog->SetAutoLayout(1); $dialog->CenterOnScreen; $dialog->ShowModal; return 'cancel' if $dialog->{cancel} == 1; } } # internal subs ################ sub save_selected { my @check_boxes = @{ shift; }; for ( 0 .. $#check_boxes ) { Kephra::File::_save_nr($_) if ref $check_boxes[$_] ne '' and $check_boxes[$_]->GetValue; } } sub quit_dialog { my ( $win, $event ) = @_; $Kephra::app{dialog}{exit}->Destroy; } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Dialog/Color.pm0000644000175000017500000000157711573643437021207 0ustar gregoagregoapackage Kephra::Dialog::Color; our $VERSION = '0.02'; use strict; use warnings; sub choose_color { my $ep = &Kephra::App::EditPanel::_ref; my $color = $ep->GetSelectedText || '#ffffff'; $color = sprintf ("%02x%02x%02x", ($color =~ /(\d+).(\d+).(\d+)/)) if index $color, ',' or index $color, '.'; $color = sprintf "#%s", $color unless index( $color, '#' ) == 0; my $color_obj = Wx::Colour->new( $color ); my $data = Wx::ColourData->new; $data->SetColour( $color_obj ); $data->SetChooseFull( 1 ); my $dialog = Wx::ColourDialog->new( Kephra::App::Window::_ref(), $data ); if( $dialog->ShowModal != &Wx::wxID_CANCEL ) { my $data = $dialog->GetColourData; my $ret_color = $data->GetColour; my $html_color = $ret_color->GetAsString( &Wx::wxC2S_HTML_SYNTAX ); $html_color =~ s/^#//; $ep->ReplaceSelection( $html_color ); } } 1;kephra-0.4.3.34+dfsg.orig/lib/Kephra/App/0000755000175000017500000000000012300715244017063 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/App/TabBar.pm0000644000175000017500000002427311573643427020602 0ustar gregoagregoapackage Kephra::App::TabBar; our $VERSION = '0.18'; use strict; use warnings; # internal data my $notebook; sub _ref { $notebook = ref $_[0] eq 'Wx::AuiNotebook' ? $_[0] : $notebook } sub _config { my $cfg = Kephra::API::settings(); $cfg->{app}{tabbar} if keys %$cfg } my @doc2tab_pos; # tab index numbers in doc order my @tab2doc_pos; # doc numbers in tab index order my @doc2vis_pos; # visible tab pos number in doc order my @vis2doc_pos; # doc numbers in visible tab order sub _update_doc_pos { @doc2tab_pos = (); @doc2vis_pos = (); $doc2tab_pos[ $tab2doc_pos[$_] ] = $_ for 0 .. $#tab2doc_pos; $doc2vis_pos[ $vis2doc_pos[$_] ] = $_ for 0 .. $#vis2doc_pos; } sub _validate_doc_nr { &Kephra::Document::Data::validate_doc_nr } sub _doc2tab_pos { my $nr = _validate_doc_nr(shift); return $nr == -1 ? -1 : $doc2tab_pos[$nr]; } sub _tab2doc_pos { my $nr = _validate_doc_nr(shift); return $nr == -1 ? -1 : $tab2doc_pos[$nr]; } sub _vis2doc_pos { my $nr = _validate_doc_nr(shift); return $nr == -1 ? -1 : $vis2doc_pos[$nr]; } sub _doc2vis_pos { my $nr = _validate_doc_nr(shift); return $nr == -1 ? -1 : $doc2vis_pos[$nr]; } sub _move_vis_pos { my $from = _validate_doc_nr(shift); my $to = _validate_doc_nr(shift); return if $from == -1 or $to == -1; my $doc_nr = splice @vis2doc_pos, $from, 1; splice @vis2doc_pos, $to, 0, $doc_nr; _update_doc_pos(); #print "vis_order: @vis2doc_pos, tab_order: @tab2doc_pos\n"; #print $notebook->GetPageIndex( Kephra::Document::Data::_ep($_) )."\n" for @{Kephra::Document::Data::all_nr()}; } sub _move_tab_pos { my $from = _validate_doc_nr(shift); my $to = _validate_doc_nr(shift); return if $from == -1 or $to == -1; my $doc_nr = splice @tab2doc_pos, $from, 1; splice @tab2doc_pos, $to, 0, $doc_nr; _update_doc_pos(); #print "taborder: @tab2doc_pos, doc_order: @doc_order\n"; #print $notebook->GetPageIndex( Kephra::Document::Data::_ep($_) )."\n" for @{Kephra::Document::Data::all_nr()}; } sub _remove_tab { my $tab_nr = _validate_doc_nr(shift); return if $tab_nr == -1; my $doc_nr = $tab2doc_pos[$tab_nr]; my $vis_nr = $doc2vis_pos[$doc_nr]; splice @tab2doc_pos, $tab_nr, 1; splice @vis2doc_pos, $vis_nr, 1; for (0 .. $#tab2doc_pos) {$tab2doc_pos[$_]-- if $tab2doc_pos[$_] > $doc_nr} for (0 .. $#vis2doc_pos) {$vis2doc_pos[$_]-- if $vis2doc_pos[$_] > $doc_nr} _update_doc_pos(); #print "vis_order: @vis2doc_pos, tab_order: @tab2doc_pos\n"; } # # basic toolbar creation # sub create { # create notebook if there is none my $notebook = _ref(); $notebook->Destroy if defined $notebook; $notebook = Wx::AuiNotebook->new (Kephra::App::Window::_ref(),-1, [0,0], [-1,23], &Wx::wxAUI_NB_TOP | &Wx::wxAUI_NB_SCROLL_BUTTONS); _ref($notebook); #Wx::Event::EVT_LEFT_UP( $notebook, sub { #my ($tabs, $event) = @_; print "\n left up\n"; #Kephra::Document::Data::set_value('b4tabchange', $tabs->GetSelection); #$event->Skip; #}); #Wx::Event::EVT_LEFT_DOWN( $notebook, sub { #my ($tabs, $event) = @_; print "\n left down\n"; #Kephra::Document::Change::switch_back() #if Kephra::Document::Data::get_value('b4tabchange')==$tabs->GetSelection; #$event->Skip; #}); my $begin_drag_index; Wx::Event::EVT_AUINOTEBOOK_BEGIN_DRAG($notebook, -1, sub { $begin_drag_index = $_[1]->GetSelection; }); Wx::Event::EVT_AUINOTEBOOK_END_DRAG($notebook, -1, sub { _move_vis_pos($begin_drag_index, $_[1]->GetSelection); #rotate_tab($_[1]->GetSelection - $begin_drag_index); Kephra::App::EditPanel::gets_focus(); Kephra::EventTable::trigger('document.list'); }); Wx::Event::EVT_AUINOTEBOOK_PAGE_CHANGED( $notebook, -1, sub { my ( $bar, $event ) = @_; my $new_nr = _tab2doc_pos( $event->GetSelection ); my $old_nr = _tab2doc_pos( $event->GetOldSelection ); #print "=begin change ".$event->GetSelection." page ; docs: $old_nr -> $new_nr\n"; #print "=end change page $nr\n"; Kephra::Document::Change::to_number( $new_nr, $old_nr); Kephra::App::EditPanel::gets_focus(); $event->Skip; }); Wx::Event::EVT_AUINOTEBOOK_PAGE_CLOSE( $notebook, -1, sub { my ( $bar, $event ) = @_; Kephra::File::close_nr( _tab2doc_pos($event->GetSelection) ); $event->Veto; }); } sub apply_settings { my $notebook = _ref(); # Optional middle click over the tabs if ( _config()->{middle_click} ) { Wx::Event::EVT_MIDDLE_UP( $notebook, Kephra::CommandList::get_cmd_property( _config()->{middle_click},'call') ); } my $style = $notebook->GetWindowStyleFlag(); $style |= &Wx::wxAUI_NB_TAB_MOVE if _config->{movable_tabs}; $style |= &Wx::wxAUI_NB_WINDOWLIST_BUTTON if _config->{tablist_button}; if (_config->{close_button} =~ /all/){ $style |= &Wx::wxAUI_NB_CLOSE_ON_ALL_TABS} elsif (_config->{close_button} =~ /one/){ $style |= &Wx::wxAUI_NB_CLOSE_BUTTON} elsif (_config->{close_button} =~ /current/){$style |= &Wx::wxAUI_NB_CLOSE_ON_ACTIVE_TAB} elsif (_config->{close_button} =~ /active/) {$style |= &Wx::wxAUI_NB_CLOSE_ON_ACTIVE_TAB} # wxAUI_NB_TAB_SPLIT wxAUI_NB_TAB_EXTERNAL_MOVE $notebook->SetWindowStyle( $style ); show(); } # # tab functions # sub add_edit_tab { my $current_nr = Kephra::Document::Data::current_nr(); my $doc_nr = shift || $current_nr; my $config = _config(); my $mode = (ref $config and defined $config->{insert_new_tab}) ? $config->{insert_new_tab} : 'rightmost'; my $vis_pos; $vis_pos = 0 if $mode eq 'leftmost'; $vis_pos = $current_nr if $mode eq 'left'; $vis_pos = $current_nr+1 if $mode eq 'right'; $vis_pos = $doc_nr if $mode eq 'rightmost'; my $stc = Kephra::App::EditPanel::new(); Kephra::Document::Data::set_attribute('ep_ref', $stc, $doc_nr); #my $panel = Wx::Panel->new( $notebook, -1); #$stc->Reparent($panel); #my $sizer = Wx::BoxSizer->new( &Wx::wxVERTICAL ); #$sizer->Add( $stc, 1, &Wx::wxGROW, 0); #$panel->SetSizer($sizer); #$panel->SetAutoLayout(1); #$notebook->Freeze(); #$notebook->Thaw(); my $notebook = _ref(); #$notebook->InsertPage( $vis_pos, $stc, '', 0 ); $notebook->AddPage( $stc, '', 0 ); $notebook->Layout(); $stc->Layout(); splice @tab2doc_pos, $doc_nr, 0, $doc_nr; # splice @tab2doc_pos, $vis_pos, 0, $doc_nr; splice @vis2doc_pos, $doc_nr, 0, $doc_nr; # splice @vis2doc_pos, $vis_pos, 0, $doc_nr; _update_doc_pos(); return $stc; } sub add_panel_tab { my $doc_nr = shift || Kephra::Document::Data::current_nr(); my $panel = shift; return unless defined $panel and substr(ref $panel, 0, 4) eq 'Wx::'; $panel->Reparent($notebook); $notebook->InsertPage($panel, '', 0 ); # attention no $pos yet return $panel; } sub raise_tab_by_doc_nr { raise_tab_by_tab_nr( _doc2tab_pos(shift) ) } sub raise_tab_by_vis_nr { raise_tab_by_tab_nr( _doc2tab_pos( _vis2doc_pos(shift)))} sub raise_tab_by_tab_nr { my $nr = shift; $notebook->SetSelection($nr) unless $nr == $notebook->GetSelection; } sub raise_tab_left { my $vis_nr = _doc2vis_pos( Kephra::Document::Data::current_nr() ); raise_tab_by_vis_nr( Kephra::Document::Data::next_nr(-1, $vis_nr) ); } sub raise_tab_right { my $vis_nr = _doc2vis_pos( Kephra::Document::Data::current_nr() ); raise_tab_by_vis_nr( Kephra::Document::Data::next_nr(1, $vis_nr) ); } sub rotate_tab_left { rotate_tab(-1) } sub rotate_tab_right{ rotate_tab( 1) } sub rotate_tab { return unless _config()->{movable_tabs}; my $rot_step = shift; my $doc_nr = Kephra::Document::Data::current_nr(); my $old_tab_pos = _doc2tab_pos( $doc_nr ); my $old_vis_pos = _doc2vis_pos( $doc_nr ); my $new_vis_pos = Kephra::Document::Data::next_nr($rot_step, $old_vis_pos); my $notebook = _ref(); my $label = $notebook->GetPageText( $old_tab_pos ); my $stc = Kephra::Document::Data::_ep($doc_nr); $notebook->RemovePage( $old_tab_pos ); $notebook->InsertPage( $new_vis_pos, $stc, $label, 0 ); _move_tab_pos( $old_tab_pos, $new_vis_pos ); _move_vis_pos( $old_vis_pos, $new_vis_pos ); raise_tab_by_vis_nr($new_vis_pos); Kephra::EventTable::trigger('document.list'); } sub delete_tab_by_doc_nr { delete_tab_by_tab_nr( _doc2tab_pos(shift) ) } sub delete_tab_by_tab_nr { my $tab_nr = shift; my $doc_nr = _tab2doc_pos($tab_nr); my $notebook = _ref(); #print "delete tab $tab_nr \n"; my $stc = Kephra::Document::Data::_ep($doc_nr); #print $notebook->GetSelection."current, del tab nr $nr\n"; _remove_tab($tab_nr); $notebook->RemovePage($tab_nr); # DeletePage,RemovePage $stc->Destroy(); # $xw->Reparent( undef ); } # # refresh the label of given number # sub refresh_label { my $doc_nr = shift; $doc_nr = Kephra::Document::Data::current_nr() unless defined $doc_nr; return unless _validate_doc_nr($doc_nr) > -1; my $config = _config(); my $untitled = Kephra::Config::Localisation::strings()->{app}{general}{untitled}; my $label = Kephra::Document::Data::get_attribute ( $config->{file_info}, $doc_nr ) || "<$untitled>"; # shorten too long filenames my $max_width = $config->{max_tab_width}; if ( length($label) > $max_width and $max_width > 7 ) { $label = substr( $label, 0, $max_width - 3 ) . '...'; } # set config files in square brackets if ( $config->{mark_configs} and Kephra::Document::Data::get_attribute('config_file', $doc_nr) and Kephra::API::settings()->{file}{save}{reload_config} ) { $label = '$ ' . $label; } $label = ( $doc_nr + 1 ) . ' ' . $label if $config->{number_tabs}; Kephra::Document::Data::set_attribute('label', $label); if ( $config->{info_symbol} ) { $label .= ' #' if Kephra::Document::Data::get_attribute('editable'); $label .= ' *' if Kephra::Document::Data::get_attribute('modified'); } $notebook->SetPageText( _doc2tab_pos($doc_nr), $label ); } sub refresh_current_label { refresh_label(Kephra::Document::Data::current_nr()) } sub refresh_all_label { if ( Kephra::Document::Data::get_value('loaded') ) { refresh_label($_) for @{ Kephra::Document::Data::all_nr() }; raise_tab_by_doc_nr( Kephra::Document::Data::current_nr() ); } } # # tabbar and his menu visibility # sub get_visibility { _config()->{visible} } sub set_visibility { _config()->{visible} = shift } sub switch_visibility { show( _config()->{visible} ^ 1 ) } sub show { my $visible = shift; $visible = get_visibility() unless defined $visible; $visible ? _ref()->SetTabCtrlHeight(25) : _ref()->SetTabCtrlHeight(0); set_visibility($visible); } sub switch_contextmenu_visibility { _config()->{contextmenu_use} ^= 1; Kephra::App::ContextMenu::connect_tabbar(); } sub get_contextmenu_visibility { _config()->{contextmenu_use} } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/App/SearchBar.pm0000644000175000017500000002173111573643427021275 0ustar gregoagregoapackage Kephra::App::SearchBar; our $VERSION = '0.15'; use strict; use warnings; sub _ID { 'searchbar' } sub _ref { Kephra::ToolBar::_ref( _ID(), $_[0]) } sub _config { Kephra::API::settings()->{app}{ _ID() } } sub _search_config { Kephra::API::settings()->{search} } my $highlight_search; # set 1 if searchbar turns red # sub create { # load searchbar definition my $bar_def = Kephra::Config::File::load_from_node_data( _config() ); unless ($bar_def) { $bar_def = Kephra::Config::Tree::get_subtree ( Kephra::Config::Default::toolbars(), _ID() ); } # create searchbar with buttons my $rest_widgets = Kephra::ToolBar::create_new( _ID(), $bar_def); my $bar = _ref(); # apply special searchbar widgets for my $item_data (@$rest_widgets){ my $ctrl; if ($item_data->{type} eq 'combobox' and $item_data->{id} eq 'find'){ my $find_input = $bar->{find_input} = Wx::ComboBox->new ( $bar , -1, '', [-1,-1], [$item_data->{size},-1], [], &Wx::wxTE_PROCESS_ENTER ); $find_input->SetDropTarget ( Kephra::Edit::Search::InputTarget->new($find_input, 'find')); $find_input->SetValue( Kephra::Edit::Search::get_find_item() ); $find_input->SetSize($item_data->{size},-1) if $item_data->{size}; if ( _search_config()->{history}{use} ){ $find_input->Append($_) for @{ Kephra::Edit::Search::get_find_history() } } Wx::Event::EVT_TEXT( $bar, $find_input, sub { my ($bar, $event) = @_; my $old = Kephra::Edit::Search::get_find_item(); my $new = $find_input->GetValue; if ($new ne $old){ Kephra::Edit::Search::set_find_item( $new ); Kephra::Edit::Search::first_increment() if _search_config()->{attribute}{incremental} and Wx::Window::FindFocus() eq $find_input; } } ); Wx::Event::EVT_KEY_DOWN( $find_input, sub { my ( $fi, $event ) = @_; my $key = $event->GetKeyCode; my $found_something; my $ep = Kephra::App::EditPanel::_ref(); if ( $key == &Wx::WXK_RETURN ) { if ($event->ControlDown and $event->ShiftDown) {Kephra::Edit::Search::find_last() } elsif ($event->ControlDown){Kephra::Edit::Search::find_first()} elsif ($event->ShiftDown) {Kephra::Edit::Search::find_prev() } else {Kephra::Edit::Search::find_next() } } elsif ($key == &Wx::WXK_F3){ $event->ShiftDown ? Kephra::Edit::Search::find_prev() : Kephra::Edit::Search::find_next(); } elsif ($key == &Wx::WXK_ESCAPE) { give_editpanel_focus_back(); switch_visibility(); } elsif ($key == 65 and $event->ControlDown) {# A $bar->{find_input}->SetSelection (0, $bar->{find_input}->GetLastPosition); } elsif ($key == 70 and $event->ControlDown) {# F give_editpanel_focus_back() } elsif ( $key == 71 ) { # G if ($event->ControlDown and $event->ShiftDown){ give_editpanel_focus_back(); Kephra::Edit::Goto::last_edit(); } } elsif ($key == 81) { # Q switch_visibility() if $event->ControlDown; #} elsif ( $key == &Wx::WXK_LEFT ){ &Wx::wxSTC_CMD_CHARLEFT return #} elsif ($key == &Wx::WXK_RIGHT ){ &Wx::wxSTC_CMD_CHARRIGHT return; } elsif ($key == &Wx::WXK_UP){ if ($event->ControlDown) { $ep->CmdKeyExecute( &Wx::wxSTC_CMD_LINESCROLLUP ); return; } } elsif ($key == &Wx::WXK_DOWN) { if ($event->ControlDown) { $ep->CmdKeyExecute( &Wx::wxSTC_CMD_LINESCROLLDOWN ); return; } } elsif ($key == &Wx::WXK_PAGEUP) { if ($event->ControlDown) { my $pos = $bar->{find_input}->GetInsertionPoint; Kephra::Document::Change::tab_left(); Wx::Window::SetFocus($bar->{find_input}); $bar->{find_input}->SetInsertionPoint($pos); } else { $ep->CmdKeyExecute( &Wx::wxSTC_CMD_PAGEUP ); } return; } elsif ($key == &Wx::WXK_PAGEDOWN){ if ($event->ControlDown) { my $pos = $bar->{find_input}->GetInsertionPoint; Kephra::Document::Change::tab_right(); Wx::Window::SetFocus($bar->{find_input}); $bar->{find_input}->SetInsertionPoint($pos); } else { $ep->CmdKeyExecute( &Wx::wxSTC_CMD_PAGEDOWN ); } return; } elsif ($key == &Wx::WXK_HOME and $event->ControlDown) { $ep->CmdKeyExecute( &Wx::wxSTC_CMD_DOCUMENTSTART ); return; } elsif ($key == &Wx::WXK_END and $event->ControlDown) { $ep->CmdKeyExecute( &Wx::wxSTC_CMD_DOCUMENTEND ); return; } elsif ($key == &Wx::WXK_BACK and $event->ControlDown and $event->ShiftDown) { my $pos = $bar->{find_input}->GetInsertionPoint; Kephra::Document::Change::switch_back(); Wx::Window::SetFocus($bar->{find_input}); $bar->{find_input}->SetInsertionPoint($pos); } else { #print "$key\n" } $event->Skip; } ); #Wx::Event::EVT_COMBOBOX( $find_input, -1, sub{ } ); Wx::Event::EVT_ENTER_WINDOW( $find_input, sub { Wx::Window::SetFocus($find_input) if _config()->{autofocus}; disconnect_find_input(); }); Wx::Event::EVT_LEAVE_WINDOW( $find_input,sub{connect_find_input($find_input) }); connect_find_input($find_input); $highlight_search = 1; $ctrl = $find_input; } elsif ($item_data->{type} eq 'combobox' and $item_data->{id} eq 'replace'){ my $replace_input = $bar->{replace_input} = Wx::ComboBox->new ( $bar , -1, '', [-1,-1], [$item_data->{size},-1], [], &Wx::wxTE_PROCESS_ENTER ); $replace_input->SetDropTarget ( Kephra::Edit::Search::InputTarget->new($replace_input, 'replace')); $replace_input->SetValue( Kephra::Edit::Search::get_replace_item() ); $replace_input->SetSize($item_data->{size},-1) if $item_data->{size}; if ( _search_config()->{history}{use} ){ $replace_input->Append($_) for @{ Kephra::Edit::Search::get_replace_history() } } $ctrl = $replace_input; } if (ref $ctrl) { $bar->InsertControl( $item_data->{pos}, $ctrl ); } } Wx::Event::EVT_MIDDLE_DOWN( $bar, sub { my ($widget, $event) = @_; my $ep = Kephra::App::EditPanel::_ref(); if ($ep->GetSelectedText){ Kephra::Edit::Search::set_selection_as_find_item(); Kephra::Edit::Search::find_next(); } else { Kephra::Edit::Goto::last_edit(); } } ); Wx::Event::EVT_RIGHT_DOWN ( $bar, sub { return unless get_contextmenu_visibility(); my ($widget, $event) = @_; my ($x, $y) = ($event->GetX, $event->GetY); my $menu = Kephra::App::ContextMenu::get(_config()->{contextmenu}); $bar->PopupMenu($menu, $x, $y) if Kephra::Menu::is($menu); } ); Wx::Event::EVT_LEAVE_WINDOW($bar, \&leave_focus); $bar->Realize; $bar; } sub destroy{ Kephra::ToolBar::destroy ( _ID() ) } # sub connect_find_input { my $find_input = shift; my $ID = _ID(); my $add_call = \&Kephra::EventTable::add_call; &$add_call( 'find.item.changed', $ID.'_input_refresh', sub { my $value = Kephra::Edit::Search::get_find_item(); return if $value eq $find_input->GetValue; $find_input->SetValue( $value ); my $pos = $find_input->GetLastPosition; $find_input->SetSelection($pos,$pos); }, $ID); &$add_call( 'find.item.history.changed', $ID.'_popupmenu', sub { $find_input->Clear(); $find_input->Append($_) for @{ Kephra::Edit::Search::get_find_history() }; $find_input->SetValue( Kephra::Edit::Search::get_find_item() ); $find_input->SetInsertionPointEnd; }, $ID); &$add_call( 'find', $ID.'_color_refresh', \&colour_find_input, $ID); } sub disconnect_find_input{ Kephra::EventTable::del_own_subscriptions(_ID()) } # sub colour_find_input { my $find_input = _ref()->{find_input}; my $found_something = Kephra::Edit::Search::_find_pos() > -1 ? 1 : 0; return if $highlight_search eq $found_something; $highlight_search = $found_something; if ($found_something){ $find_input->SetForegroundColour( Wx::Colour->new( 0x00, 0x00, 0x55 ) ); $find_input->SetBackgroundColour( Wx::Colour->new( 0xff, 0xff, 0xff ) ); } else { $find_input->SetForegroundColour( Wx::Colour->new( 0xff, 0x33, 0x33 ) ); $find_input->SetBackgroundColour( Wx::Colour->new( 0xff, 0xff, 0xff ) ); } $find_input->Refresh; } sub enter_focus { my $bar = _ref(); switch_visibility() unless get_visibility(); Wx::Window::SetFocus($bar->{find_input}) if defined $bar->{find_input}; } sub leave_focus { switch_visibility() if _config()->{autohide} } # sub give_editpanel_focus_back{ leave_focus(); Wx::Window::SetFocus( Kephra::App::EditPanel::_ref() ); } sub position { _config()->{position} } # # set visibility sub show { my $visible = shift || get_visibility(); my $bar = _ref(); return unless $bar; my $sizer = $bar->GetParent->GetSizer; $sizer->Show( $bar, $visible ); $sizer->Layout(); _config()->{visible} = $visible; } sub get_visibility { _config()->{visible} } sub switch_visibility { _config()->{visible} ^= 1; show(); } sub get_contextmenu_visibility { _config()->{contextmenu_visible} } sub switch_contextmenu_visibility { _config()->{contextmenu_visible} ^= 1 } 1;kephra-0.4.3.34+dfsg.orig/lib/Kephra/App/MainToolBar.pm0000644000175000017500000000211611573643427021606 0ustar gregoagregoapackage Kephra::App::MainToolBar; our $VERSION = '0.09'; use strict; use warnings; sub _ref { Kephra::ToolBar::_ref( _name(), $_[0]) } sub _name { 'main' } sub _ID { _name().'_toolbar' } sub _config { Kephra::API::settings()->{app}{toolbar} } sub _win { Kephra::App::Window::_ref() } sub create { return until get_visibility(); my $frame = Kephra::App::Window::_ref(); my $bar = $frame->GetToolBar; # destroy old toolbar if there any destroy() if $bar; _ref( $frame->CreateToolBar ); my $bar_def = Kephra::Config::File::load_from_node_data( _config() ); unless ($bar_def) { $bar_def = Kephra::Config::Tree::get_subtree ( Kephra::Config::Default::toolbars(), _ID() ); } $bar = Kephra::ToolBar::create( _name(), $bar_def ); } sub destroy { Kephra::ToolBar::destroy ( _name() ) } sub get_visibility { _config()->{visible} } sub switch_visibility { _config()->{visible} ^= 1; show(); } sub show { if ( get_visibility() ){ create(); _win()->SetToolBar( _ref() ); } else { destroy( ); _win()->SetToolBar(undef); } } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/App/MenuBar.pm0000644000175000017500000000236511573643427020776 0ustar gregoagregoapackage Kephra::App::MenuBar; our $VERSION = 0.08; use strict; use warnings; my $bar; sub _ref { $bar = ref $_[0] eq 'Wx::MenuBar' ? $_[0] : $bar } sub _config { Kephra::API::settings()->{app}{menubar} } sub create { my $menubar_def = Kephra::Config::File::load_from_node_data( _config() ); unless ($menubar_def) { $menubar_def = Kephra::Config::Default::mainmenu(); } my $menubar = Wx::MenuBar->new(); my $m18n = Kephra::Config::Localisation::strings()->{app}{menu}; my ($pos, $menu_name); for my $menu_def ( @$menubar_def ){ for my $menu_id (keys %$menu_def){ # removing the menu command if there is one $pos = index $menu_id, ' '; if ($pos > -1){ if ('menu' eq substr $menu_id, 0, $pos ){ $menu_name = substr ($menu_id, $pos+1); # ignoring menu structure when command other that menu or blank } else { next } } else { $menu_name = $menu_id; } $menubar->Append( Kephra::Menu::create_static( $menu_name, $menu_def->{$menu_id}), $m18n->{label}{$menu_name} ); } } _ref($menubar); show(); } sub get_visibility { _config()->{visible} } sub switch_visibility { _config()->{visible} ^= 1; show(); } sub show { Kephra::App::Window::_ref()->SetMenuBar( get_visibility() ? _ref() : undef ); } 1;kephra-0.4.3.34+dfsg.orig/lib/Kephra/App/StatusBar.pm0000644000175000017500000002144311774655572021362 0ustar gregoagregoapackage Kephra::App::StatusBar; our $VERSION = '0.09'; use strict; use warnings; my (@fields, @abs_border_x, %index, %width); my $bar; sub _ref { $bar = ref $_[0] eq 'Wx::StatusBar' ? $_[0] : $bar } sub _config { Kephra::API::settings()->{app}{statusbar} } sub _item { $fields[$_[0]] } sub _l18n { Kephra::Config::Localisation::strings()->{app}{status} } sub _none_string { Kephra::Config::Localisation::strings()->{dialog}{general}{none}; } sub _set_text { my ($msg, $nr) = @_; my $win = Kephra::App::Window::_ref(); return if not defined $nr or $nr < 0 or $nr > @fields or not $win or not defined $msg; $win->SetStatusText($msg, $nr); } sub _index_from_mouse_pos { my $x_pos = shift; for (0 .. $#abs_border_x) { return $_ if $width{ $fields[$_] } == -1; return $_ if $x_pos <= $abs_border_x[$_]; } } # # external API # sub create { my $win = Kephra::App::Window::_ref(); $win->CreateStatusBar(1); my $bar = $win->GetStatusBar; my $statusbar_def = Kephra::Config::File::load_from_node_data( _config() ); unless ($statusbar_def) { $statusbar_def = Kephra::Config::Default::toolbars()->{statusbar}; } for my $nr (0 .. $#$statusbar_def) { my @item = split / /, $statusbar_def->[$nr]; if ($item[0] eq 'textpanel' and defined $item[1]) { $index{$item[1]} = $nr; $width{$item[1]} = defined $item[2] ? $item[2] : 50; } } $fields[ $index{$_} ] = $_ for keys %index; $abs_border_x[0] = $width{ $fields[0] }; $abs_border_x[$_] = $abs_border_x[$_-1] + $width{ $fields[$_] } + 2 for 1 .. $#fields; my $length = scalar keys %index; $bar->SetFieldsCount( $length ); my @field_width; $field_width[$_] = $width{ $fields[$_] } for 0 .. $length - 1; $bar->SetStatusWidths( @field_width ); $win->SetStatusBarPane( $index{message} ); Wx::Event::EVT_LEFT_DOWN ( $bar, sub { return unless get_interactive(); my ( $bar, $event ) = @_; my $field = _item( _index_from_mouse_pos( $event->GetX ) ); if ($field eq 'syntaxmode') {Kephra::Document::SyntaxMode::switch_auto()} #elsif ($field eq 'codepage') {Kephra::Document::Property::switch_codepage()} elsif ($field eq 'tab') {Kephra::Document::Property::switch_tab_mode()} elsif ($field eq 'EOL') {Kephra::App::EditPanel::Indicator::switch_EOL_visibility()} elsif ($field eq 'message') {next_file_info(); } } ); Wx::Event::EVT_RIGHT_DOWN ( $bar, sub { return unless get_contextmenu_visibility(); my ( $bar, $event ) = @_; my $x = $event->GetX; my $index = _index_from_mouse_pos( $x ); my $cell_start = $bar->GetFieldRect($index)->GetTopLeft; $x = $cell_start->x unless $width{ _item($index) } == -1; my $y = $cell_start->y; my $field = _item( $index ); my $menu = \&Kephra::App::ContextMenu::get; if ($field eq 'syntaxmode'){$bar->PopupMenu( &$menu('status_syntaxmode'),$x,$y)} elsif ($field eq 'codepage') {$bar->PopupMenu( &$menu('status_encoding'), $x,$y)} elsif ($field eq 'tab') {$bar->PopupMenu( &$menu('status_tab'), $x,$y)} elsif ($field eq 'EOL') {$bar->PopupMenu( &$menu('status_eol'), $x,$y)} elsif ($field eq 'message') {$bar->PopupMenu( &$menu('status_info'), $x,$y)} }); my $help_index = -1; Wx::Event::EVT_MOTION ( $bar, sub { my $index = _index_from_mouse_pos( $_[1]->GetX ); return if $index == $help_index; $help_index = $index; info_msg( _l18n()->{help}{ _item( $index ) } ); }); Wx::Event::EVT_LEAVE_WINDOW( $bar, sub { info_msg(''); $help_index = -1 }); Kephra::EventTable::add_call ('caret.move', 'caret_status', \&caret_pos_info, __PACKAGE__); Kephra::EventTable::add_call ('document.text.change', 'info_msg', \&refresh_info_msg, __PACKAGE__); Kephra::EventTable::add_call ('editpanel.focus', 'info_msg', \&refresh_info_msg, __PACKAGE__); show(); } sub get_visibility { _config()->{'visible'} } sub switch_visibility { _config()->{'visible'} ^= 1; show(); Kephra::App::Window::_ref()->Layout(); } sub show { Kephra::App::Window::_ref()->GetStatusBar->Show( get_visibility() ) } sub get_interactive { _config()->{interactive} } sub get_contextmenu_visibility { _config()->{contextmenu_visible} } sub switch_contextmenu_visibility { _config()->{contextmenu_visible} ^= 1 } # # update cell content # sub refresh_cursor { caret_pos_info(); refresh_info_msg(); } sub refresh_all_cells { refresh_cursor(); style_info(); codepage_info(); tab_info(); EOL_info(); info_msg(); } sub caret_pos_info { my $ep = Kephra::App::EditPanel::_ref(); my $pos = $ep->GetCurrentPos; my $line = $ep->LineFromPosition($pos) + 1; my $lpos = $ep->GetColumn($pos) + 1; my $value; # caret pos display if ( $line > 9999 or $lpos > 9999 ) { _set_text(" $line : $lpos", $index{cursor} ) } else { _set_text(" $line : $lpos", $index{cursor} ) } # selection or pos % display my ( $sel_beg, $sel_end ) = $ep->GetSelection; unless ( Kephra::Document::Data::attr('text_selected') ) { my $chars = $ep->GetLength; if ($chars) { my $value = int 100 * $pos / $chars + .5; $value = ' ' . $value if $value < 10; $value = ' ' . $value . ' ' if $value < 100; _set_text( " $value%", $index{selection} ); } else { _set_text( " 100%", $index{selection} ) } } else { if ( $ep->SelectionIsRectangle ) { my $x = abs int $ep->GetColumn($sel_beg) - $ep->GetColumn($sel_end); my $lines = 1 + abs int $ep->LineFromPosition($sel_beg) - $ep->LineFromPosition($sel_end); my $chars = $x * $lines; $lines = ' ' . $lines if $lines < 100; if ($lines < 10000) { $value = "$lines : $chars" } else { $value = "$lines:$chars" } _set_text( $value, $index{selection} ); } else { my $lines = 1 + $ep->LineFromPosition($sel_end) - $ep->LineFromPosition($sel_beg); my $chars = $sel_end - $sel_beg - ($lines - 1) * Kephra::Document::Data::get_attribute('EOL_length'); $lines = ' ' . $lines if $lines < 100; if ($lines < 10000) { $value = "$lines : $chars" } else { $value = "$lines:$chars" } _set_text( $value, $index{selection}); } } } sub style_info { my $style = shift || Kephra::Document::Data::attr('syntaxmode') || _none_string(); _set_text( '' . $style, $index{syntaxmode} ); } sub codepage_info { my $codepage = shift || Kephra::Document::Data::attr('codepage'); my $msg = defined $codepage ? Kephra::CommandList::get_cmd_property ( 'document-encoding-'.$codepage, 'label' ) : _none_string(); _set_text( '' . $codepage, $index{codepage} ); } sub tab_info { my $mode = Kephra::App::EditPanel::_ref()->GetUseTabs || 0; my $msg = $mode ? ' HT' : ' ST'; _set_text( $msg, $index{'tab'} ); } sub EOL_info { my $mode = shift || Kephra::Document::Data::get_attribute('EOL') || _none_string() || 'no'; my $msg; if ( $mode eq 'none' or $mode eq 'no' ) { $msg = _none_string() || 'no' } elsif ( $mode eq 'cr' or $mode eq 'mac' ) { $msg = " Mac" } elsif ( $mode eq 'lf' or $mode eq 'lin' ) { $msg = "Linux" } elsif ( $mode eq 'cr+lf' or $mode eq 'win' ) { $msg = " Win" } _set_text( $msg, $index{EOL} ); } # # info messages, last cell # sub status_msg { info_msg(@_) } sub info_msg { my $msg; $msg .= $_ for @_; _set_text( $msg, $index{message} ); } sub refresh_info_msg { refresh_file_info() } sub info_msg_nr { my $nr = shift; if (defined $nr) { _config()->{msg_nr} = $nr} else { _config()->{msg_nr} } } sub next_file_info { my $info_nr = _config()->{msg_nr}; $info_nr = $info_nr >= 2 ? 0 : $info_nr + 1; set_info_msg_nr($info_nr); } sub set_info_msg_nr { my $info_nr = shift || 0; info_msg_nr($info_nr); refresh_file_info(); } sub refresh_file_info { my $msg = info_msg_nr() ? _get_file_info( _config()->{msg_nr} ) : ''; _set_text( $msg, $index{message} ); } sub _get_file_info { my $selector = shift; return '' unless $selector; my $l18n = _l18n()->{label}; # show how big file is if ( $selector == 1 ) { my $ep = Kephra::App::EditPanel::_ref(); return sprintf ' %s: %s %s: %s', $l18n->{chars}, _dotted_number( $ep->GetLength ), $l18n->{lines}, _dotted_number( $ep->GetLineCount ); # show how old file is } elsif ( $selector == 2 ) { my $file = Kephra::Document::Data::get_file_path(); if ($file) { my @time = localtime( $^T - ( -M $file ) * 86300 ); return sprintf ' %s: %02d:%02d - %02d.%02d.%d', $l18n->{last_change}, $time[2], $time[1], $time[3], $time[4] + 1, $time[5] + 1900; } else { my @time = localtime; return sprintf ' %s: %02d:%02d - %02d.%02d.%d', $l18n->{now_is}, $time[2], $time[1], $time[3], $time[4] + 1, $time[5] + 1900; } } } sub _dotted_number { local $_ = shift; 1 while s/^(\d+)(\d{3})/$1.$2/; return $_; } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/App/Panel.pm0000644000175000017500000000020311573643427020471 0ustar gregoagregoapackage Kephra::App::Panel; our $VERSION = '0.00'; use strict; use warnings; my ($left,$right,$bottom); sub new {} 1;kephra-0.4.3.34+dfsg.orig/lib/Kephra/App/Window.pm0000644000175000017500000001407711573643427020717 0ustar gregoagregoapackage Kephra::App::Window; # Main application window our $VERSION = '0.11'; use strict; use warnings; my $frame; sub _ref { if (ref $_[0] eq 'Wx::Frame'){ $frame = $_[0] } else { $frame } } sub _config { Kephra::API::settings()->{app}{window} } sub create { my $win = Wx::Frame->new (undef, -1, '', [-1,-1], [-1,-1], &Wx::wxDEFAULT_FRAME_STYLE); Wx::Window::SetWindowVariant($win, &Wx::wxWINDOW_VARIANT_SMALL) if Wx::wxMAC(); _ref($win); connect_events($win); $win; } sub connect_events { my $win = shift || _ref(); my $trigger = \&Kephra::EventTable::trigger; Wx::Event::EVT_MENU_OPEN ($win, sub {&$trigger('menu.open')}); Wx::Event::EVT_DROP_FILES($win, \&Kephra::File::add_dropped); Wx::Event::EVT_CLOSE ($win, sub { &$trigger('app.close'); Kephra::App::exit() }); #Wx::Event::EVT_IDLE ($win, sub { } ); } sub apply_settings { my $win = shift || _ref(); $win->DragAcceptFiles(1) if Wx::wxMSW(); my $icon_file = Kephra::Config::existing_filepath( _config()->{icon} ); load_icon( $win, $icon_file ); restore_positions(); eval_fullscreen_flag(); eval_on_top_flag(); eval_transparency_flag(); eval_max_editpanel_flag(); } sub load_icon { my $frame = shift; my $icon_file = shift; return unless -e $icon_file; my $type ; if ($icon_file =~ /.ico$/) { $type = &Wx::wxBITMAP_TYPE_ICO } elsif ($icon_file =~ /.xpm$/) { $type = &Wx::wxBITMAP_TYPE_XPM } my $icon; $icon = Wx::Icon->new( $icon_file, $type ) if $type; $frame->SetIcon( $icon ) if defined $icon; } sub set_title { my $title = shift; _ref()->SetTitle($title); } sub refresh_title { my $appname = $Kephra::NAME; my $version = $Kephra::VERSION; my $untitled = Kephra::Config::Localisation::strings()->{app}{general}{untitled}; my $filepath = Kephra::Document::Data::get_file_path() || "<$untitled>"; my $filename = Kephra::Document::Data::file_name() || "<$untitled>"; my $docnr = Kephra::Document::Data::current_nr() + 1; my $doccount = Kephra::Document::Data::last_nr(); my $title = _config()->{title}; set_title( eval qq/"$title"/ ); } sub get_fullscreen_mode { _config()->{fullscreen} } sub switch_fullscreen_mode { _config()->{fullscreen} ^= 1; eval_fullscreen_flag(); } sub eval_fullscreen_flag { _ref->ShowFullScreen( get_fullscreen_mode(), &Wx::wxFULLSCREEN_NOCAPTION | &Wx::wxFULLSCREEN_NOBORDER ); } sub get_on_top_mode { _config()->{stay_on_top} } sub switch_on_top_mode { _config()->{stay_on_top} ^= 1; eval_on_top_flag(); } sub eval_on_top_flag { my $win = _ref(); my $style = $win->GetWindowStyleFlag(); if ( get_on_top_mode() ) { $style |= &Wx::wxSTAY_ON_TOP } else { $style &= ~&Wx::wxSTAY_ON_TOP } $win->SetWindowStyle($style); Kephra::EventTable::trigger('app.window.ontop'); } sub get_transparency_mode { _config()->{transparent} } sub switch_transparency_mode { _config()->{transparent} ^= 1; eval_transparency_flag(); } sub eval_transparency_flag { _ref->SetTransparent( 255 - int( _config()->{transparency} * 255 * get_transparency_mode() ) ); } sub switch_top_and_transparency_mode { switch_transparency_mode(); switch_on_top_mode if get_on_top_mode() != get_transparency_mode(); } sub get_max_editpanel_mode { _config()->{maximize_editpanel} } sub switch_max_editpanel_mode { _config()->{maximize_editpanel} ^= 1; eval_max_editpanel_flag(); } sub eval_max_editpanel_flag { my $v = get_max_editpanel_mode(); Kephra::App::MenuBar::switch_visibility() if Kephra::App::MenuBar::get_visibility() == $v; Kephra::App::MainToolBar::switch_visibility() if Kephra::App::MainToolBar::get_visibility() == $v; Kephra::App::TabBar::switch_visibility() if Kephra::App::TabBar::get_visibility() == $v and not $v; Kephra::App::SearchBar::switch_visibility() if Kephra::App::SearchBar::get_visibility() == $v; Kephra::App::StatusBar::switch_visibility() if Kephra::App::StatusBar::get_visibility() == $v; } sub restore_normal_mode { switch_fullscreen_mode if _config()->{fullscreen}; switch_on_top_mode if _config()->{stay_on_top}; switch_transparency_mode if _config()->{transparent}; switch_max_editpanel_mode if _config()->{maximize_editpanel}; } sub save_positions { my $app_win = Kephra::App::Window::_ref(); my $config = _config(); if ($config->{save_position}){ ($config->{position_x},$config->{position_y}) = $app_win->GetPositionXY; ($config->{size_x}, $config->{size_y}) = $app_win->GetSizeWH; } } sub restore_positions { # main window: resize when its got lost my $config = _config(); my $default = $config->{default}; my $screen = Wx::GetDisplaySize(); my ($screen_x, $screen_y ) = ( $screen->GetWidth, $screen->GetHeight ); if ($config->{save_position}){ if ( ( 0 > $config->{position_x} + $config->{size_x} ) or ( 0 > $config->{position_y} + $config->{size_y} ) ) { $config->{position_x} = 0; $config->{position_y} = 0; if ( int $default->{size_x} == 0 ) { $config->{size_x} = $screen_x } else{ $config->{size_x} = $default->{size_x} } if ( int $default->{size_y} == 0 ) { $config->{size_y} = $screen_y - 55} else{ $config->{size_y} = $default->{size_y} } } if (Wx::wxMAC()) {$config->{size_y}-=23; if ($config->{position_y}<21) {$config->{position_y}=21;}} $config->{position_x} = 0 if $screen_x < $config->{position_x}; $config->{position_y} = 0 if $screen_y < $config->{position_y}; } else { $config->{position_x} = $default->{position_x}; $config->{position_y} = $default->{position_y}; $config->{size_x} = $default->{size_x}; $config->{size_y} = $default->{size_y}; } _ref()->SetSize( $config->{position_x}, $config->{position_y}, $config->{size_x}, $config->{size_y} ); } sub OnPaint { my ( $self, $event ) = @_; my $dc = Wx::PaintDC->new($self); # create a device context (DC) } sub OnQuit { my ( $self, $event ) = @_; $self->Close(1); } sub destroy { _ref()->Destroy() } 1; =head1 NAME Kephra::App::Window - frame of the main window =head1 DESCRIPTION =cut kephra-0.4.3.34+dfsg.orig/lib/Kephra/App/ContextMenu.pm0000644000175000017500000000375211573643427021717 0ustar gregoagregoapackage Kephra::App::ContextMenu; our $VERSION = '0.10'; use strict; use warnings; sub get{ &Kephra::Menu::ready || Wx::Menu->new() } # sub create_all { my $config = Kephra::API::settings()->{app}{contextmenu}; my $default_file = Kephra::Config::filepath($config->{defaultfile}); my $default_menu_def = Kephra::Config::File::load($default_file); unless ($default_menu_def) { $default_menu_def = Kephra::Config::Default::contextmenus(); } for my $menu_id (keys %{$config->{id}}){ if (not ref $menu_id){ my $start_node = $config->{id}{$menu_id}; substr($start_node, 0, 1) eq '&' ? Kephra::Menu::create_dynamic($menu_id, $start_node) : do { my $menu_def = Kephra::Config::Tree::get_subtree ($default_menu_def, $start_node); Kephra::Menu::create_static ($menu_id, $menu_def); } } elsif (ref $menu_id eq 'HASH'){ my $menu = $config->{id}{$menu_id}; next unless exists $menu->{file}; my $file_name = $Kephra::temp{path}{config} . $menu->{file}; next unless -e $file_name; my $menu_def = Kephra::Config::File::load($file_name); $menu_def = Kephra::Config::Tree::get_subtree($menu_def, $menu->{node}); Kephra::Menu::create_static($menu_id, $menu_def); } } } # connect the static and build the dynamic sub connect_all {} # to editpanel can connect 2 menus, sub connect_tabbar { my $tabbar = Kephra::App::TabBar::_ref(); if ( Kephra::App::TabBar::get_contextmenu_visibility() ) { connect_widget( $tabbar, Kephra::App::TabBar::_config()->{contextmenu} ) } else { disconnect_widget($tabbar) } } sub connect_widget { my $widget = shift; my $menu_id = shift; Wx::Event::EVT_RIGHT_DOWN ($widget, sub { my ($widget, $event) = @_; my $menu = get($menu_id); $widget->PopupMenu($menu, $event->GetX, $event->GetY) if Kephra::Menu::is($menu); } ); } sub disconnect_widget{ my $widget = shift; Wx::Event::EVT_RIGHT_DOWN($widget, sub {} ) if substr(ref $widget, 0, 4) eq 'Wx::'; } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/App/EditPanel/0000755000175000017500000000000012300715260020726 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/App/EditPanel/Fold.pm0000644000175000017500000001245111573643427022173 0ustar gregoagregoapackage Kephra::App::EditPanel::Fold; our $VERSION = '0.05'; use strict; use warnings; # sub _ep_ref { Kephra::App::EditPanel::is($_[0]) ? $_[0] : Kephra::App::EditPanel::_ref() } sub _config { Kephra::App::EditPanel::Margin::_config()->{fold} } sub _attribute { 'folded_lines' } # sub _is_head_level { # is this the fold level of a head node ? my $level = shift; return 1 if ($level % 1024) < (($level >> 16) % 1024); } sub _is_node { my $line = shift; return 1 if _ep_ref()->GetFoldParent($line+1) == $line; } sub _get_line { # my ($ep, $event) = @_; $ep = _ep_ref(); my $line = Kephra::App::EditPanel::Margin::clicked_on_line($event); # save position where context menu poped so we can fold there if ($line == -1){ if (defined $event and ref $event eq 'Wx::StyledTextEvent'){ $line = $ep->LineFromPosition( $event->GetPosition() ); } else { $line = $ep->GetCurrentLine() } } return $line; } # sub store { for my $doc_nr (@{Kephra::Document::Data::all_nr()}) { my $ep = Kephra::Document::Data::_ep($doc_nr); my @lines; for (0 .. $ep->GetLineCount()-1) { push @lines, $_ unless $ep->GetFoldExpanded( $_ ); } Kephra::Document::Data::set_attribute( _attribute(), \@lines, $doc_nr); } } sub restore { my $doc_nr = Kephra::Document::Data::valid_or_current_doc_nr(shift); my $ep = Kephra::Document::Data::_ep($doc_nr); return if $doc_nr < 0 or not ref $ep; my $lines = Kephra::Document::Data::get_attribute( _attribute(), $doc_nr); return unless ref $lines eq 'ARRAY'; for (reverse @$lines){ $ep->ToggleFold($_) if $ep->GetFoldExpanded($_); } } # # folding functions # sub toggle_here { my $ep = _ep_ref(); my $line = _get_line(@_); $ep->ToggleFold($line); Kephra::Edit::Goto::next_visible_pos() if _config()->{keep_caret_visible} and not $ep->GetFoldExpanded($line); } sub toggle_recursively { my $ep = _ep_ref(); my $line = _get_line(@_); unless ( _is_node( $line ) ) { $line = $ep->GetFoldParent($line); return if $line == -1; } my $node_xpanded = not $ep->GetFoldExpanded($line); my $cursor = $ep->GetLastChild($line, -1); while ($cursor >= $line) { $ep->ToggleFold($cursor) if $ep->GetFoldExpanded($cursor) xor $node_xpanded; $cursor--; } Kephra::Edit::Goto::next_visible_pos() if _config()->{keep_caret_visible} and not $node_xpanded; } sub toggle_siblings { toggle_siblings_of_line( _get_line(@_) ) } sub toggle_siblings_of_line { my $ep = _ep_ref(); my $line = shift; return if $line < 0 or $line > ($ep->GetLineCount()-1); my $level = $ep->GetFoldLevel($line); my $parent = $ep->GetFoldParent($line); my $xp = not $ep->GetFoldExpanded($line); my $first_line = $parent; my $cursor = $ep->GetLastChild($parent, -1 ); ($first_line, $cursor) = (-1, $ep->GetLineCount()-2) if $parent == -1; while ($cursor > $first_line){ $ep->ToggleFold($cursor) if $ep->GetFoldLevel($cursor) == $level and ($ep->GetFoldExpanded($cursor) xor $xp); $cursor--; } Kephra::Edit::Goto::next_visible_pos() if _config()->{keep_caret_visible} and not $xp; $ep->EnsureCaretVisible; } sub toggle_level { my $ep = _ep_ref(); my $line = _get_line(@_); return if $line < 0 or $line > ($ep->GetLineCount()-1); my $level = $ep->GetFoldLevel($line); my $xp = not $ep->GetFoldExpanded($line); for (0 .. $ep->GetLineCount()-1) { $ep->ToggleFold($_) if $ep->GetFoldLevel($_) == $level and ($ep->GetFoldExpanded($_) xor $xp); } Kephra::Edit::Goto::next_visible_pos() if _config()->{keep_caret_visible} and not $xp; $ep->EnsureCaretVisible; } sub toggle_all { my $ep = _ep_ref(); my $newline = my $oldline = $ep->GetLineCount(); # looking for the head of heads // capi di capi while ($oldline == $newline and $oldline > 0){ $newline = --$oldline; $newline = $ep->GetFoldParent($newline) while $ep->GetFoldParent($newline) > -1; } my $root_unfolded = $ep->GetFoldExpanded($newline); $root_unfolded ? fold_all() : unfold_all(); Kephra::Edit::Goto::next_visible_pos() if _config()->{keep_caret_visible} and $root_unfolded; } sub fold_all { my $ep = _ep_ref(); my $cursor = $ep->GetLineCount()-1; while ($cursor > -1) { $ep->ToggleFold($cursor) if $ep->GetFoldExpanded($cursor); $cursor--; } } sub unfold_all { my $ep = _ep_ref(); my $cursor = $ep->GetLineCount()-1; while ($cursor > -1) { $ep->ToggleFold($cursor) unless $ep->GetFoldExpanded($cursor); $cursor--; } } sub show_folded_children { #my $ep = _ep_ref(); #my $parent = _get_line(@_); #unless ( _is_head_level( $ep->GetFoldLevel($parent) ) ) { #$parent = $ep->GetFoldParent($parent); #return if $parent == -1; #} #$ep->ToggleFold($parent) unless $ep->GetFoldExpanded($parent); #my $cursöor = $ep->GetLastChild( $parent, -1 ); #my $level = $ep->GetFoldLevel($parent) >> 16; #while (@cursor > $parent) { #$ep->ToggleFold($cursor) if $ep->GetFoldLevel($cursor) % 2048 == $level #and $ep->GetFoldExpanded($cursor); #$cursor--; #} } 1; =head1 NAME Kephra::App::EditPanel::Fold - code folding functions =head1 DESCRIPTION =cutkephra-0.4.3.34+dfsg.orig/lib/Kephra/App/EditPanel/Indicator.pm0000644000175000017500000001213211774655572023226 0ustar gregoagregoapackage Kephra::App::EditPanel::Indicator; $VERSION = '0.01'; use strict; use warnings; sub _ref { Kephra::App::EditPanel::_ref() } sub _all_ref { Kephra::Document::Data::get_all_ep() } sub _config { Kephra::API::settings()->{editpanel}{indicator} } # aply all indicator setting to this edit panel sub apply_all_here { my $ep = shift || _ref(); my $indicator = _config(); my $color = \&Kephra::Config::color; $ep->SetCaretLineBack( &$color( $indicator->{caret_line}{color} ) ); $ep->SetCaretPeriod( $indicator->{caret}{period} ); $ep->SetCaretWidth( $indicator->{caret}{width} ); $ep->SetCaretForeground( &$color( $indicator->{caret}{color} ) ); if ( $indicator->{selection}{fore_color} ne '-1' ) { $ep->SetSelForeground ( 1, &$color( $indicator->{selection}{fore_color} ) ); } $ep->SetSelBackground( 1, &$color( $indicator->{selection}{back_color})); $ep->SetWhitespaceForeground ( 1, &$color( $indicator->{whitespace}{color} ) ); apply_whitespace_settings_here($ep); apply_bracelight_settings_here($ep); apply_caret_line_settings_here($ep); apply_indention_guide_settings_here($ep); apply_LLI_settings_here($ep); apply_EOL_settings_here($ep); } # whitespace # sub whitespace_visible { _config()->{whitespace}{visible} } sub apply_whitespace_settings_here { my $ep = shift || _ref(); $ep->SetViewWhiteSpace( whitespace_visible() ) } sub apply_whitespace_settings { apply_whitespace_settings_here($_) for @{_all_ref()} } sub switch_whitespace_visibility { my $v = _config()->{whitespace}{visible} ^= 1; apply_whitespace_settings(); return $v; } # bracelight # sub bracelight_visible { _config()->{bracelight}{visible} } sub switch_bracelight { bracelight_visible() ? set_bracelight_off() : set_bracelight_on(); } sub set_bracelight_on { _config()->{bracelight}{visible} = 1; apply_bracelight_settings() } sub set_bracelight_off { _config()->{bracelight}{visible} = 0; apply_bracelight_settings() }#{bracelight}{mode} = 'adjacent'|'surround'; sub apply_bracelight_settings { apply_bracelight_settings_here($_) for @{_all_ref()} } sub apply_bracelight_settings_here { my $ep = shift || _ref(); if (bracelight_visible()){ Kephra::EventTable::add_call ('caret.move', 'bracelight', \&paint_bracelight); paint_bracelight($ep); } else { Kephra::EventTable::del_call('caret.move', 'bracelight'); $ep->BraceHighlight( -1, -1 ); } } sub paint_bracelight { my $ep = shift || _ref(); my $pos = $ep->GetCurrentPos; my $tab_size = Kephra::Document::Data::get_attribute('tab_size'); my $matchpos = $ep->BraceMatch(--$pos); $matchpos = $ep->BraceMatch(++$pos) if $matchpos == -1; $ep->SetHighlightGuide(0); if ( $matchpos > -1 ) { # highlight braces $ep->BraceHighlight($matchpos, $pos); # asign pos to opening brace $pos = $matchpos if $matchpos < $pos; my $indent = $ep->GetLineIndentation( $ep->LineFromPosition($pos) ); # highlighting indenting guide $ep->SetHighlightGuide($indent) if $indent and $tab_size and $indent % $tab_size == 0; } else { # disbale all highlight $ep->BraceHighlight( -1, -1 ); $ep->BraceBadLight($pos-1) if $ep->GetTextRange($pos-1,$pos) =~ /{|}|\(|\)|\[|\]/; $ep->BraceBadLight($pos) if $pos < $ep->GetTextLength and $ep->GetTextRange( $pos, $pos + 1 ) =~ tr/{}()\[\]//; } } # indention guide # sub indention_guide_visible { _config()->{indent_guide}{visible} } sub apply_indention_guide_settings { apply_indention_guide_settings_here($_) for @{_all_ref()} } sub apply_indention_guide_settings_here { my $ep = shift || _ref(); $ep->SetIndentationGuides( indention_guide_visible() ) } sub switch_indention_guide_visibility { _config()->{indent_guide}{visible} ^= 1; apply_indention_guide_settings(); } # caret line # sub caret_line_visible { _config()->{caret_line}{visible} } sub apply_caret_line_settings_here { my $ep = shift || _ref(); $ep->SetCaretLineVisible( caret_line_visible() ); } sub apply_caret_line_settings { apply_caret_line_settings_here($_) for @{_all_ref()} } sub switch_caret_line_visibility { _config()->{caret_line}{visible} ^= 1; apply_caret_line_settings(); } # LLI = long line indicator = right margin # sub LLI_visible { _config()->{right_margin}{style} == &Wx::wxSTC_EDGE_LINE } sub apply_LLI_settings_here { my $ep = shift || _ref(); my $config = _config()->{right_margin}; my $color = \&Kephra::Config::color; $ep->SetEdgeColour( &$color( $config->{color} ) ); $ep->SetEdgeColumn( $config->{position} ); show_LLI( $config->{style}, $ep); } sub show_LLI { my $style = shift; my $ep = shift || _ref(); $ep->SetEdgeMode( $style ); } sub apply_LLI_settings { apply_LLI_settings_here($_) for @{_all_ref()} } sub switch_LLI_visibility { my $style = _config()->{right_margin}{style} = LLI_visible() ? &Wx::wxSTC_EDGE_NONE : &Wx::wxSTC_EDGE_LINE; apply_LLI_settings($style); } # EOL = end of line marker # sub EOL_visible { _config()->{end_of_line_marker} } sub switch_EOL_visibility { _config()->{end_of_line_marker} ^= 1; apply_EOL_settings(); } sub apply_EOL_settings { apply_EOL_settings_here($_) for @{_all_ref()} } sub apply_EOL_settings_here { my $ep = shift || _ref(); $ep->SetViewEOL( EOL_visible() ); } 1;kephra-0.4.3.34+dfsg.orig/lib/Kephra/App/EditPanel/Margin.pm0000644000175000017500000002223211573643427022522 0ustar gregoagregoapackage Kephra::App::EditPanel::Margin; our $VERSION = '0.13'; use strict; use warnings; my $mouse_y_pos; sub _ep_ref { Kephra::App::EditPanel::is($_[0]) ? $_[0] : Kephra::App::EditPanel::_ref() } sub _all_ref { Kephra::Document::Data::get_all_ep() } sub _edit_config { Kephra::App::EditPanel::_config() } sub _config { _edit_config()->{margin}} sub _line_config { _config()->{linenumber}} sub _fold_config { _config()->{fold} } sub _marker_config { _config()->{marker} } sub width { my $ep = _ep_ref(shift); my $width; $width += $ep->GetMarginWidth($_) for 0..2; $width } sub in_nr { my $x = shift; my $ep = _ep_ref(shift); my $border; for my $margin (0..2){ $border += $ep->GetMarginWidth($margin); return $margin if $x <= $border; } return -1; } sub apply_settings_here {# eval view settings for the margin of this edit panel obj my $ep = _ep_ref(shift); # defining the 3 margins $ep->SetMarginType( 0, &Wx::wxSTC_MARGIN_SYMBOL ); $ep->SetMarginType( 1, &Wx::wxSTC_MARGIN_NUMBER ); $ep->SetMarginType( 2, &Wx::wxSTC_MARGIN_SYMBOL ); $ep->SetMarginMask( 0, 0x01FFFFFF ); $ep->SetMarginMask( 1, 0 ); $ep->SetMarginMask( 2, &Wx::wxSTC_MASK_FOLDERS ); $ep->SetMarginSensitive( 0, 1 ); $ep->SetMarginSensitive( 1, 1 ); $ep->SetMarginSensitive( 2, 1 ); # setting folding markers my $color = \&Kephra::Config::color; my $f = &$color( _fold_config()->{fore_color} ); my $b = &$color( _fold_config()->{back_color} ); if (_fold_config()->{style} eq 'arrows') { $ep->MarkerDefine(&Wx::wxSTC_MARKNUM_FOLDER, &Wx::wxSTC_MARK_ARROW, $b,$f); $ep->MarkerDefine(&Wx::wxSTC_MARKNUM_FOLDEREND, &Wx::wxSTC_MARK_ARROW, $b,$f); $ep->MarkerDefine(&Wx::wxSTC_MARKNUM_FOLDEROPEN, &Wx::wxSTC_MARK_ARROWDOWN,$b,$f); $ep->MarkerDefine(&Wx::wxSTC_MARKNUM_FOLDEROPENMID,&Wx::wxSTC_MARK_ARROWDOWN,$b,$f); $ep->MarkerDefine(&Wx::wxSTC_MARKNUM_FOLDERMIDTAIL,&Wx::wxSTC_MARK_EMPTY, $b,$f); $ep->MarkerDefine(&Wx::wxSTC_MARKNUM_FOLDERTAIL, &Wx::wxSTC_MARK_EMPTY, $b,$f); $ep->MarkerDefine(&Wx::wxSTC_MARKNUM_FOLDERSUB, &Wx::wxSTC_MARK_EMPTY, $b,$f); } else { $ep->MarkerDefine(&Wx::wxSTC_MARKNUM_FOLDER, &Wx::wxSTC_MARK_BOXPLUS, $b,$f); $ep->MarkerDefine(&Wx::wxSTC_MARKNUM_FOLDEREND, &Wx::wxSTC_MARK_BOXPLUSCONNECTED,$b,$f); $ep->MarkerDefine(&Wx::wxSTC_MARKNUM_FOLDEROPEN, &Wx::wxSTC_MARK_BOXMINUS, $b,$f); $ep->MarkerDefine(&Wx::wxSTC_MARKNUM_FOLDEROPENMID,&Wx::wxSTC_MARK_BOXMINUSCONNECTED,$b,$f); $ep->MarkerDefine(&Wx::wxSTC_MARKNUM_FOLDERMIDTAIL,&Wx::wxSTC_MARK_TCORNER, $b,$f); $ep->MarkerDefine(&Wx::wxSTC_MARKNUM_FOLDERTAIL, &Wx::wxSTC_MARK_LCORNER, $b,$f); $ep->MarkerDefine(&Wx::wxSTC_MARKNUM_FOLDERSUB, &Wx::wxSTC_MARK_VLINE, $b,$f); } $ep->SetFoldFlags(16) if _fold_config()->{flag_line}; show_marker_here($ep); Kephra::Document::Data::set_attribute('margin_linemax', 0); #apply_line_number_width_here($ep); apply_line_number_color_here($ep); show_fold_here($ep); apply_text_width_here($ep); } sub refresh_changeable_settings { my $ep = _ep_ref(shift); apply_line_number_color_here($ep); apply_fold_flag_color_here($ep); } sub get_contextmenu_visibility { _edit_config()->{contextmenu}{margin} } sub switch_contextmenu_visibility { _edit_config()->{contextmenu}{margin} ^= 1 } # # deciding what to do when clicked on edit panel margin # sub on_left_click { my ($ep, $event, $nr) = @_; if ($nr < 2) {Kephra::Edit::Marker::toggle_marker_here(@_) } elsif ($nr == 2) {Kephra::App::EditPanel::Fold::toggle_here(@_) } } sub on_middle_click { my ($ep, $event, $nr) = @_; Kephra::Edit::Marker::toggle_bookmark_here(@_) if $nr < 2; Kephra::App::EditPanel::Fold::toggle_recursively($ep, $event) if $nr == 2; } sub on_right_click { my ($ep, $event, $nr) = @_; my ($x, $y) = ($event->GetX, $event->GetY); if ($nr > -1 and $nr < 2 and get_contextmenu_visibility() ){ $mouse_y_pos = $event->GetY; $ep->PopupMenu( Kephra::App::ContextMenu::get (_edit_config()->{contextmenu}{ID_margin} ), $x, $y); undef $mouse_y_pos; } elsif ($nr == 2) { $event->LeftIsDown ? Kephra::App::EditPanel::Fold::toggle_all() : Kephra::App::EditPanel::Fold::toggle_level($ep, $event); } } sub clicked_on_line { my $event = shift; return -1 unless defined $mouse_y_pos or ref $event eq 'Wx::MouseEvent'; my $ep = _ep_ref(); my $x = width($ep) + 5; # $mouse_y_pos is saved position where context menu poped so we can fold there my $y = defined $mouse_y_pos ? $mouse_y_pos : $event->GetY; my $max_y = $ep->GetSize->GetHeight; my $pos = $ep->PositionFromPointClose($x, $y); while ($pos < 0 and $y+10 < $max_y) { $pos = $ep->PositionFromPointClose($x, $y += 10); } return $ep->LineFromPosition($pos); } # # line number margin # sub line_number_visible{ _line_config->{visible} } sub switch_line_number { _line_config->{visible} ^= 1; apply_line_number_width() } sub apply_line_number_width { apply_line_number_width_here($_) for @{_all_ref()} } sub apply_line_number_width_here { my $ep = _ep_ref(shift); my $doc_nr = shift; $doc_nr = Kephra::Document::Data::nr_from_ep($ep) unless defined $doc_nr; my $config = _line_config(); my $char_width = Kephra::Document::Data::get_attribute('line_nr_margin_width', $doc_nr); if (not defined $char_width or not $char_width) { $char_width = needed_line_number_width($ep); Kephra::Document::Data::set_attribute ('line_nr_margin_width', $char_width, $doc_nr); } my $px_width = $config->{visible} ? $char_width * _edit_config()->{font}{size} : 0; $ep->SetMarginWidth( 1, $px_width ); if ($config->{autosize} and $config->{visible}) { Kephra::EventTable::add_call ('document.text.change', 'autosize_line_number', \&line_number_autosize_update); } else { Kephra::EventTable::del_call ('document.text.change', 'autosize_line_number'); } } sub set_line_number_width_here { my $width = shift; my $doc_nr = shift or Kephra::Document::Data::current_nr(); my $config = _line_config(); Kephra::Document::Data::set_attribute('line_nr_margin_width', $width, $doc_nr); Kephra::Document::Data::set_attribute('margin_linemax', 10 ** $width - 1, $doc_nr); apply_line_number_width_here( Kephra::Document::Data::_ep($doc_nr) ); } sub needed_line_number_width { my $width = length _ep_ref(shift)->GetLineCount; my $min = _line_config()->{min_width}; $width = $min if defined $min and $min and $min > $width; return $width; } sub autosize_line_number { my $ep = _ep_ref(shift); my $doc_nr = shift; $doc_nr = Kephra::Document::Data::nr_from_ep($ep) unless defined $doc_nr; my $config = _line_config(); return unless _line_config()->{autosize}; my $need = needed_line_number_width($ep); my $is = Kephra::Document::Data::get_attribute('line_nr_margin_width', $doc_nr); set_line_number_width_here($need, $doc_nr) if not defined $is or $need > $is; } sub line_number_autosize_update { my $line_max = Kephra::Document::Data::get_attribute('margin_linemax'); my $ep = _ep_ref(); autosize_line_number($ep) if $ep->GetLineCount > $line_max; } sub apply_line_number_color { apply_line_number_color_here($_) for @{_all_ref()} } sub apply_line_number_color_here { my $ep = _ep_ref(shift); my $config = _line_config(); my $color = \&Kephra::Config::color; $ep->StyleSetForeground(&Wx::wxSTC_STYLE_LINENUMBER,&$color($config->{fore_color})); $ep->StyleSetBackground(&Wx::wxSTC_STYLE_LINENUMBER,&$color($config->{back_color})); } # # marker margin # sub marker_visible { _marker_config->{visible} } sub show_marker { show_marker_here($_) for @{_all_ref()} } sub show_marker_here { my $ep = _ep_ref(shift); marker_visible() ? $ep->SetMarginWidth(0, 16) : $ep->SetMarginWidth(0, 0); } sub switch_marker { _marker_config->{visible} ^= 1; show_marker(); } # # fold margin # sub fold_visible { _fold_config()->{visible} } sub show_fold { show_fold_here($_) for @{_all_ref()} } sub show_fold_here { my $ep = _ep_ref(shift); my $visible = fold_visible(); my $width = $visible ? 16 : 0; $ep->SetProperty('fold' => $visible); $ep->SetMarginWidth( 2, $width ); Kephra::App::EditPanel::Fold::unfold_all() unless $visible; } sub switch_fold { _fold_config()->{visible} ^= 1; show_fold(); } sub apply_fold_flag_color { apply_text_width_here($_) for @{_all_ref()}; } sub apply_fold_flag_color_here { my $ep = _ep_ref(shift); my $color = Kephra::Config::color( _fold_config()->{fore_color} ); $ep->StyleSetForeground(&Wx::wxSTC_STYLE_DEFAULT, $color); } # # extra text margin # sub get_text_width { _config->{text} } sub set_text_width { _config->{text} = shift; apply_text_width(); } sub apply_text_width { apply_text_width_here($_) for @{_all_ref()} } sub apply_text_width_here { my $ep = _ep_ref(shift); my $width = get_text_width(); $ep->SetMargins( $width, $width ); } 1; #wxSTC_MARK_MINUS wxSTC_MARK_PLUS wxSTC_MARK_CIRCLE wxSTC_MARK_SHORTARROW #wxSTC_FOLDFLAG_LINEBEFORE_CONTRACTED =head1 NAME Kephra::App::EditPanel::Margin - managing margin visuals for marker, linenumber, folding & extra space =head1 DESCRIPTION =cutkephra-0.4.3.34+dfsg.orig/lib/Kephra/App/Panel/0000755000175000017500000000000012300715255020124 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/App/Panel/TreeTool.pm0000644000175000017500000000025711573643427022237 0ustar gregoagregoapackage Kephra::App::Panel::TreeTool; use strict; use warnings; our $VERSION = '0.01'; sub _config { Kephra::API::settings()->{app}{panel}{lib}} sub start{} 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/App/Panel/CommandLine.pm0000644000175000017500000000013311573643427022661 0ustar gregoagregoapackage Kephra::App::Panel::CommandLine; $VERSION = '0.00'; use strict; use warnings; 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/App/Panel/Output.pm0000644000175000017500000001434311573643427022003 0ustar gregoagregoapackage Kephra::App::Panel::Output; our $VERSION = '0.11'; use strict; use warnings; use Cwd(); use Wx qw(wxTheClipboard); use Wx::Perl::ProcessStream qw( EVT_WXP_PROCESS_STREAM_STDOUT EVT_WXP_PROCESS_STREAM_STDERR EVT_WXP_PROCESS_STREAM_EXIT ); use Wx::DND; my $output; my $proc; sub _ref { if (ref $_[0] eq 'Wx::TextCtrl') {$output = $_[0]} else {$output} } sub _config { Kephra::API::settings()->{app}{panel}{output} } sub _splitter { $Kephra::app{splitter}{bottom} } sub _process { $proc } sub is_process { 1 if ref $_[0] eq 'Wx::Perl::ProcessStream::Process' } sub create { my $win = Kephra::App::Window::_ref(); my $edit = Kephra::App::EditPanel::_ref(); my $output; if (_ref()) {$output = _ref()} else { $output = Wx::TextCtrl->new ($win, -1,'', [-1,-1], [-1,-1], &Wx::wxTE_READONLY|&Wx::wxTE_PROCESS_ENTER|&Wx::wxTE_MULTILINE|&Wx::wxTE_LEFT); } _ref($output); my $config = _config(); my $color = \&Kephra::Config::color; $output->SetForegroundColour( &$color( $config->{fore_color} ) ); $output->SetBackgroundColour( &$color( $config->{back_color} ) ); $output->SetFont( Wx::Font->new ($config->{font_size}, &Wx::wxFONTSTYLE_NORMAL, &Wx::wxNORMAL, &Wx::wxLIGHT, 0, $config->{font_family}) ); #$output->SetEditable(0); Kephra::EventTable::add_call('panel.output.run', 'panel_output', sub { }); Kephra::EventTable::add_call ( 'app.splitter.bottom.changed', 'panel_notepad', sub { if ( get_visibility() and not _splitter()->IsSplit() ) { show( 0 ); return; } save_size(); }); EVT_WXP_PROCESS_STREAM_STDOUT( $win, sub { my ($self, $event) = @_; $event->Skip(1); say( $event->GetLine ); } ); EVT_WXP_PROCESS_STREAM_STDERR( $win, sub { my ($self, $event) = @_; $event->Skip(1); say( $event->GetLine ); } ); EVT_WXP_PROCESS_STREAM_EXIT ( $win, sub { my ($self, $event) = @_; $event->Skip(1); $event->GetProcess->Destroy; Kephra::EventTable::trigger('panel.output.run'); } ); Wx::Event::EVT_LEFT_DOWN($output, sub { my ($op, $event) = @_; unless ($^O =~ /darwin/i) { my ($beside, $col, $row) = $op->HitTest( Wx::Point->new($event->GetX, $event->GetY) ); my ($begin, $end) = $op->GetSelection; if ($beside != &Wx::wxTE_HT_UNKNOWN and $begin != $end) { my $pos = $op->XYToPosition($col, $row); copy_selection() if $pos >= $begin and $pos <= $end; } } $event->Skip; }); Wx::Event::EVT_MIDDLE_DOWN($output, sub { my ($op, $event) = @_; Kephra::Edit::Search::set_find_item( $op->GetStringSelection() ); Kephra::Edit::Search::find_next(); }); Wx::Event::EVT_KEY_DOWN( $output, sub { my ( $op, $event ) = @_; my $key = $event->GetKeyCode; if ($key == &Wx::WXK_RETURN) { copy_selection(); } elsif ($key == &Wx::WXK_F12) { Kephra::App::Panel::Notepad::append( $output->GetStringSelection() ) if $event->ShiftDown; } }); $output->Show( get_visibility() ); $output; } sub get_visibility { _config()->{visible} } sub switch_visibility { show( get_visibility() ^ 1 ) } sub ensure_visibility { switch_visibility() unless get_visibility() } sub show { my $visibile = shift; my $config = _config(); $visibile = $config->{visible} unless defined $visibile; my $win = Kephra::App::Window::_ref(); my $cpanel = $Kephra::app{panel}{center}; my $output = _ref(); my $splitter = _splitter(); if ($visibile) { $splitter->SplitHorizontally( $cpanel, $output ); $splitter->SetSashPosition( -1*$config->{size}, 1); } else { $splitter->Unsplit(); $splitter->Initialize( $cpanel ); } $output->Show($visibile); $win->Layout; $config->{visible} = $visibile; Kephra::EventTable::trigger('panel.output.visible'); } sub save { save_size() } sub save_size { my $splitter = _splitter(); return unless $splitter->IsSplit(); my $wh=Kephra::App::Window::_ref()->GetSize->GetHeight; _config()->{size} = -1*($wh-($wh-$splitter->GetSashPosition)); } sub clear { _ref()->Clear; if (Wx::wxMAC()) {_ref()->SetFont ( Wx::Font->new(_config()->{font_size}, &Wx::wxFONTSTYLE_NORMAL, &Wx::wxNORMAL, &Wx::wxLIGHT, 0, _config()->{font_family}) )} } sub print { _ref()->AppendText( $_ ) for @_ } sub say { &print; _ref()->AppendText( "\n" ) } sub new_output { ensure_visibility(); _config()->{append} ? &print(_ref()->IsEmpty ? '' : "\n\n") : &clear(); &print( @_ ); } sub copy_selection { my $selection = _ref()->GetStringSelection(); return unless $selection; wxTheClipboard->Open; wxTheClipboard->SetData( Wx::TextDataObject->new( $selection ) ); wxTheClipboard->Close; } # sub display_inc { new_output('@INC:'."\n"); &say(" -$_") for @INC } sub display_env { new_output('%ENV:'."\n"); &say( " -$_:" . $ENV{$_} ) for sort keys %ENV; } sub display_selection_dec { my $selection = Kephra::Edit::get_selection(); return unless defined $selection and $selection; my @output = map { ' ' . $_ } unpack 'C*', $selection; new_output(@output); } sub display_selection_hex { my $selection = Kephra::Edit::get_selection(); return unless defined $selection and $selection; my @output = map { sprintf '%3X', $_ } unpack 'C*', $selection; new_output(@output); } # to be outsourced into interpreter plugin sub run { my $win = Kephra::App::Window::_ref(); my $doc = Kephra::Document::Data::get_file_path(); my $cmd = _config->{interpreter_path}; my $dir = Kephra::File::_dir(); Kephra::File::save(); if ($doc) { my $cwd = Cwd::cwd(); chdir $dir; my $proc = Wx::Perl::ProcessStream->OpenProcess (qq~"$cmd" "$doc"~ , 'Interpreter-Plugin', $win); # -I$dir chdir $cwd; new_output(); Kephra::EventTable::trigger('panel.output.run'); if (not $proc) {} } else { my $l18n = Kephra::Config::Localisation::strings()->{app}; Kephra::App::StatusBar::info_msg ($l18n->{menu}{document}.' '.$l18n->{general}{untitled}."\n" ); } } sub is_running { my $proc = _process(); $proc->IsAlive if is_process($proc); } sub stop { my $proc = _process(); if ( is_process($proc) ) { $proc->KillProcess; $proc->TerminateProcess; Kephra::EventTable::trigger('panel.output.run'); } } 1; =head1 NAME Kephra::App::Panel::Output - output panel =head1 DESCRIPTION =cutkephra-0.4.3.34+dfsg.orig/lib/Kephra/App/Panel/Notepad.pm0000644000175000017500000001231211573643427022067 0ustar gregoagregoapackage Kephra::App::Panel::Notepad; our $VERSION = '0.16'; use strict; use warnings; my $global_notepad; my $local_notepad; sub _global_ref { $global_notepad = ref $_[0] eq 'Wx::StyledTextCtrl' ? $_[0] : $global_notepad } sub _local_ref { $local_notepad = ref $_[0] eq 'Wx::StyledTextCtrl' ? $_[0] : $local_notepad } #document.current.number.changed sub _ref { _global_ref() } sub _local_splitter {} sub _config { Kephra::API::settings()->{app}{panel}{notepad} } sub _splitter{ $Kephra::app{splitter}{right} } sub create { my $win = Kephra::App::Window::_ref(); my $notepad; if ( _global_ref()) {$notepad = _global_ref()} else { my $color = \&Kephra::Config::color; my $indicator = Kephra::App::EditPanel::_config()->{indicator}; my $config = _config(); $notepad = Wx::StyledTextCtrl->new( $win, -1, [-1,-1], [-1,-1] ); $notepad->SetWrapMode(&Wx::wxSTC_WRAP_WORD); $notepad->SetScrollWidth(210); $notepad->SetMarginWidth(0,0); $notepad->SetMarginWidth(1,0); $notepad->SetMarginWidth(2,0); $notepad->SetMargins(3,3); $notepad->SetCaretPeriod( $indicator->{caret}{period} ); $notepad->SetCaretWidth( $indicator->{caret}{width} ); $notepad->SetCaretForeground( &$color( $indicator->{caret}{color} ) ); if ( $indicator->{selection}{fore_color} ne '-1' ) { $notepad->SetSelForeground ( 1, &$color( $indicator->{selection}{fore_color} ) ); } $notepad->SetSelBackground( 1, &$color( $indicator->{selection}{back_color})); $notepad->StyleSetFont( &Wx::wxSTC_STYLE_DEFAULT, Wx::Font->new (_config()->{font_size}, &Wx::wxDEFAULT, &Wx::wxNORMAL, &Wx::wxNORMAL, 0, _config()->{font_family}) ); $notepad->SetTabWidth(4); $notepad->SetIndent(4); $notepad->SetHighlightGuide(4); # load content my $file_name = $config->{content_file}; if ($file_name) { $file_name = Kephra::Config::filepath($file_name); if (-e $file_name){ open my $FILE, '<', $file_name; $notepad->AppendText( $_ ) while <$FILE>; } } } $notepad->Show( get_visibility() ); Wx::Event::EVT_KEY_DOWN( $notepad, sub { my ( $fi, $event ) = @_; my $key = $event->GetKeyCode; my $ep = Kephra::App::EditPanel::_ref(); if ($key == &Wx::WXK_ESCAPE ) { Wx::Window::SetFocus( $ep ); } elsif ($key == &Wx::WXK_UP ) { Kephra::Edit::selection_move_up($notepad) if $event->ControlDown and $event->AltDown; } elsif ($key == &Wx::WXK_DOWN){ Kephra::Edit::selection_move_down($notepad) if $event->ControlDown and $event->AltDown; } elsif ($key == &Wx::WXK_F3 ) { if ($event->ControlDown) { my $sel = $notepad->GetSelectedText; $event->ShiftDown ? Kephra::Edit::Search::set_replace_item($sel) : Kephra::Edit::Search::set_find_item($sel); } } elsif ($key == &Wx::WXK_F5) { my ( $sel_beg, $sel_end ) = $notepad->GetSelection; Kephra::App::Panel::Output::ensure_visibility(); my $code = $sel_beg == $sel_end ? $notepad->GetText : $notepad->GetSelectedText; my $result; my $interpreter = _config->{eval_with}; if (not defined $interpreter or $interpreter eq 'eval') { $result = eval $code; $result = $@ if $@; } else { $result = `$interpreter $code`; } Kephra::App::Panel::Output::say($result); } elsif ($key == &Wx::WXK_F12) { Wx::Window::SetFocus( $ep ); switch_visibility() if $event->ControlDown; } elsif ($key == 70 and $event->ControlDown) {# F Kephra::CommandList::run_cmd_by_id('view-searchbar-goto'); } $event->Skip; }); Kephra::EventTable::add_call( 'app.splitter.right.changed',__PACKAGE__,sub { if ( get_visibility() and not _splitter()->IsSplit() ) { show( 0 ); return; } save_size(); }); _global_ref($notepad); $notepad; } sub get_visibility { _config()->{visible} } sub switch_visibility { show( get_visibility() ^ 1 ) } sub show { my $visibile = shift; my $config = _config(); $visibile = $config->{visible} unless defined $visibile; my $win = Kephra::App::Window::_ref(); my $main_panel = $Kephra::app{panel}{main}; my $notepad = _ref(); my $splitter = _splitter(); if ($visibile) { $splitter->SplitVertically( $main_panel, $notepad ); $splitter->SetSashPosition( -1*$config->{size}, 1); } else { $splitter->Unsplit(); $splitter->Initialize( $main_panel ); } $notepad->Show( $visibile ); $win->Layout; $config->{visible} = $visibile; Kephra::EventTable::trigger('panel.notepad.visible'); } sub note { show( 1 ); Wx::Window::SetFocus( _ref() ); } sub append { my $text = shift; return unless defined $text and $text; my $np = _ref(); $text = "\n" . $text if $np->GetLength(); $np->AppendText( $text ); } sub append_selection { append( Kephra::Edit::get_selection() ) } sub save { my $file_name = _config()->{content_file}; if ($file_name) { $file_name = Kephra::Config::filepath($file_name); if (open my $FH, '>', $file_name) {print $FH _ref()->GetText;} } save_size(); } sub save_size { my $splitter = _splitter(); return unless $splitter->IsSplit(); my $ww=Kephra::App::Window::_ref()->GetSize->GetWidth; _config()->{size} = -1*($ww-($ww-$splitter->GetSashPosition)); } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/App/EditPanel.pm0000644000175000017500000003160711774655572021322 0ustar gregoagregoapackage Kephra::App::EditPanel; our $VERSION = '0.14'; use strict; use warnings; # # internal API to config und app pointer # my $ref; my %mouse_commands; sub _ref { $ref } sub _set_ref { $ref = $_[0] if is($_[0]) } sub _all_ref { Kephra::Document::Data::get_all_ep() } sub is { 1 if ref $_[0] eq 'Wx::StyledTextCtrl'} sub _config { Kephra::API::settings()->{editpanel} } # splitter_pos sub new { my $ep = Wx::StyledTextCtrl->new( Kephra::App::Window::_ref() ); $ep->DragAcceptFiles(1) if Wx::wxMSW(); return $ep; } sub gets_focus { Wx::Window::SetFocus( _ref() ) if is( _ref() ) } # general settings sub apply_settings_here { my $ep = shift || _ref() || _create(); return unless is($ep); my $conf = _config(); load_font($ep); # indicators: caret, selection, whitespaces... Kephra::App::EditPanel::Indicator::apply_all_here($ep); # Margins on left side Kephra::App::EditPanel::Margin::apply_settings_here($ep); #misc: scroll width, codepage, wordchars apply_autowrap_settings_here($ep); $ep->SetScrollWidth($conf->{scroll_width}) unless $conf->{scroll_width} eq 'auto'; #wxSTC_CP_UTF8 Wx::wxUNICODE() $ep->SetCodePage(65001);# set_word_chars_here($ep); # internal $ep->SetLayoutCache(&Wx::wxSTC_CACHE_PAGE); $ep->SetBufferedDraw(1); $conf->{contextmenu}{visible} eq 'default' ? $ep->UsePopUp(1) : $ep->UsePopUp(0); Kephra::Edit::eval_newline_sub(); Kephra::Edit::Marker::define_marker($ep); connect_events($ep); Kephra::EventTable::add_call ( 'editpanel.focus', 'editpanel', sub { Wx::Window::SetFocus( _ref() ) unless $Kephra::temp{dialog}{active}; }, __PACKAGE__ ) if $conf->{auto}{focus}; Kephra::EventTable::add_call( 'document.text.change', 'update_edit_pos', sub { Kephra::Document::Data::attr('edit_pos', _ref()->GetCurrentPos()); }, __PACKAGE__); } sub connect_events { my $ep = shift || _ref(); my $trigger = \&Kephra::EventTable::trigger; my $config = _config(); my $selection; my $rectangular_mode; my ($dragpos,$droppos); # override sci presets Wx::Event::EVT_DROP_FILES ($ep, \&Kephra::File::add_dropped); Wx::Event::EVT_STC_START_DRAG ($ep, -1, sub { my ( $ep, $event) = @_; $dragpos = $ep->GetCurrentPos(); $selection = $ep->GetSelectedText(); $rectangular_mode = $ep->SelectionIsRectangle(); $event->Skip; }); Wx::Event::EVT_STC_DRAG_OVER ($ep, -1, sub { $droppos = $_[1]->GetPosition }); Wx::Event::EVT_STC_DO_DROP ($ep, -1, sub { my ( $ep, $event) = @_; $rectangular_mode ? Kephra::Edit::paste_rectangular($selection, $ep, $dragpos, $droppos) : $event->Skip; }); Wx::Event::EVT_ENTER_WINDOW ($ep, sub { &$trigger('editpanel.focus')} ); Wx::Event::EVT_LEFT_DOWN ($ep, sub { my ($ep, $event) = @_; my $nr = Kephra::App::EditPanel::Margin::in_nr( $event->GetX, $ep ); if ($nr == -1) { Kephra::Edit::copy() if clicked_on_selection($event) } else { Kephra::App::EditPanel::Margin::on_left_click($ep, $event, $nr) } $event->Skip; }); Wx::Event::EVT_MIDDLE_DOWN ($ep, sub { my ($ep, $event) = @_; my $nr = Kephra::App::EditPanel::Margin::in_nr( $event->GetX, $ep ); # click is above text area if ($nr == -1) { if ($event->LeftIsDown){ Kephra::Edit::paste(); set_caret_on_cursor($event); } # just middle clicked else { if ($ep->GetSelectedText){ if (clicked_on_selection($event, $ep)) { Kephra::Edit::Search::set_selection_as_find_item(); Kephra::Edit::Search::find_next(); } else { insert_selection_at_cursor($event, $ep) } } else { Kephra::Edit::Goto::last_edit() } } } else { Kephra::App::EditPanel::Margin::on_middle_click($ep, $event, $nr) } }); Wx::Event::EVT_RIGHT_DOWN ($ep, sub { my ($ep, $event) = @_; my $nr = Kephra::App::EditPanel::Margin::in_nr( $event->GetX, $ep ); if ($nr == -1) { if ($event->LeftIsDown){ Kephra::Edit::_selection_left_to_right($ep) ? Kephra::Edit::cut() : Kephra::Edit::clear(); set_caret_on_cursor($event); } else { my $mconf = $config->{contextmenu}; if ($mconf->{visible} eq 'custom'){ my $menu_id = $ep->GetSelectedText ? $mconf->{ID_selection} : $mconf->{ID_normal}; my $menu = Kephra::App::ContextMenu::get($menu_id); $ep->PopupMenu($menu, $event->GetX, $event->GetY) if $menu; } } } else {Kephra::App::EditPanel::Margin::on_right_click($ep, $event, $nr)} }); #Wx::EVT_SET_FOCUS ($ep, sub {}); Wx::Event::EVT_STC_SAVEPOINTREACHED($ep, -1, \&Kephra::File::savepoint_reached); Wx::Event::EVT_STC_SAVEPOINTLEFT($ep, -1, \&Kephra::File::savepoint_left); # -DEP #Wx::Event::EVT_STC_MARGINCLICK ($ep, -1, \&Kephra::App::EditPanel::Margin::on_left_click); Wx::Event::EVT_STC_CHANGE ($ep, -1, sub {&$trigger('document.text.change')} ); Wx::Event::EVT_STC_UPDATEUI ($ep, -1, sub { my ( $ep, $event) = @_; my ( $sel_beg, $sel_end ) = $ep->GetSelection; my $is_sel = $sel_beg != $sel_end; my $was_sel = Kephra::Document::Data::attr('text_selected'); Kephra::Document::Data::attr('text_selected', $is_sel); &$trigger('document.text.select') if $is_sel xor $was_sel; &$trigger('caret.move'); }); Wx::Event::EVT_KEY_DOWN ($ep, sub { my ($ep, $event) = @_; #$ep = _ref(); my $key = $event->GetKeyCode + 1000 * ($event->ShiftDown + $event->ControlDown*2 + $event->AltDown*4); # reacting on shortkeys that are defined in the Commanlist #print "$key\n"; return if Kephra::CommandList::run_cmd_by_keycode($key); # reacting on Enter if ($key == &Wx::WXK_RETURN) { if ($config->{auto}{brace}{indention}) { my $pos = $ep->GetCurrentPos - 1; my $char = $ep->GetCharAt($pos); if ($char == 123) { return Kephra::Edit::Format::blockindent_open($pos); } elsif ($char == 125) { return Kephra::Edit::Format::blockindent_close($pos); } } $config->{auto}{indention} ? Kephra::Edit::Format::autoindent() : $ep->CmdKeyExecute(&Wx::wxSTC_CMD_NEWLINE) ; } # scintilla handles the rest of the shortkeys else { $event->Skip } #SCI_SETSELECTIONMODE #($key == 350){use Kephra::Ext::Perl::Syntax; Kephra::Ext::Perl::Syntax::check()}; }); } sub create_mouse_binding { my @cmd = qw(left-middle left-right left-selection middle middle-selected middle-selection ); if (_config()->{control}{use_mouse_function}) { my $config = _config()->{control}{mouse_function}; $mouse_commands{$_} = Kephra::Macro::create_from_cmd_list($config->{$_}) for @cmd } else { $mouse_commands{$_} = sub {} for @cmd } } sub set_caret_on_cursor { my $event = shift; my $ep = shift || _ref(); return unless ref $event eq 'Wx::MouseEvent' and is($ep); my $pos = cursor_2_caret_pos($event, $ep); $pos = $ep->GetCurrentPos() if $pos == -1; $ep->SetSelection( $pos, $pos ); } sub clicked_on_selection { my $event = shift; my $ep = shift || _ref(); return unless ref $event eq 'Wx::MouseEvent' and is($ep); my ($start, $end) = $ep->GetSelection(); my $pos = cursor_2_caret_pos($event, $ep); return 1 if $start != $end and $pos >= $start and $pos <= $end; } sub insert_selection_at_cursor { my $event = shift; my $ep = shift || _ref(); my $pos = cursor_2_caret_pos($event, $ep); Kephra::Edit::insert_text($ep->GetSelectedText(), $pos) if $pos > -1; } sub cursor_2_caret_pos { my $event = shift; my $ep = shift || _ref(); return -1 unless ref $event eq 'Wx::MouseEvent' and is($ep); my $pos = $ep->PositionFromPointClose($event->GetX, $event->GetY); if ($pos == -1) { my $width = Kephra::App::EditPanel::Margin::width($ep) + Kephra::App::EditPanel::Margin::get_text_width(); my $y = $event->GetY; my $line = $ep->LineFromPosition( $ep->PositionFromPointClose($width, $y) ); $pos = $ep->GetLineEndPosition ($line); my $font_size = _config()->{font}{size}; if ($line == 0 and $y > $font_size + 12) { my $lcc = 0; $pos = $ep->PositionFromPointClose($width-1, $y); while ($pos == -1 and $lcc < $ep->GetLineCount() ){ $lcc++; # line counter $y += $font_size; $pos = $ep->PositionFromPointClose($width, $y); } return -1 if $pos == -1; return $ep->PositionFromLine( $ep->LineFromPosition($pos) - $lcc ); } } $pos; } sub disconnect_events { my $ep = shift || _ref(); Wx::Event::EVT_STC_CHANGE ($ep, -1, sub {}); Wx::Event::EVT_STC_UPDATEUI($ep, -1, sub {}); } sub set_contextmenu_custom { set_contextmenu('custom') } sub set_contextmenu_default { set_contextmenu('default')} sub set_contextmenu_none { set_contextmenu('none') } sub set_contextmenu { my $mode = shift; $mode = 'custom' unless $mode; my $ep = _ref(); $mode eq 'default' ? $ep->UsePopUp(1) : $ep->UsePopUp(0); _config()->{contextmenu}{visible} = $mode; } sub get_contextmenu { _config()->{contextmenu}{visible} } # sub set_word_chars { set_word_chars_here($_) for @{_all_ref()} } sub set_word_chars_here { my $ep = shift || _ref(); my $conf = _config(); if ( $conf->{word_chars} ) { $ep->SetWordChars( $conf->{word_chars} ); } else { $ep->SetWordChars( '$%&-@_abcdefghijklmnopqrstuvwxyzäöüßABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ0123456789' ); } } # line wrap sub apply_autowrap_settings { apply_autowrap_settings_here($_) for @{_all_ref()} } sub apply_autowrap_settings_here { my $ep = shift || _ref(); $ep->SetWrapMode( _config()->{line_wrap} ); Kephra::EventTable::trigger('editpanel.autowrap'); } sub get_autowrap_mode { _config()->{line_wrap} == &Wx::wxSTC_WRAP_WORD} sub switch_autowrap_mode { _config()->{line_wrap} = get_autowrap_mode() ? &Wx::wxSTC_WRAP_NONE : &Wx::wxSTC_WRAP_WORD; apply_autowrap_settings(); } # font settings sub load_font { my $ep = shift || _ref(); my ( $fontweight, $fontstyle ) = ( &Wx::wxNORMAL, &Wx::wxNORMAL ); my $font = _config()->{font}; $fontweight = &Wx::wxLIGHT if $font->{weight} eq 'light'; $fontweight = &Wx::wxBOLD if $font->{weight} eq 'bold'; $fontstyle = &Wx::wxSLANT if $font->{style} eq 'slant'; $fontstyle = &Wx::wxITALIC if $font->{style} eq 'italic'; my $wx_font = Wx::Font->new( $font->{size}, &Wx::wxDEFAULT, $fontstyle, $fontweight, 0, $font->{family} ); $ep->StyleSetFont( &Wx::wxSTC_STYLE_DEFAULT, $wx_font ) if $wx_font->Ok > 0; } sub change_font { my ( $fontweight, $fontstyle ) = ( &Wx::wxNORMAL, &Wx::wxNORMAL ); my $font_config = _config()->{font}; $fontweight = &Wx::wxLIGHT if ( $$font_config{weight} eq 'light' ); $fontweight = &Wx::wxBOLD if ( $$font_config{weight} eq 'bold' ); $fontstyle = &Wx::wxSLANT if ( $$font_config{style} eq 'slant' ); $fontstyle = &Wx::wxITALIC if ( $$font_config{style} eq 'italic' ); my $oldfont = Wx::Font->new( $$font_config{size}, &Wx::wxDEFAULT, $fontstyle, $fontweight, 0, $$font_config{family} ); my $newfont = Kephra::Dialog::get_font( $oldfont ); if ( $newfont->Ok > 0 ) { ($fontweight, $fontstyle) = ($newfont->GetWeight, $newfont->GetStyle); $$font_config{size} = $newfont->GetPointSize; $$font_config{family} = $newfont->GetFaceName; $$font_config{weight} = 'normal'; $$font_config{weight} = 'light' if $fontweight == &Wx::wxLIGHT; $$font_config{weight} = 'bold' if $fontweight == &Wx::wxBOLD; $$font_config{style} = 'normal'; $$font_config{style} = 'slant' if $fontstyle == &Wx::wxSLANT; $$font_config{style} = 'italic' if $fontstyle == &Wx::wxITALIC; Kephra::Document::SyntaxMode::reload($_) for @{Kephra::Document::Data::all_nr()}; Kephra::App::EditPanel::Margin::apply_line_number_width(); } } # sub zoom_in { my $ep = shift || _ref(); $ep->SetZoom( $ep->GetZoom()+1 ) if $ep->GetZoom() < 45; } sub zoom_out { my $ep = shift || _ref(); $ep->SetZoom( $ep->GetZoom()-1 ) if $ep->GetZoom() > -10; } sub zoom_normal { my $ep = shift || _ref(); $ep->SetZoom( 0 ) ; } # # auto indention sub get_autoindention { Kephra::App::EditPanel::_config()->{auto}{indention} } sub set_autoindention { Kephra::App::EditPanel::_config()->{auto}{indention} = shift; Kephra::Edit::eval_newline_sub(); } sub switch_autoindention { set_autoindention( get_autoindention() ^ 1 ) } sub set_autoindent_on { set_autoindention( 1 ) } sub set_autoindent_off { set_autoindention( 0 ) } # # brace indention sub get_braceindention { Kephra::App::EditPanel::_config()->{auto}{brace}{indention}} sub set_braceindention { Kephra::App::EditPanel::_config()->{auto}{brace}{indention} = shift; Kephra::Edit::eval_newline_sub(); } sub switch_braceindention { set_braceindention( get_braceindention() ^ 1 ) } sub set_braceindent_on { set_braceindention( 1 ) } sub set_braceindent_off { set_braceindention( 0 ) } # # sub get_bracecompletion { Kephra::App::EditPanel::_config()->{auto}{brace}{make} } sub set_bracecompletion { Kephra::App::EditPanel::_config()->{auto}{brace}{make} = shift; } sub switch_bracecompletion{ set_bracecompletion( get_bracecompletion() ^ 1 ) } 1; #EVT_STC_CHARADDED EVT_STC_MODIFIED #wxSTC_CP_UTF8 wxSTC_CP_UTF16 Wx::wxUNICODE() #wxSTC_WS_INVISIBLE wxSTC_WS_VISIBLEALWAYS #$ep->StyleSetForeground (wxSTC_STYLE_CONTROLCHAR, Wx::Colour->new(0x55, 0x55, 0x55)); #$ep->CallTipShow(3,"testtooltip\n next line"); #tips #SetSelectionMode(wxSTC_SEL_RECTANGLE); kephra-0.4.3.34+dfsg.orig/lib/Kephra/Plugin/0000755000175000017500000000000012300715224017577 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/Plugin/Demo.pm0000644000175000017500000000071311573643437021043 0ustar gregoagregoapackage Kephra::Plugin::Demo; use strict; use warnings; our $VERSION = '0.01'; ################################################# # Demoplugin as an tutorial for plugin authors ################################################# our $commands = { 'open' => { call => 'show_dialog()', label => 'Demo Plugin', key => 'alt+shift+D', icon => '', menu => 'OWN', } }; sub init { } sub start { } sub show_dialog { } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Help.pm0000644000175000017500000000261211573643454017610 0ustar gregoagregoapackage Kephra::Help; our $VERSION = '0.04'; use strict; use warnings; my $dir; sub _dir { if (defined $_[0]) {$dir = $_[0]} else {$dir} } sub _hf { Kephra::Document::add ( File::Spec->catfile( $dir, shift ) ) } sub _config { Kephra::API::settings()->{texts} } sub welcome { _hf _config()->{welcome}} sub version_text { _hf _config()->{version}} sub licence_gpl { _hf _config()->{license}} sub feature_tour { _hf _config()->{feature}} sub advanced_tour { _hf _config()->{special}} sub navigation_guide { _hf _config()->{navigation}} sub credits { _hf _config()->{credits}} sub keyboard_map { _hf _config()->{keymap}} sub _web_page { Wx::LaunchDefaultBrowser( $_[0] ) } sub _lang { lc Kephra::Config::Localisation::language() } sub online_documentation { my $url = _lang() eq 'deutsch' ? 'http://kephra.sourceforge.net/site/de/documentation.shtml' : 'http://kephra.sourceforge.net/site/en/documentation.shtml'; _web_page($url); } sub forum_site { my $url = _lang() eq 'deutsch' ? 'http://www.perl-community.de/bat/poard/start' : 'http://www.perlmonks.org'; _web_page($url); } sub bug_tracker { _web_page('http://sourceforge.net/tracker/?func=add&group_id=169747&atid=851590') } sub feature_wish { _web_page('http://sourceforge.net/tracker/?func=add&group_id=169747&atid=851593') } 1;kephra-0.4.3.34+dfsg.orig/lib/Kephra/Config/0000755000175000017500000000000012300715247017553 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/Config/Tree.pm0000644000175000017500000000731011573643450021020 0ustar gregoagregoapackage Kephra::Config::Tree; our $VERSION = '0.02'; =head1 NAME Kephra::Config::Tree - manipulation of config data =head1 DESCRIPTION =cut use strict; use warnings; # # single node manipulation # sub _convert_node_2_AoH { my $node = shift; if (ref $$node eq 'ARRAY') { return $$node if ref $$node->[0] eq 'HASH'; } elsif (ref $$node eq 'HASH') { my %temp_hash = %{$$node}; push( my @temp_array, \%temp_hash ); return $$node = \@temp_array; } elsif (not ref $$node) { my @temp_array = (); return $$node = \@temp_array; } } sub _convert_node_2_AoS { my $node = shift; if (ref $$node eq 'ARRAY') { return $$node; } elsif ( 'SCALAR' eq ref $node ) { if ($$node) { push( my @temp_array, $$node ); return $$node = \@temp_array; } else { my @temp_array = (); return $$node = \@temp_array; } } } # # single node manipulation # sub get_subtree { &subtree } sub subtree { my $config = shift; return unless ref $config; my $path = shift; for (split '/', $path) { $config = $config->{$_} if defined $config->{$_}; } return $config; } sub flat_keys { my $config = shift; return unless ref $config eq 'HASH'; my %flathash; for ( keys %$config ){ } } #sub _parse_and_copy_node { #my ($parent_node, $parent_id) = @_; #no strict; #for ( keys %$parent_node ){ #$cmd_id = $parent_id . $_; #$leaf_type = ref $parent_node->{$_}; #if (not $leaf_type) { #$list{$cmd_id}{$target_leafe} = $parent_node->{$_} #if $parent_node->{$_}; #} elsif ($leaf_type eq 'HASH'){ #_parse_and_copy_node($parent_node->{$_}, $cmd_id . '-') #} # # tree operations # my %copy = ( '' => sub { $_[0] }, SCALAR => sub { \${$_[0]} }, REF => sub { \copy( ${$_[0]} ) }, ARRAY => sub { [map {copy($_)} @{$_[0]} ] }, HASH => sub { my %copy = map { copy($_) } %{$_[0]}; \%copy; }, ); my %merge = ( '' => sub { $_[0] }, SCALAR => sub { \${$_[0]} }, REF => sub { \merge( ${$_[0]}, ${$_[1]} ) }, ARRAY => sub { [map { copy($_) } ( @{$_[0]}, @{$_[1]} ) ] }, HASH => sub { my %copy = map { $_, merge( $_[0]{$_}, $_[1]{$_} ) } (keys %{$_[0]}, keys %{$_[1]} ); \%copy; }, ); my %update = ( '' => sub { $_[1] }, SCALAR => sub { \${$_[1]} }, REF => sub { \update( ${$_[0]}, ${$_[1]} ) }, ARRAY => sub { [map { copy($_) } ( @{$_[1]} ) ] }, HASH => sub { my %copy = map { $_, exists $_[1]{$_} ? update( $_[0]{$_}, $_[1]{$_} ) : copy( $_[0]{$_} ) } keys %{$_[0]} ; \%copy; }, ); my %diff = ( '' => sub { $_[0] ne $_[1] ? $_[0] : undef }, SCALAR => sub { ${$_[0]} ne ${$_[1]} ? \${$_[0]} : undef }, REF => sub { my $diff = diff( ${$_[0]}, ${$_[1]} ); defined $diff ? \$diff : undef }, ARRAY => sub { [map { copy($_) } @{$_[0]} ] }, HASH => sub { my %diff; for ( keys %{$_[0]} ) { my $diff = exists $_[1]{$_} ? diff( $_[0]{$_}, $_[1]{$_} ) : copy( $_[0]{$_} ) ; $diff{$_} = $diff if defined $diff; } return scalar keys %diff > 0 ? \%diff : undef; }, ); sub copy { $copy{ ref $_[0] }( $_[0] ) } sub merge { my ($lref, $rref) = (ref $_[0], ref $_[1]); $lref eq $rref ? $merge{ $lref }( $_[0], $_[1] ) : defined $_[0] ? $copy{ $lref }( $_[0] ) : $copy{ $rref }( $_[1] ) ; } sub update { # left dictates the content, right the structure my ($lref, $rref) = (ref $_[0], ref $_[1]); $lref eq $rref ? $update{ $lref }( $_[0], $_[1] ) : $copy{ $rref }( $_[0] ) ; } sub diff { my ($lref, $rref) = (ref $_[0], ref $_[1]); $lref eq $rref ? $diff{ $lref }( $_[0], $_[1] ) : $copy{ $lref }( $_[0] ) # undef ; } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Config/Default/0000755000175000017500000000000012300715251021132 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/Config/Default/CommandList.pm0000644000175000017500000012464411573643450023731 0ustar gregoagregoapackage Kephra::Config::Default::CommandList; our $VERSION = '0.05'; use strict; use warnings; sub get { return { call => { app => { exit => 'Kephra::App::exit()', 'exit-unsaved' => 'Kephra::App::exit_unsaved()', }, file => { new => 'Kephra::File::new()', open => 'Kephra::File::open()', 'open-dir' => 'Kephra::File::open_all_of_dir()', reload => 'Kephra::File::reload_current()', 'reload-all' => 'Kephra::File::reload_all()', insert => 'Kephra::File::insert()', save => { current => 'Kephra::File::save_current()', all => 'Kephra::File::save_all()', as => 'Kephra::File::save_as()', 'copy-as' => 'Kephra::File::save_copy_as()', }, rename => 'Kephra::File::rename()', print => 'Kephra::File::print()', close => { current => 'Kephra::File::close()', all => 'Kephra::File::close_all()', other => 'Kephra::File::close_other()', unsaved => 'Kephra::File::close_unsaved()', 'all-unsaved' => 'Kephra::File::close_all_unsaved()', 'other-unsaved' => 'Kephra::File::close_other_unsaved()', }, session => { open => 'Kephra::File::Session::restore_from()', add => 'Kephra::File::Session::add_from()', save => 'Kephra::File::Session::save_as()', import => 'Kephra::File::Session::import_scite()', export => 'Kephra::File::Session::export_scite()', 'backup-open' => 'Kephra::File::Session::load_backup()', 'backup-save' => 'Kephra::File::Session::save_backup()', 'history-open-all' => 'Kephra::File::History::open_all()', }, }, edit => { changes => { undo => 'Kephra::Edit::History::undo()', redo => 'Kephra::Edit::History::redo()', 'undo-several' => 'Kephra::Edit::History::undo_several()', 'redo-several' => 'Kephra::Edit::History::redo_several()', 'goto-begin' => 'Kephra::Edit::History::undo_begin()', 'goto-end' => 'Kephra::Edit::History::redo_end()', delete => 'Kephra::Edit::History::clear_history()', }, cut => 'Kephra::Edit::cut()', copy => 'Kephra::Edit::copy()', paste => 'Kephra::Edit::paste()', replace => 'Kephra::Edit::replace()', delete => 'Kephra::Edit::clear()', 'delete-tab' => 'Kephra::Edit::del_back_tab()', line => { cut => 'Kephra::Edit::cut_current_line()', copy => 'Kephra::Edit::copy_current_line()', duplicate => 'Kephra::Edit::double_current_line()', replace => 'Kephra::Edit::replace_current_line()', delete => 'Kephra::Edit::del_current_line()', 'delete-left' => 'Kephra::Edit::del_line_left()', 'delete-right' => 'Kephra::Edit::del_line_right()', move => { 'line-up' => 'Kephra::Edit::selection_move_up()', 'line-down' => 'Kephra::Edit::selection_move_down()', 'page-up' => 'Kephra::Edit::selection_move_page_up()', 'page-down' => 'Kephra::Edit::selection_move_page_down()', } }, selection => { convert => { uppercase => 'Kephra::Edit::Convert::upper_case()', lowercase => 'Kephra::Edit::Convert::lower_case()', titlecase => 'Kephra::Edit::Convert::title_case()', sentencecase => 'Kephra::Edit::Convert::sentence_case()', spaces2tabs => 'Kephra::Edit::Convert::spaces2tabs()', tabs2spaces => 'Kephra::Edit::Convert::tabs2spaces()', spaces2entities => 'Kephra::Edit::Convert::spaces2entities()', entities2spaces => 'Kephra::Edit::Convert::entities2spaces()', chars2entities => 'Kephra::Edit::Convert::chars2entities()', entities2chars => 'Kephra::Edit::Convert::entities2chars()', }, comment => { 'add-perl' => "Kephra::Edit::Comment::add_script()", 'del-perl' => "Kephra::Edit::Comment::sub_script()", 'toggle-perl' => "Kephra::Edit::Comment::toggle_script()", 'add-c' => "Kephra::Edit::Comment::add_c( )", 'del-c' => "Kephra::Edit::Comment::sub_c( )", 'add-xml' => "Kephra::Edit::Comment::add_xml( )", 'del-xml' => "Kephra::Edit::Comment::remove_xml( )", }, format => { 'align-on-begin' => 'Kephra::Edit::Format::align_indent()', 'block-on-right-margin' => 'Kephra::Edit::Format::blockformat_LLI()', 'block-on-width' => 'Kephra::Edit::Format::blockformat_custom()', 'linewrap-on-right-margin' => 'Kephra::Edit::Format::linebreak_LLI()', 'linewrap-on-width' => 'Kephra::Edit::Format::linebreak_custom()', 'indent-char' => 'Kephra::Edit::Format::indent_space()', 'dedent-char' => 'Kephra::Edit::Format::dedent_space()', 'indent-tab' => 'Kephra::Edit::Format::indent_tab()', 'dedent-tab' => 'Kephra::Edit::Format::dedent_tab()', 'del-trailing-whitespace' => 'Kephra::Edit::Format::del_trailing_spaces()', 'join-lines' => 'Kephra::Edit::Format::join_lines()', }, move => { 'char-left' => 'Kephra::Edit::selection_move_left()', 'char-right' => 'Kephra::Edit::selection_move_right()', 'line-up' => 'Kephra::Edit::selection_move_up()', 'line-down' => 'Kephra::Edit::selection_move_down()', 'page-up' => 'Kephra::Edit::selection_move_page_up()', 'page-down' => 'Kephra::Edit::selection_move_page_down()', }, }, document => { convert => { indent2spaces => 'Kephra::Document::convert_indent2spaces()', indent2tabs => 'Kephra::Document::convert_indent2tabs()', spaces2tabs => 'Kephra::Document::convert_spaces2tabs()', tabs2spaces => 'Kephra::Document::convert_tabs2spaces()', }, format => { 'del-trailing-whitespace' => 'Kephra::Document::del_trailing_spaces()', }, }, }, select => { document => 'Kephra::Edit::Select::document()', 'toggle-simple' => 'Kephra::Edit::Select::toggle_simple()', 'toggle-content' => 'Kephra::Edit::Select::toggle_content()', 'to-block-begin' => 'Kephra::Edit::Select::to_block_begin()', 'to-block-end' => 'Kephra::Edit::Select::to_block_end()', }, search => { attribute => { 'autowrap-switch' => "Kephra::Edit::Search::switch_attribute('auto_wrap')", 'incremental-switch' => "Kephra::Edit::Search::switch_attribute('incremental')", 'regex-switch' => "Kephra::Edit::Search::switch_attribute('match_regex')", match => { 'case-switch' => "Kephra::Edit::Search::switch_attribute('match_case')", 'whole-word-switch' => "Kephra::Edit::Search::switch_attribute('match_whole_word')", 'word-begin-switch' => "Kephra::Edit::Search::switch_attribute('match_word_begin')", }, }, range => { selection => "Kephra::Edit::Search::set_range('selection')", document => "Kephra::Edit::Search::set_range('document')", 'open-docs' => "Kephra::Edit::Search::set_range('open_docs')", }, }, find => { prev => 'Kephra::Edit::Search::find_prev()', next => 'Kephra::Edit::Search::find_next()', first => 'Kephra::Edit::Search::find_first()', last => 'Kephra::Edit::Search::find_last()', selection => 'Kephra::Edit::Search::set_selection_as_find_item()', }, replace => { prev => 'Kephra::Edit::Search::replace_back()', next => 'Kephra::Edit::Search::replace_fore()', all => 'Kephra::Edit::Search::replace_all()', 'with-confirm' => 'Kephra::Edit::Search::replace_confirm()', selection => 'Kephra::Edit::Search::set_selection_as_replace_item()', }, goto => { block => { down => 'Kephra::Edit::Goto::next_block()', up => 'Kephra::Edit::Goto::prev_block()', }, brace => { down => 'Kephra::Edit::Goto::next_related_brace()', left => 'Kephra::Edit::Goto::prev_brace()', right => 'Kephra::Edit::Goto::next_brace()', up => 'Kephra::Edit::Goto::prev_related_brace()', }, 'last-edit' => 'Kephra::Edit::Goto::last_edit()', line => 'Kephra::Edit::Goto::line()', }, bookmark => { goto => { 1 => 'Kephra::Edit::Marker::goto_bookmark(1)', 2 => 'Kephra::Edit::Marker::goto_bookmark(2)', 3 => 'Kephra::Edit::Marker::goto_bookmark(3)', 4 => 'Kephra::Edit::Marker::goto_bookmark(4)', 5 => 'Kephra::Edit::Marker::goto_bookmark(5)', 6 => 'Kephra::Edit::Marker::goto_bookmark(6)', 7 => 'Kephra::Edit::Marker::goto_bookmark(7)', 8 => 'Kephra::Edit::Marker::goto_bookmark(8)', 9 => 'Kephra::Edit::Marker::goto_bookmark(9)', 0 => 'Kephra::Edit::Marker::goto_bookmark(0)', }, toggle => { 1 => 'Kephra::Edit::Marker::toggle_bookmark(1)', 2 => 'Kephra::Edit::Marker::toggle_bookmark(2)', 3 => 'Kephra::Edit::Marker::toggle_bookmark(3)', 4 => 'Kephra::Edit::Marker::toggle_bookmark(4)', 5 => 'Kephra::Edit::Marker::toggle_bookmark(5)', 6 => 'Kephra::Edit::Marker::toggle_bookmark(6)', 7 => 'Kephra::Edit::Marker::toggle_bookmark(7)', 8 => 'Kephra::Edit::Marker::toggle_bookmark(8)', 9 => 'Kephra::Edit::Marker::toggle_bookmark(9)', 0 => 'Kephra::Edit::Marker::toggle_bookmark(0)', }, 'delete-doc' => 'Kephra::Edit::Marker::delete_all_bookmarks_in_doc()', 'delete-all' => 'Kephra::Edit::Marker::delete_all_bookmarks()', }, marker => { 'goto-prev-doc' => 'Kephra::Edit::Marker::goto_prev_marker_in_doc()', 'goto-next-doc' => 'Kephra::Edit::Marker::goto_next_marker_in_doc()', 'goto-prev-all' => 'Kephra::Edit::Marker::goto_prev_marker()', 'goto-next-all' => 'Kephra::Edit::Marker::goto_next_marker()', 'toggle-here' => '&Kephra::Edit::Marker::toggle_marker', 'delete-doc' => 'Kephra::Edit::Marker::delete_all_marker_in_doc()', 'delete-all' => 'Kephra::Edit::Marker::delete_all_marker()', }, tool => { 'interpreter-run-document' => 'Kephra::App::Panel::Output::run()', 'interpreter-stop-document' => 'Kephra::App::Panel::Output::stop()', 'output' => { 'inc' => 'Kephra::App::Panel::Output::display_inc()', 'env' => 'Kephra::App::Panel::Output::display_env()', 'selection-dec' => 'Kephra::App::Panel::Output::display_selection_dec()', 'selection-hex' => 'Kephra::App::Panel::Output::display_selection_hex()', }, note => 'Kephra::App::Panel::Notepad::note()', 'note-selection' => 'Kephra::App::Panel::Notepad::append_selection()', 'choose-color' => 'Kephra::Dialog::choose_color()', 'insert-time-date' => 'Kephra::Edit::::Special::insert_time_date()', perl => { 'insert-last-var' => 'Kephra::Edit::::Special::insert_last_perl_var()', 'copy-string' => 'Kephra::Edit::::Special::copy_surrounding_string()', }, 'auto-indention' => 'Kephra::App::EditPanel::switch_autoindention()', 'brace-indention' => 'Kephra::App::EditPanel::switch_braceindention()', 'brace-completion' => 'Kephra::App::EditPanel::switch_bracecompletion()', }, document => { 'auto-indention' => 'Kephra::Document::Property::switch_autoindention()', 'brace-indention' => 'Kephra::Document::Property::switch_braceindention()', change => { back => 'Kephra::Document::Change::switch_back()', prev => 'Kephra::Document::Change::tab_left()', next => 'Kephra::Document::Change::tab_right()', }, EOL => { 'auto' => "Kephra::Document::Property::convert_EOL('auto')", 'cr+lf' => "Kephra::Document::Property::convert_EOL('cr+lf')", cr => "Kephra::Document::Property::convert_EOL('cr')", lf => "Kephra::Document::Property::convert_EOL('lf')", }, encoding => { 'ascii' => "Kephra::Document::Property::set_codepage('ascii')", 'latin1' => "Kephra::Document::Property::set_codepage('latin1')", 'utf8' => "Kephra::Document::Property::set_codepage('utf8')", }, move => { left => 'Kephra::Document::Change::move_left()', right => 'Kephra::Document::Change::move_right()', }, readonly => { 'as-attr' => "Kephra::Document::Property::set_readonly('protect')", on => "Kephra::Document::Property::set_readonly('on')", off => "Kephra::Document::Property::set_readonly('off')", }, syntaxmode => { auto => "Kephra::Document::SyntaxMode::set('auto')", none => "Kephra::Document::SyntaxMode::set('none')", ada => "Kephra::Document::SyntaxMode::set('ada')", as => "Kephra::Document::SyntaxMode::set('as')", asm => "Kephra::Document::SyntaxMode::set('asm')", ave => "Kephra::Document::SyntaxMode::set('ave')", baan => "Kephra::Document::SyntaxMode::set('baan')", batch => "Kephra::Document::SyntaxMode::set('batch')", c => "Kephra::Document::SyntaxMode::set('cpp')", conf => "Kephra::Document::SyntaxMode::set('conf')", context => "Kephra::Document::SyntaxMode::set('context')", cs => "Kephra::Document::SyntaxMode::set('cs')", css => "Kephra::Document::SyntaxMode::set('css')", diff => "Kephra::Document::SyntaxMode::set('diff')", eiffel => "Kephra::Document::SyntaxMode::set('eiffel')", err => "Kephra::Document::SyntaxMode::set('err')", forth => "Kephra::Document::SyntaxMode::set('forth')", fortran => "Kephra::Document::SyntaxMode::set('fortran')", html => "Kephra::Document::SyntaxMode::set('html')", idl => "Kephra::Document::SyntaxMode::set('idl')", java => "Kephra::Document::SyntaxMode::set('java')", js => "Kephra::Document::SyntaxMode::set('js')", latex => "Kephra::Document::SyntaxMode::set('latex')", lisp => "Kephra::Document::SyntaxMode::set('lisp')", lua => "Kephra::Document::SyntaxMode::set('lua')", make => "Kephra::Document::SyntaxMode::set('make')", matlab => "Kephra::Document::SyntaxMode::set('matlab')", nsis => "Kephra::Document::SyntaxMode::set('nsis')", pascal => "Kephra::Document::SyntaxMode::set('pascal')", perl => "Kephra::Document::SyntaxMode::set('perl')", php => "Kephra::Document::SyntaxMode::set('php')", property => "Kephra::Document::SyntaxMode::set('property')", ps => "Kephra::Document::SyntaxMode::set('ps')", python => "Kephra::Document::SyntaxMode::set('python')", ruby => "Kephra::Document::SyntaxMode::set('ruby')", scheme => "Kephra::Document::SyntaxMode::set('scheme')", sh => "Kephra::Document::SyntaxMode::set('sh')", sql => "Kephra::Document::SyntaxMode::set('sql')", tcl => "Kephra::Document::SyntaxMode::set('tcl')", tex => "Kephra::Document::SyntaxMode::set('tex')", vb => "Kephra::Document::SyntaxMode::set('vb')", vbs => "Kephra::Document::SyntaxMode::set('vbs')", xml => "Kephra::Document::SyntaxMode::set('xml')", yaml => "Kephra::Document::SyntaxMode::set('yaml')", }, tabs => { hard => 'Kephra::Document::Property::set_tabs_hard()', soft => 'Kephra::Document::Property::set_tabs_soft()', use => 'Kephra::Document::Property::switch_tab_mode()', width => { 1 => 'Kephra::Document::Property::set_tab_size(1)', 2 => 'Kephra::Document::Property::set_tab_size(2)', 3 => 'Kephra::Document::Property::set_tab_size(3)', 4 => 'Kephra::Document::Property::set_tab_size(4)', 5 => 'Kephra::Document::Property::set_tab_size(5)', 6 => 'Kephra::Document::Property::set_tab_size(6)', 8 => 'Kephra::Document::Property::set_tab_size(8)', }, }, }, view => { dialog => { config => 'Kephra::Dialog::config()', find => 'Kephra::Dialog::find()', replace => 'Kephra::Dialog::replace()', info => 'Kephra::Dialog::info()', keymap => 'Kephra::Help::keyboard_map()', }, documentation => { 'advanced-tour' => 'Kephra::Help::advanced_tour()', credits => 'Kephra::Help::credits()', 'feature-list' => 'Kephra::Help::feature_tour()', 'navigation-guide' => 'Kephra::Help::navigation_guide', welcome => 'Kephra::Help::welcome()', 'this-version' => 'Kephra::Help::version_text()', }, editpanel => { contextmenu => { custom => "Kephra::App::EditPanel::set_contextmenu('custom')", no => "Kephra::App::EditPanel::set_contextmenu('none')", default => "Kephra::App::EditPanel::set_contextmenu('default')", }, indicator => { EOL => 'Kephra::App::EditPanel::Indicator::switch_EOL_visibility()', 'brace-light' => 'Kephra::App::EditPanel::Indicator::switch_bracelight()', 'caret-line' => 'Kephra::App::EditPanel::Indicator::switch_caret_line_visibility()', 'indention-guide' => 'Kephra::App::EditPanel::Indicator::switch_indention_guide_visibility()', 'right-margin' => 'Kephra::App::EditPanel::Indicator::switch_LLI_visibility()', whitespace => 'Kephra::App::EditPanel::Indicator::switch_whitespace_visibility()', }, font => 'Kephra::App::EditPanel::change_font()', 'line-wrap' => 'Kephra::App::EditPanel::switch_autowrap_mode()', margin => { contexmenu => 'Kephra::App::EditPanel::Margin::switch_contextmenu_visibility()', 'line-number' => 'Kephra::App::EditPanel::Margin::switch_line_number()', marker => 'Kephra::App::EditPanel::Margin::switch_marker()', 'text-fold' => 'Kephra::App::EditPanel::Margin::switch_fold()', text => { 0 => 'Kephra::App::EditPanel::Margin::set_text_width(0)', 1 => 'Kephra::App::EditPanel::Margin::set_text_width(1)', 2 => 'Kephra::App::EditPanel::Margin::set_text_width(2)', 3 => 'Kephra::App::EditPanel::Margin::set_text_width(3)', 4 => 'Kephra::App::EditPanel::Margin::set_text_width(4)', 6 => 'Kephra::App::EditPanel::Margin::set_text_width(6)', 8 => 'Kephra::App::EditPanel::Margin::set_text_width(8)', 10 => 'Kephra::App::EditPanel::Margin::set_text_width(10)', 12 => 'Kephra::App::EditPanel::Margin::set_text_width(12)', }, }, 'fold-toggle' => { all => 'Kephra::App::EditPanel::Fold::toggle_all()', here => 'Kephra::App::EditPanel::Fold::toggle_here()', level => 'Kephra::App::EditPanel::Fold::toggle_level()', recursively => 'Kephra::App::EditPanel::Fold::toggle_recursively()', }, maximize => 'Kephra::App::Window::switch_max_editpanel_mode()', zoom => { in => 'Kephra::App::EditPanel::zoom_in()', normal => 'Kephra::App::EditPanel::zoom_normal()', out => 'Kephra::App::EditPanel::zoom_out()', }, }, panel => { notepad => 'Kephra::App::Panel::Notepad::switch_visibility()', output => 'Kephra::App::Panel::Output::switch_visibility()', }, menubar => 'Kephra::App::MenuBar::switch_visibility()', searchbar => 'Kephra::App::SearchBar::switch_visibility()', 'searchbar-goto' => 'Kephra::App::SearchBar::enter_focus()', 'searchbar-contexmenu' => 'Kephra::App::SearchBar::switch_contextmenu_visibility()', statusbar => 'Kephra::App::StatusBar::switch_visibility()', 'statusbar-contexmenu' => 'Kephra::App::StatusBar::switch_contextmenu_visibility()', 'statusbar-info' => { date => "Kephra::App::StatusBar::set_info_msg_nr(2)", length => "Kephra::App::StatusBar::set_info_msg_nr(1)", none => "Kephra::App::StatusBar::set_info_msg_nr('0')", }, tabbar => 'Kephra::App::TabBar::switch_visibility()', 'tabbar-contexmenu' => 'Kephra::App::TabBar::switch_contextmenu_visibility()', toolbar => 'Kephra::App::MainToolBar::switch_visibility()', webpage => { 'bug-tracker' => 'Kephra::Help::bug_tracker()', documentation => 'Kephra::Help::online_documentation()', 'feature-wish' => 'Kephra::Help::feature_wish()', forum => 'Kephra::Help::forum_site()', }, window => { fullscreen => 'Kephra::App::Window::switch_fullscreen_mode()', restore => 'Kephra::App::Window::restore_normal_mode()', 'stay-on-top' => 'Kephra::App::Window::switch_on_top_mode()', transparent => 'Kephra::App::Window::switch_transparency_mode()', 'top-transparent' => 'Kephra::App::Window::switch_top_and_transparency_mode()', }, }, config => { file => { global => { open => 'Kephra::Config::Global::open_current_file()', reload => 'Kephra::Config::Global::reload_current()', 'load-from' => 'Kephra::Config::Global::load_from()', 'load-backup' => 'Kephra::Config::Global::load_backup_file()', 'load-defaults' => 'Kephra::Config::Global::load_defaults()', merge => 'Kephra::Config::Global::merge_with()', save => 'Kephra::Config::Global::save()', 'save-as' => 'Kephra::Config::Global::save_as()', }, interface => { commandlist => "Kephra::Config::Interface::open_file('commandlist')", menubar => "Kephra::Config::Interface::open_file('menubar')", contextmenu => "Kephra::Config::Interface::open_file('contextmenu')", toolbar => "Kephra::Config::Interface::open_file('toolbar')", maintoolbar => "Kephra::Config::Interface::open_file('maintoolbar')", searchbar => "Kephra::Config::Interface::open_file('searchbar')", statusbar => "Kephra::Config::Interface::open_file('statusbar')", }, syntaxmode => { ada => "Kephra::Document::SyntaxMode::open_file('ada')", as => "Kephra::Document::SyntaxMode::open_file('as')", asm => "Kephra::Document::SyntaxMode::open_file('asm')", ave => "Kephra::Document::SyntaxMode::open_file('ave')", baan => "Kephra::Document::SyntaxMode::open_file('baan')", batch => "Kephra::Document::SyntaxMode::open_file('batch')", c => "Kephra::Document::SyntaxMode::open_file('cpp')", conf => "Kephra::Document::SyntaxMode::open_file('conf')", context => "Kephra::Document::SyntaxMode::open_file('context')", cs => "Kephra::Document::SyntaxMode::open_file('cs')", css => "Kephra::Document::SyntaxMode::open_file('css')", diff => "Kephra::Document::SyntaxMode::open_file('diff')", eiffel => "Kephra::Document::SyntaxMode::open_file('eiffel')", err => "Kephra::Document::SyntaxMode::open_file('err')", forth => "Kephra::Document::SyntaxMode::open_file('forth')", fortran => "Kephra::Document::SyntaxMode::open_file('fortran')", html => "Kephra::Document::SyntaxMode::open_file('html')", idl => "Kephra::Document::SyntaxMode::open_file('idl')", java => "Kephra::Document::SyntaxMode::open_file('java')", js => "Kephra::Document::SyntaxMode::open_file('js')", latex => "Kephra::Document::SyntaxMode::open_file('latex')", lisp => "Kephra::Document::SyntaxMode::open_file('lisp')", lua => "Kephra::Document::SyntaxMode::open_file('lua')", make => "Kephra::Document::SyntaxMode::open_file('make')", matlab => "Kephra::Document::SyntaxMode::open_file('matlab')", nsis => "Kephra::Document::SyntaxMode::open_file('nsis')", pascal => "Kephra::Document::SyntaxMode::open_file('pascal')", perl => "Kephra::Document::SyntaxMode::open_file('perl')", php => "Kephra::Document::SyntaxMode::open_file('php')", property => "Kephra::Document::SyntaxMode::open_file('property')", ps => "Kephra::Document::SyntaxMode::open_file('ps')", python => "Kephra::Document::SyntaxMode::open_file('python')", ruby => "Kephra::Document::SyntaxMode::open_file('ruby')", scheme => "Kephra::Document::SyntaxMode::open_file('scheme')", sh => "Kephra::Document::SyntaxMode::open_file('sh')", sql => "Kephra::Document::SyntaxMode::open_file('sql')", tcl => "Kephra::Document::SyntaxMode::open_file('tcl')", tex => "Kephra::Document::SyntaxMode::open_file('tex')", vb => "Kephra::Document::SyntaxMode::open_file('vb')", vbs => "Kephra::Document::SyntaxMode::open_file('vbs')", xml => "Kephra::Document::SyntaxMode::open_file('xml')", yaml => "Kephra::Document::SyntaxMode::open_file('yaml')", }, templates => 'Kephra::Config::Global::open_templates_file()', }, }, }, enable => { file => { 'save-current' => 'Kephra::File::can_save()', 'save-all' => 'Kephra::File::can_save_all()', }, edit => { changes => { undo => 'Kephra::Edit::History::can_undo()', redo => 'Kephra::Edit::History::can_redo()', 'undo-several' => 'Kephra::Edit::History::can_undo()', 'redo-several' => 'Kephra::Edit::History::can_redo()', 'goto-begin' => 'Kephra::Edit::History::can_undo()', 'goto-end' => 'Kephra::Edit::History::can_redo()', delete => 'Kephra::Edit::History::can_undo() or Kephra::Edit::History::can_redo()', }, cut => 'Kephra::Edit::can_copy()', copy => 'Kephra::Edit::can_copy()', paste => 'Kephra::Edit::can_paste()', replace => 'Kephra::Edit::can_copy()', delete => 'Kephra::Edit::can_copy()', 'line-replace' => 'Kephra::Edit::can_paste()', selection => { move => { 'char-left' => 'Kephra::Edit::can_copy()', 'char-right' => 'Kephra::Edit::can_copy()', 'line-up' => 'Kephra::Edit::can_copy()', 'line-down' => 'Kephra::Edit::can_copy()', 'page-up' => 'Kephra::Edit::can_copy()', 'page-down' => 'Kephra::Edit::can_copy()', }, }, }, find => { prev => 'Kephra::Edit::Search::item_findable()', next => 'Kephra::Edit::Search::item_findable()', first => 'Kephra::Edit::Search::item_findable()', last => 'Kephra::Edit::Search::item_findable()', selection => 'Kephra::Edit::can_copy()', }, replace => { prev => 'Kephra::Edit::Search::_exist_find_item()', next => 'Kephra::Edit::Search::_exist_find_item()', all => 'Kephra::Edit::Search::_exist_find_item()', 'with-confirm' => 'Kephra::Edit::Search::_exist_find_item()', selection => 'Kephra::Edit::can_copy()', }, 'tool-interpreter' => { 'run-document' => '! Kephra::App::Panel::Output::is_running()', 'stop-document' => 'Kephra::App::Panel::Output::is_running()', }, }, enable_event => { 'file-save-current' => 'document.savepoint', 'file-save-all' => 'document.savepoint', edit => { changes => { undo => 'document.savepoint', redo => 'document.savepoint,document.text.change', }, cut => 'document.text.select', copy => 'document.text.select', paste => 'document.text.select', replace => 'document.text.select', delete => 'document.text.select', }, find => { prev => 'find.item.changed', next => 'find.item.changed', first => 'find.item.changed', last => 'find.item.changed', selection => 'document.text.select', }, replace => { prev => 'find.item.changed', next => 'find.item.changed', all => 'find.item.changed', 'with-confirm' => 'find.item.changed', selection => 'document.text.select', }, 'tool-interpreter' => { 'run-document' => 'panel.output.run', 'stop-document' => 'panel.output.run', }, }, state => { search => { attribute => { 'autowrap-switch' => "Kephra::Edit::Search::get_attribute('auto_wrap');", 'incremental-switch' => "Kephra::Edit::Search::get_attribute('incremental');", 'regex-switch' => "Kephra::Edit::Search::get_attribute('match_regex');", match => { 'case-switch' => "Kephra::Edit::Search::get_attribute('match_case');", 'whole-word-switch' => "Kephra::Edit::Search::get_attribute('match_whole_word');", 'word-begin-switch' => "Kephra::Edit::Search::get_attribute('match_word_begin');", }, }, range => { selection => "Kephra::Edit::Search::get_range() eq 'selection';", document => "Kephra::Edit::Search::get_range() eq 'document';", 'open-docs' => "Kephra::Edit::Search::get_range() eq 'open_docs';", }, }, bookmark => { goto => { 1 => 'Kephra::Edit::Marker::bookmark_is_set(1)', 2 => 'Kephra::Edit::Marker::bookmark_is_set(2)', 3 => 'Kephra::Edit::Marker::bookmark_is_set(3)', 4 => 'Kephra::Edit::Marker::bookmark_is_set(4)', 5 => 'Kephra::Edit::Marker::bookmark_is_set(5)', 6 => 'Kephra::Edit::Marker::bookmark_is_set(6)', 7 => 'Kephra::Edit::Marker::bookmark_is_set(7)', 8 => 'Kephra::Edit::Marker::bookmark_is_set(8)', 9 => 'Kephra::Edit::Marker::bookmark_is_set(9)', 0 => 'Kephra::Edit::Marker::bookmark_is_set(0)', }, }, tool => { 'auto-indention' => 'Kephra::App::EditPanel::get_autoindention()', 'brace-indention' => 'Kephra::App::EditPanel::get_braceindention()', 'brace-completion' => 'Kephra::App::EditPanel::get_bracecompletion()', }, document => { EOL => { 'cr+lf' => "Kephra::Document::Property::get_EOL_mode() eq 'cr+lf'", cr => "Kephra::Document::Property::get_EOL_mode() eq 'cr'", lf => "Kephra::Document::Property::get_EOL_mode() eq 'lf'", }, encoding => { 'ascii' => "Kephra::Document::Property::get_codepage() eq 'ascii'", 'utf8' => "Kephra::Document::Property::get_codepage() eq 'utf8'", }, readonly => { 'as-attr' => "Kephra::Document::Property::get_readonly() eq 'protect';", on => "Kephra::Document::Property::get_readonly() eq 'on';", off => "Kephra::Document::Property::get_readonly() eq 'off';", }, syntaxmode => { none => "Kephra::Document::SyntaxMode::_ID() eq 'none';", ada => "Kephra::Document::SyntaxMode::_ID() eq 'ada';", as => "Kephra::Document::SyntaxMode::_ID() eq 'as';", asm => "Kephra::Document::SyntaxMode::_ID() eq 'asm';", ave => "Kephra::Document::SyntaxMode::_ID() eq 'ave';", baan => "Kephra::Document::SyntaxMode::_ID() eq 'baan';", batch => "Kephra::Document::SyntaxMode::_ID() eq 'batch';", c => "Kephra::Document::SyntaxMode::_ID() eq 'cpp';", conf => "Kephra::Document::SyntaxMode::_ID() eq 'conf';", context => "Kephra::Document::SyntaxMode::_ID() eq 'context';", cs => "Kephra::Document::SyntaxMode::_ID() eq 'cs';", css => "Kephra::Document::SyntaxMode::_ID() eq 'css';", diff => "Kephra::Document::SyntaxMode::_ID() eq 'diff';", eiffel => "Kephra::Document::SyntaxMode::_ID() eq 'eiffel';", err => "Kephra::Document::SyntaxMode::_ID() eq 'err';", forth => "Kephra::Document::SyntaxMode::_ID() eq 'forth';", fortran => "Kephra::Document::SyntaxMode::_ID() eq 'fortran';", html => "Kephra::Document::SyntaxMode::_ID() eq 'html';", idl => "Kephra::Document::SyntaxMode::_ID() eq 'idl';", java => "Kephra::Document::SyntaxMode::_ID() eq 'java';", js => "Kephra::Document::SyntaxMode::_ID() eq 'js';", latex => "Kephra::Document::SyntaxMode::_ID() eq 'latex';", lisp => "Kephra::Document::SyntaxMode::_ID() eq 'lisp';", lua => "Kephra::Document::SyntaxMode::_ID() eq 'lua';", make => "Kephra::Document::SyntaxMode::_ID() eq 'make';", matlab => "Kephra::Document::SyntaxMode::_ID() eq 'matlab';", nsis => "Kephra::Document::SyntaxMode::_ID() eq 'nsis';", pascal => "Kephra::Document::SyntaxMode::_ID() eq 'pascal';", perl => "Kephra::Document::SyntaxMode::_ID() eq 'perl';", php => "Kephra::Document::SyntaxMode::_ID() eq 'php';", property => "Kephra::Document::SyntaxMode::_ID() eq 'property';", ps => "Kephra::Document::SyntaxMode::_ID() eq 'ps';", python => "Kephra::Document::SyntaxMode::_ID() eq 'python';", ruby => "Kephra::Document::SyntaxMode::_ID() eq 'ruby';", scheme => "Kephra::Document::SyntaxMode::_ID() eq 'scheme';", sh => "Kephra::Document::SyntaxMode::_ID() eq 'sh';", sql => "Kephra::Document::SyntaxMode::_ID() eq 'sql';", tcl => "Kephra::Document::SyntaxMode::_ID() eq 'tcl';", tex => "Kephra::Document::SyntaxMode::_ID() eq 'tex';", vb => "Kephra::Document::SyntaxMode::_ID() eq 'vb';", vbs => "Kephra::Document::SyntaxMode::_ID() eq 'vbs';", xml => "Kephra::Document::SyntaxMode::_ID() eq 'xml';", yaml => "Kephra::Document::SyntaxMode::_ID() eq 'yaml';", }, tabs => { soft => 'Kephra::Document::Property::get_tab_mode() == 0', hard => 'Kephra::Document::Property::get_tab_mode() == 1', use => 'Kephra::Document::Property::get_tab_mode()', width => { 1 => 'Kephra::Document::Property::get_tab_size() == 1', 2 => 'Kephra::Document::Property::get_tab_size() == 2', 3 => 'Kephra::Document::Property::get_tab_size() == 3', 4 => 'Kephra::Document::Property::get_tab_size() == 4', 5 => 'Kephra::Document::Property::get_tab_size() == 5', 6 => 'Kephra::Document::Property::get_tab_size() == 6', 8 => 'Kephra::Document::Property::get_tab_size() == 8', }, }, }, view => { editpanel => { indicator => { EOL => 'Kephra::App::EditPanel::Indicator::EOL_visible()', 'brace-light' => 'Kephra::App::EditPanel::Indicator::bracelight_visible()', 'caret-line' => 'Kephra::App::EditPanel::Indicator::caret_line_visible()', 'indention-guide' => 'Kephra::App::EditPanel::Indicator::indention_guide_visible()', 'right-margin' => 'Kephra::App::EditPanel::Indicator::LLI_visible()', whitespace => 'Kephra::App::EditPanel::Indicator::whitespace_visible()', }, 'line-wrap' => 'Kephra::App::EditPanel::get_autowrap_mode()', contextmenu => { custom => "Kephra::App::EditPanel::get_contextmenu() eq 'custom';", no => "Kephra::App::EditPanel::get_contextmenu() eq 'none';", default => "Kephra::App::EditPanel::get_contextmenu() eq 'default';", }, margin => { contexmenu => 'Kephra::App::EditPanel::Margin::get_contextmenu_visibility()', 'line-number' => 'Kephra::App::EditPanel::Margin::line_number_visible()', marker => 'Kephra::App::EditPanel::Margin::marker_visible()', 'text-fold' => 'Kephra::App::EditPanel::Margin::fold_visible()', text => { 0 => 'Kephra::App::EditPanel::Margin::get_text_width() == 0', 1 => 'Kephra::App::EditPanel::Margin::get_text_width() == 1', 2 => 'Kephra::App::EditPanel::Margin::get_text_width() == 2', 3 => 'Kephra::App::EditPanel::Margin::get_text_width() == 3', 4 => 'Kephra::App::EditPanel::Margin::get_text_width() == 4', 6 => 'Kephra::App::EditPanel::Margin::get_text_width() == 6', 8 => 'Kephra::App::EditPanel::Margin::get_text_width() == 8', 10 => 'Kephra::App::EditPanel::Margin::get_text_width() == 10', 12 => 'Kephra::App::EditPanel::Margin::get_text_width() == 12', }, }, maximize => 'Kephra::App::Window::get_max_editpanel_mode()', }, panel => { notepad => 'Kephra::App::Panel::Notepad::get_visibility()', output => 'Kephra::App::Panel::Output::get_visibility()', }, menubar => 'Kephra::App::MenuBar::get_visibility()', statusbar => 'Kephra::App::StatusBar::get_visibility()', 'statusbar-contexmenu' => 'Kephra::App::StatusBar::get_contextmenu_visibility()', 'statusbar-info' => { date => 'Kephra::App::StatusBar::info_msg_nr() == 2', length => 'Kephra::App::StatusBar::info_msg_nr() == 1', none => 'Kephra::App::StatusBar::info_msg_nr() == 0', }, 'searchbar' => 'Kephra::App::SearchBar::get_visibility()', 'searchbar-contexmenu' => 'Kephra::App::SearchBar::get_contextmenu_visibility()', tabbar => 'Kephra::App::TabBar::get_visibility()', 'tabbar-contexmenu' => 'Kephra::App::TabBar::get_contextmenu_visibility()', 'toolbar' => 'Kephra::App::MainToolBar::get_visibility()', window => { fullscreen => 'Kephra::App::Window::get_fullscreen_mode()', 'stay-on-top' => 'Kephra::App::Window::get_on_top_mode()', transparent => 'Kephra::App::Window::get_transparency_mode()', }, }, }, state_event => { view => { 'editpanel-line-wrap' => 'editpanel.autowrap', 'window-stay-on-top' => 'app.window.ontop', }, }, icon => { 'app-exit' => 'app-exit.xpm', file => { new => 'file-new.xpm', open => 'file-open.xpm', 'save-current' => 'file-save.xpm', 'save-all' => 'file-save-all.xpm', print => 'file-print.xpm', 'close-current' => 'file-close.xpm', }, edit => { changes => { undo => 'edit-undo.xpm', redo => 'edit-redo.xpm', }, cut => 'edit-cut.xpm', copy => 'edit-copy.xpm', paste => 'edit-paste.xpm', replace => 'edit-replace.xpm', delete => 'edit-delete.xpm', }, find => { prev => 'find-previous.xpm', next => 'find-next.xpm', }, goto => { 'last-edit' => 'goto-last-edit.xpm', line => 'goto-line.xpm', }, marker => { 'goto-prev-all' => 'marker-previous.xpm', 'goto-next-all' => 'marker-next.xpm', 'toggle-here' => 'marker.xpm', }, 'bookmark-goto' => { 1 => 'bookmark1.xpm', 2 => 'bookmark2.xpm', 3 => 'bookmark3.xpm', 4 => 'bookmark4.xpm', 5 => 'bookmark5.xpm', 6 => 'bookmark6.xpm', 7 => 'bookmark7.xpm', 8 => 'bookmark8.xpm', 9 => 'bookmark9.xpm', 0 => 'bookmark0.xpm', }, 'bookmark-toggle' => { 1 => 'bookmark1.xpm', 2 => 'bookmark2.xpm', 3 => 'bookmark3.xpm', 4 => 'bookmark4.xpm', 5 => 'bookmark5.xpm', 6 => 'bookmark6.xpm', 7 => 'bookmark7.xpm', 8 => 'bookmark8.xpm', 9 => 'bookmark9.xpm', 0 => 'bookmark0.xpm', }, tool => { 'interpreter-run-document' => 'run-skript.xpm', 'choose-color' => 'colorpicker.xpm', }, view => { dialog => { config => 'config-preferences.xpm', find => 'find-start.xpm', info => 'help-info.xpm', keymap => 'help-keyboard.xpm', replace => 'find-start.xpm', }, 'editpanel-line-wrap' => 'line-wrap.xpm', 'panel-notepad' => 'note.xpm', 'panel-output' => 'output-panel.xpm', 'searchbar' => 'panel-close.xpm', 'window-stay-on-top' => 'stay-on-top.xpm', }, }, key => { 'app-exit' => 'alt+q', file => { new => 'ctrl+n', open => 'ctrl+o', reload => 'ctrl+shift+o', 'reload-all' => 'ctrl+alt+o', insert => 'ctrl+shift+i', 'save-current' => 'ctrl+s', 'save-all' => 'ctrl+alt+s', 'save-as' => 'ctrl+shift+s', 'save-copy-as' => 'alt+shift+s', rename => 'ctrl+alt+shift+s', print => 'ctrl+p', close => { current => 'ctrl+q', other => 'ctrl+shift+q', }, }, edit => { changes => { undo => 'ctrl+z', redo => 'ctrl+shift+z', 'undo-several' => 'alt+z', 'redo-several' => 'alt+shift+z', 'goto-begin' => 'ctrl+alt+z', 'goto-end' => 'ctrl+alt+shift+z', }, cut => 'ctrl+x', copy => 'ctrl+c', paste => 'ctrl+v', replace => 'ctrl+w', delete => 'del', 'delete-tab' => 'shift+back', line => { cut => 'ctrl+shift+x', copy => 'ctrl+shift+c', duplicate => 'ctrl+shift+d', replace => 'ctrl+shift+w', delete => 'ctrl+shift+del', 'delete-left' => 'ctrl+shift+l', 'delete-right' => 'ctrl+shift+r', move => { 'line-up' => 'ctrl+alt+up', 'line-down' => 'ctrl+alt+down', 'page-up' => 'ctrl+alt+pgup', 'page-down' => 'ctrl+alt+pgdn', }, }, selection => { comment => { 'add-perl' => 'ctrl+k', 'del-perl' => 'ctrl+shift+k', 'toggle-perl' => 'ctrl+alt+k', 'add-xml' => 'ctrl+i', 'del-xml' => 'ctrl+shift+i', }, format => { 'block-on-right-margin' => 'ctrl+shift+b', 'dedent-char' => 'ctrl+shift+space', 'dedent-tab' => 'ctrl+shift+tab', 'indent-char' => 'ctrl+space', 'indent-tab' => 'ctrl+tab', 'join-lines' => 'ctrl+shift+j', }, move => { 'char-left' => 'ctrl+alt+left', 'char-right' => 'ctrl+alt+right', 'line-up' => 'ctrl+alt+up', 'line-down' => 'ctrl+alt+down', 'page-up' => 'ctrl+alt+pgup', 'page-down' => 'ctrl+alt+pgdn', }, }, }, select => { document => 'ctrl+a', 'toggle-simple' => 'ctrl+y', 'toggle-content' => 'ctrl+shift+y', 'to-block-begin' => 'alt+shift+pgup', 'to-block-end' => 'alt+shift+pgdn', }, find => { prev => 'shift+f3', next => 'f3', first => 'ctrl+alt+f3', last => 'ctrl+alt+shift+f3', selection => 'ctrl+f3', }, replace => { prev => 'alt+shift+f3', next => 'alt+f3', all => 'ctrl+alt+r', 'with-confirm' => 'ctrl+alt+shift+r', selection => 'ctrl+shift+f3', }, goto => { block => { down => 'alt+pgdn', up => 'alt+pgup', }, brace => { down => 'alt+down', left => 'alt+left', right => 'alt+right', up => 'alt+up', }, 'last-edit' => 'ctrl+shift+g', line => 'ctrl+g', }, marker => { 'goto-prev-doc' => 'shift+f2', 'goto-next-doc' => 'f2', 'goto-prev-all' => 'alt+shift+f2', 'goto-next-all' => 'alt+f2', 'toggle-here' => 'ctrl+f2', 'delete-doc' => 'ctrl+shift+f2', 'delete-all' => 'ctrl+alt+shift+f2', }, bookmark => { goto => { 1 => 'ctrl+1', 2 => 'ctrl+2', 3 => 'ctrl+3', 4 => 'ctrl+4', 5 => 'ctrl+5', 6 => 'ctrl+6', 7 => 'ctrl+7', 8 => 'ctrl+8', 9 => 'ctrl+9', 0 => 'ctrl+0', }, toggle => { 1 => 'ctrl+shift+1', 2 => 'ctrl+shift+2', 3 => 'ctrl+shift+3', 4 => 'ctrl+shift+4', 5 => 'ctrl+shift+5', 6 => 'ctrl+shift+6', 7 => 'ctrl+shift+7', 8 => 'ctrl+shift+8', 9 => 'ctrl+shift+9', 0 => 'ctrl+shift+0', }, }, tool => { note => 'f12', 'note-selection' => 'shift+f12', 'interpreter-run-document' => 'f5', 'interpreter-stop-document' => 'shift+f5', 'output-selection-dec' => 'ctrl+shift+f5', 'output-selection-hex' => 'alt+shift+f5', 'perl-insert-last-var' => 'ctrl+shift+v', 'perl-copy-string' => 'alt+shift+c', }, document => { change => { back => 'ctrl+shift+back', prev => 'ctrl+pgup', next => 'ctrl+pgdn', }, move => { left => 'ctrl+shift+pgup', right => 'ctrl+shift+pgdn', }, }, view => { 'searchbar-goto' => 'ctrl+f', dialog => { config => 'alt+shift+c', find => 'ctrl+shift+f', replace => 'ctrl+r', info => 'alt+shift+i', keymap => 'alt+shift+k', }, editpanel => { 'fold-toggle' => { all => 'alt+shift+plus', here => 'ctrl+plus', level => 'alt+plus', recursively => 'ctrl+shift+plus', }, maximize => 'shift+f11', zoom => { in => 'ctrl+shift+plus', normal => 'ctrl+shift+pound', out => 'ctrl+shift+minus', }, }, 'panel-notepad' => 'ctrl+f12', 'panel-output' => 'ctrl+f5', tabbar => 'ctrl+alt+t', window => { fullscreen => 'f11', restore => 'esc', 'stay-on-top' => 'ctrl+f11', 'top-transparent' => 'ctrl+alt+f11', transparent => 'alt+f11', }, }, }, }, } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Config/Default/Localisation.pm0000644000175000017500000012745711573643450024145 0ustar gregoagregoapackage Kephra::Config::Default::Localisation; our $VERSION = '0.08'; use strict; use warnings; sub get { return { about => { language => 'english', iso_code => 'en', coding => 'ASCII', purpose => 'embedded emergency localisation', version => $Kephra::VERSION, }, app => { general => { untitled => 'untitled' }, menu => { label => { file => 'File', file_open => 'Open', file_close => 'Close', file_history => 'Recently Closed', file_save => 'Save', file_session => 'Session', edit => 'Edit', edit_changes => 'History', current_line => 'Line', select => 'Select', selection => 'Selection', selection_format => 'Format', selection_comment => 'Comment', selection_convert => 'Convert', search => 'Search', search_attributes => 'Attributes', find_functions => 'Find Functions', replace_functions => 'Replace Functions', marker => 'Marker', bookmark_goto => 'Goto Bookmark', bookmark_toggle => 'Toggle Bookmark', tools => 'Tools', tool_output => 'Output', insert_templates => 'Templates', document => 'Document', document_change => 'Change', document_convert => 'Convert', document_syntaxmode => 'Syntaxmode', 'document_syntaxmode_A-M' => 'A - M', 'document_syntaxmode_N-Z' => 'N - Z', document_syntaxmode_compiled => 'Compiled', document_syntaxmode_interpreted => 'Interpreted', document_syntaxmode_data_structure => 'Data Structure', document_syntaxmode_document => 'Documents', document_syntaxmode_web => 'Webprogramming', document_syntaxmode_special => 'Special', document_encoding => 'Encoding', document_tab_width => 'Tab Width', document_lineendchar => 'Lineendchars', document_readonly => 'Write Protection', view => 'View', view_window => 'Main Window', view_bars => 'App Bars', view_panel => 'Panel', view_contextmenu => 'Context Menus', view_editpanel_contexmenu => 'Edit Panel', view_textmargin => 'Text Margin', view_text_fold => 'Folding', view_zoom => 'Zoom', config => 'Config', config_app_lang => 'Language', config_global => 'Global Config File', config_interface => 'User Interface', config_localisation => 'Localisation', 'config_syntaxmode_A-M' => 'Syntaxmodes A - M', 'config_syntaxmode_N-Z' => 'Syntaxmodes N - Z', help => 'Help' }, help => {}, }, status => { label => { chars => 'Chars', column => 'Column', line => 'Line', lines => 'Lines', selection => 'Selection', soft_tabs => 'soft tabs', hard_tabs => 'hard tabs', now_is => 'Now is', last_change => 'Last change', date => 'Date', time => 'Time', }, help => { cursor => 'caret (text cursor) position', selection => 'selection size or position in percentage', syntaxmode => 'changes the current set syntaxmode', codepage => 'encoding settings', tab => 'change the use of tabs and spaces', EOL => 'view or change the end of line character', message => 'info field, can also show infos about the current file', }, }, }, commandlist => { label => { app => { exit => 'Exit', 'exit-unsaved' => 'Exit Without Save', }, file => { new => 'New', open => 'Open ...', 'open-dir' => 'Open Dir ...', reload => 'Reload', 'reload-all' => 'Reload All', rename => 'Rename ...', insert => 'Insert From File ...', close => { current => 'Close', all => 'Close All', other => 'Close Other', unsaved => 'Close Unsaved', 'all-unsaved' => 'Close All Unsaved', 'other-unsaved' => 'Close Other Unsaved', }, save => { current => 'Save', all => 'Save All', as => 'Save As ...', 'copy-as' => 'Save Copy ...', }, print => 'Print ...', session => { open => 'Open ...', add => 'Add ...', save => 'Save ...', import => 'Import ...', export => 'Export ...', 'backup-open' => 'Restore Backup', 'backup-save' => 'Save Backup', 'history-open-all' => 'Open All', }, }, edit => { changes => { undo => 'Undo', redo => 'Redo', 'undo-several' => 'Fast Undo', 'redo-several' => 'Fast Redo', 'goto-begin' => 'Jump To Begin', 'goto-end' => 'Jump To End', delete => 'Clear Records', }, cut => 'Cut', copy => 'Copy', paste => 'Paste', replace => 'Replace', delete => 'Delete', 'delete-tab' => 'Del Tab', line => { 'cut' => 'Cut', 'copy' => 'Copy', duplicate => 'Duplicate', 'replace' => 'Replace', 'delete' => 'Delete', 'delete-left' => 'Delete Left', 'delete-right' => 'Delete Right', 'move' => { 'line-up' => 'Move Line Up', 'line-down' => 'Move Line Down', 'page-up' => 'Move Page Up', 'page-down' => 'Move Page Down', }, }, selection => { convert => { uppercase => 'Uppercase', lowercase => 'Lowercase', titlecase => 'Titlecase', sentencecase => 'Sentencecase', spaces2tabs => 'Spaces To Tabs', tabs2spaces => 'Tabs To Spaces', spaces2entities => 'Spaces To Entities', entities2spaces => 'Entities To Spaces', chars2entities => 'Chars To Entities', entities2chars => 'Entities To Chars', }, comment => { 'add-perl' => 'Add Perl Style Comment', 'del-perl' => 'Remove Perl Style Comment', 'toggle-perl' => 'Toggle Perl Style Comment', 'add-c' => 'Add C Style Comment', 'del-c' => 'Remove C Style Comment', 'add-xml' => 'Add XML Style Comment', 'del-xml' => 'Remove XML Style Comment', }, format => { 'align-on-begin' => 'Align On Begin', 'block-on-right-margin' => 'Blockformat On Right Margin', 'block-on-width' => 'Blockformat On Width ...', 'linewrap-on-right-margin' => 'Wrap Lines Exceeding Right Margin', 'linewrap-on-width' => 'Wrap Lines Exceeding Fixed Width ...', 'indent-char' => 'Indent Space', 'dedent-char' => 'Dedent Space', 'indent-tab' => 'Indent Tab', 'dedent-tab' => 'Dedent Tab', 'del-trailing-whitespace' => 'Delete Trailing Space', 'join-lines' => 'Join Lines', }, move => { 'char-left' => 'Move Left', 'char-right' => 'Move Right', 'line-up' => 'Move Up', 'line-down' => 'Move Down', 'page-up' => 'Move Page Up', 'page-down' => 'Move Page Down', }, }, document => { convert => { indent2spaces => 'Indention 2 Whitespace', indent2tabs => 'Indention 2 Tab', spaces2tabs => 'Spaces 2 Tabs', tabs2spaces => 'Tabs 2 Spaces', }, format => { 'del-trailing-whitespace' => 'Delete Trailing Whitespace', }, }, }, select => { document => 'Select All', 'toggle-simple' => 'Toggle', 'toggle-content' => 'Item', }, search => { 'attribute' => { 'autowrap-switch' => 'Auto Wrap', 'incremental-switch' => 'Incremental Search', 'regex-switch' => 'Regular Expression', match => { 'case-switch' => 'Match Case', 'whole-word-switch' => 'Whole Word Only', 'word-begin-switch' => 'Word Begin', }, }, range => { selection => 'Selection', document => 'Document', 'open-docs' => 'Open Documents' }, }, find => { prev => 'Find Previous', next => 'Find Next', first => 'Find First', last => 'Find Last', selection => 'Find Selection', #'mark-all' => 'Mark all Matches', }, replace => { prev => 'Replace Backward', 'next' => 'Replace Forward', all => 'Replace All', 'with-confirm' => 'Replace With Confirmation', selection => 'Replace Into Selection', }, goto => { 'last-edit' => 'Goto Last Edit', line => 'Goto Line Number ...', }, marker => { 'goto-prev-doc' => 'Previous Marker in Doc', 'goto-next-doc' => 'Next Marker in Doc', 'goto-prev-all' => 'Goto Previous Marker', 'goto-next-all' => 'Goto Next Marker', 'toggle-here' => 'Toggle Marker Here', 'delete-doc' => 'Delete Marker in Doc', 'delete-all' => 'Delete All Marker', }, bookmark => { goto => { 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, '0' => 'O', }, toggle => { 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, '0' => 'O', }, 'delete-doc' => 'Delete Doc Bookmarks', 'delete-all' => 'Delete All Bookmarks', }, tool => { note => 'Note', 'note-selection' => 'Note Selection', 'interpreter-run-document' => 'Run Script', 'interpreter-stop-document' => 'Stop Script', 'output' => { 'inc' => '@INC', 'env' => '%ENV', 'selection-dec' => 'Selection in Dec', 'selection-hex' => 'Selection in Hex', }, 'choose-color' => 'Color Picker', 'insert-time-date' => 'Time Date', perl => { 'insert-last-var' => 'Insert Var', 'copy-string' => 'Copy String', }, 'auto-indention' => 'Auto-Indention', 'brace-indention' => 'Brace-Indention', 'brace-completion' => 'Brace-Completion', }, document => { EOL => { auto => 'Align', 'cr+lf' => 'CR+LF (Windows)', cr => 'CR (Macintosh)', lf => 'LF (Linux)', }, change => { back => 'Switch Back', prev => 'Previous Tab', 'next' => 'Next Tab', }, encoding => { 'ascii' => 'ASCII', 'latin1' => 'Latin 1', 'utf8' => 'UTF-8', }, move => { left => 'Move Left', right => 'Move Right', }, readonly => { 'as-attr' => 'As Attribute', on => 'Always On', off => 'Always Off', }, syntaxmode => { auto => 'Autoselect', none => 'None', ada => 'Ada', as => 'Actionscript', asm => 'Assembler', ave => 'Avennue', baan => 'Baan', batch => 'Batch', c => 'C | C++', conf => 'Conf', context => 'Context', cs => 'C#', css => 'CSS', diff => 'Diff', eiffel => 'Eiffel', err => 'Errorlist', forth => 'Forth', fortran => 'FORTRAN 90', html => 'HTML', idl => 'IDL', java => 'Java', js => 'Javascript', latex => 'LaTeX', lisp => 'LISP', lua => 'Lua', make => 'Makefile', matlab => 'Matlab', nsis => 'NSIS', pascal => 'Pascal', perl => 'Perl', php => 'PHP', property => 'Property', ps => 'Postscript', python => 'Python', ruby => 'Ruby', scheme => 'Scheme', sh => 'UNIX Shell', sql => 'SQL', tcl => 'TCL', tex => 'TeX', vb => 'Visual Basic', vbs => 'VB Script', xml => 'XML', yaml => 'YAML', }, tabs => { hard => 'Tabs (HT = hard tabs)', soft => 'Spaces (ST = soft tabs)', use => 'Use Tabs', width => { 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 8 => 8, }, }, }, view => { dialog => { config => 'Config Dialog ...', find => 'Search Dialog', replace => 'Replace Dialog', info => 'About ...', keymap => 'Keymap ...', }, documentation => { 'advanced-tour' => 'Advanced Tour', credits => 'Credits', 'feature-list' => 'Featurelist', 'navigation-guide' => 'Navigation Guide', welcome => 'Welcome', 'this-version' => 'This Version', }, editpanel => { contextmenu => { custom => 'Custom', default => 'Default', no => 'No Menu', }, indicator => { EOL => 'Lineend Marker', 'brace-light' => 'Bracelight', 'caret-line' => 'Caret Line', 'indention-guide' => 'Indention Guide', 'right-margin' => 'Right Margin', whitespace => 'Whitespace', }, 'fold-toggle' => { all => 'All', here => 'Here', level => 'Level', recursively => 'Recursively', }, font => 'Font', 'line-wrap' => 'Line Wrap', margin => { contexmenu => 'Left Margin', marker => 'Marker Margin', 'line-number' => 'Line Number', 'text-fold' => 'Fold Margin', text => { 0 => '0 px', 1 => 1, 2 => 2, 3 => 3, 4 => 4, 6 => 6, 8 => 8, 10 => 10, 12 => 12, }, }, }, panel => { notepad => 'Notepad', output => 'Output', }, menubar => 'Main Menu', searchbar => 'Searchbar', 'searchbar-goto' => 'Searchbar', 'searchbar-contexmenu' => 'Searchbar', statusbar => 'Statusbar', 'statusbar-contexmenu' => 'Statuscontext', 'statusbar-info' => { date => 'File Date', length => 'File Size', none => 'Nothing', }, tabbar => 'Tabbar', 'tabbar-contexmenu' => 'Tabbar', toolbar => 'Main Toolbar', webpage => { 'bug-tracker' => 'Bug Tracker', documentation => 'Online Docs', 'feature-wish' => 'Feature Wish', forum => 'Perl Forum', }, 'window-stay-on-top' => 'Stay On Top', zoom => { in => 'Zoom In', normal => 'Normal', out => 'Zoom Out', }, }, config => { file => { global => { 'open' => 'Open', reload => 'Reload', 'load-from' => 'Load From ...', 'load-backup' => 'Load Backup', 'load-defaults' => 'Load Defaults', merge => 'Merge With ...', save => 'Save', 'save-as' => 'Save As ...', }, interface => { commandlist => 'Command List', menubar => 'Main Menu', contextmenu => 'Contextmenus', maintoolbar => 'Main Toolbar', searchbar => 'Searchbar', statusbar => 'Statusbar', toolbar => 'Toolbar', }, syntaxmode => { ada => 'Ada', as => 'Actionscript', asm => 'Assembler', ave => 'Avennue', baan => 'Baan', batch => 'Batch', c => 'C | C++', conf => 'Conf', context => 'Context', cs => 'C#', css => 'CSS', diff => 'Diff', eiffel => 'Eiffel', err => 'Errorlist', forth => 'Forth', fortran => 'FORTRAN 90', html => 'HTML', idl => 'IDL', java => 'Java', js => 'Javascript', latex => 'LaTeX', lisp => 'LISP', lua => 'Lua', make => 'Makefile', matlab =>'Matlab', nsis => 'NSIS', pascal => 'Pascal', perl => 'Perl', php => 'PHP', property => 'Property', ps => 'Postscript', python => 'Python', ruby => 'Ruby', scheme => 'Scheme', sh => 'UNIX Shell', sql => 'SQL', tcl => 'TCL', tex => 'TeX', vb => 'Visual Basic', vbs => 'VB Script', xml => 'XML', yaml => 'YAML', }, templates => 'Templates', }, }, }, help => { app => { exit => 'shut down the application and save settings and files', 'exit-unsaved' => 'shut down app without saving the open files', }, file => { new => 'opens a new empty text', open => 'opens an existing file', 'open-dir' => 'open all files of a chosen directory', reload => 'reload file from disc', 'reload-all' => 'reload all opened files', rename => 'change current files name', insert => 'insert file content at caret position', save =>{ current => 'save current file', all => 'save all open files', as => 'save current document under different file name', 'copy-as' => 'save doc with different name, keep current version open', }, close => { current => 'close current document, if present the file will be saved', all => 'close all open documents', other => 'close all open documents but the current', unsaved => 'close current document without saving', 'all-unsaved' => 'close all documents without saving', 'other-unsaved' => 'close all open docs but the current without saving', }, print => 'print the current document', session => { open => 'restore a saved file session', add => 'add files from a saved file session', save => ' save current file session', import => 'open file session from another editors format', export => 'save file session in another editors format', 'backup-open' => 'restore the backup session', 'backup-save' => 'set current files as the backup session', 'history-open-all' => 'restore all listed closed files from history', }, }, edit => { changes => { undo => 'undo the last change of the current document', redo => 'redo the last change made undone', 'undo-several' => 'go several steps back in edit history', 'redo-several' => 'go several steps forward in edit history', 'goto-begin' => 'go back to the state before the first edit', 'goto-end' => 'go forward to the state after the last edit', delete => 'deleting history of all editing changes', }, cut => 'cut selected text and store it in the clipboard', copy => 'copy selected text to the clipboard', paste => 'insert text from the clipboard', replace => 'replace selected text with the clipboard', delete => 'delete and forget selected text', line => { cut => 'cut current line and store it in the clipboard', copy => 'copy current line to the clipboard', duplicate => 'insert below a copy of the current line', replace => 'replace current line with the clipboard', delete => 'delete and forget current line', 'delete-left' => 'delete left side from textcursor of current line', 'delete-right' => 'delete right side from textcursor of current line', move => { 'line-up' => 'move current line one line up', 'line-down' => 'move current line one line down', 'page-up' => 'move current line one page up', 'page-down' => 'move current line one page down', }, }, selection => { convert => { uppercase => 'turn selected text to uppercase', lowercase => 'turn selected text to lowercase', titlecase => 'turn first char of every word uppercase', sentencecase => 'turn first char of every sentence uppercase', spaces2tabs => 'convert groups of whitespace to tabs', tabs2spaces => 'depends on current tab width', spaces2entities => 'convert all whitespace to &npsp;', entities2spaces => 'convert &npsp; to whitespace', chars2entities => 'convert ISO 8859-1 character to HTML entities', entities2chars => 'convert HTML entities to ISO 8859-1 characters', }, comment => { 'add-perl' => 'insert # after every indention', 'del-perl' => 'remove all # following the indention', 'toggle-perl' => 'comment all uncommented lines and vici versa', 'add-c' => 'surround selection with / * and * /', 'del-c' => 'remove all / * and * / in the selection', 'add-xml' => 'surround selection with ', 'del-xml' => 'remove all in the selection', }, format => { 'align-on-begin' => 'align line indentions on first line', 'block-on-right-margin' => 'format to textblock, that not cross right margin', 'block-on-width' => 'format to textblock with chosen width ...', 'linewrap-on-right-margin' => 'split lines before they reach the right margin', 'linewrap-on-width' => 'split lines to a chosen width ...', 'indent-char' => 'increase indention of the selected lines by 1', 'dedent-char' => 'decrease indention of the selected lines by 1', 'indent-tab' => 'increase indention by current tab size', 'dedent-tab' => 'decrease indention by current tab size', 'del-trailing-whitespace' => 'delete whitespace on line endings', 'join-lines' => 'delete end of line (EOL) symbols', }, move => { 'char-left' => 'move selection one character left', 'char-right' => 'move selection one character right', 'line-up' => 'move selection one line up', 'line-down' => 'move selection one line down', 'page-up' => 'move selection one page up', 'page-down' => 'move selection one page down', }, }, document => { convert => { indent2spaces => 'convert tabs between linestart and first word', indent2tabs => 'convert spaces between linestart and first word', spaces2tabs => 'convert all spaces to tabs in the current doc', tabs2spaces => 'convert all tabs to spaces in the current doc', }, format => { 'del-trailing-whitespace' => 'delete all trailing whitespace', }, }, }, select => { document => 'select entire document', 'toggle-simple' => 'toggle between selectin a word, a line, a block or nothing', 'toggle-content' => 'toggle selection between contents of braces or quotings', }, search => { attribute => { 'autowrap-switch' => 'Auto Wrap', 'incremental-switch' => 'Incremental Search', 'regex-switch' => 'Regular Expression', match => { 'case-switch' => 'Match Case', 'whole-word-switch' => 'Whole Word only', 'word-begin-switch' => 'Word Begin', }, }, range => { selection => 'search and replace only within selected text', document => 'search and replace in whole current document', 'open-docs' => 'search and replace in all open documents', }, }, find => { prev => 'find the previous match of the textsearch', next => 'find the next match of the textsearch', first => 'find first textsearch match in document', last => 'find last textsearch match in document', selection => 'remember selected text as current search item', }, replace => { prev => 'replace selection and find previous match', next => 'replace selection and find next match', all => 'replace all matches in current search range', 'with-confirm' => 'confirm or reject to replace every particular match', selection => 'remember selected text as current replace item', }, goto => { 'last-edit' => 'jump to position of last change in this document', line => 'jump to line with chosen number', }, marker => { 'goto-prev-doc' => 'go to the previous marker (upwards) in this document', 'goto-next-doc' => 'go to the next marker (downwards) in this document', 'goto-prev-all' => 'go to the previous marker here or in some previous document', 'goto-next-all' => 'go to the next marker here or in some next document', 'toggle-here' => 'set a marker in current line or delete if already present', 'delete-doc' => 'delete marker just in the current document', 'delete-all' => 'delete marker in all open documents', }, bookmark => { goto => { 1 => 'go to bookmark number 1', 2 => 'go to bookmark number 2', 3 => 'go to bookmark number 3', 4 => 'go to bookmark number 4', 5 => 'go to bookmark number 5', 6 => 'go to bookmark number 6', 7 => 'go to bookmark number 7', 8 => 'go to bookmark number 8', 9 => 'go to bookmark number 9', 0 => 'go to bookmark number 0', }, toggle => { 1 => 'set here or remove (if present) bookmark 1', 2 => 'set here or remove (if present) bookmark 2', 3 => 'set here or remove (if present) bookmark 3', 4 => 'set here or remove (if present) bookmark 4', 5 => 'set here or remove (if present) bookmark 5', 6 => 'set here or remove (if present) bookmark 6', 7 => 'set here or remove (if present) bookmark 7', 8 => 'set here or remove (if present) bookmark 8', 9 => 'set here or remove (if present) bookmark 9', 0 => 'set here or remove (if present) bookmark 0', }, 'delete-doc' => 'delete bookmarks in the current document', 'delete-all' => 'delete bookmarks in all documents', }, tool => { note => 'jump to the notepad', 'note-selection' => 'paste selected text on the end of the notepad', 'interpreter-run-document' => 'run current program and show result in output panel', 'interpreter-stop-document' => 'stop the current running output panel process', 'output' => { 'inc' => 'display the include paths of the Perl Interpreter in the ouput panel', 'env' => 'display the environment variables in the ouput panel', 'selection-dec' => 'display selected text in decimal coding in the ouput panel', 'selection-hex' => 'display selected text in hexadecimal coding in the ouput panel', }, 'choose-color' => 'display text selection as color and choose a new from a rainbow', 'insert-time-date' => 'insert at cursor current time and date', perl => { 'insert-last-var' => 'insert last Perl variable that began a line', 'copy-string' => 'copy surrounding single or double quoted string', }, 'auto-indention' => 'indents new line like previous when Enter pressed', 'brace-indention' => 'autoindents one tab more after curly braces when press enter', 'brace-completion' => 'creates the closing brace when press enter after the opening', }, document => { EOL => { auto => 'make all line endings like in first line', 'cr+lf' => 'line endings for Windows or Dos', cr => 'convert line endings to the Mac standart', lf => 'convert line endings to the UNIX standart', }, change => { back => 'switches to the last used document', prev => 'changes the current document one tab to the left', next => 'changes the current document one tab to the right', }, encoding => { 'ascii' => 'converts document encoding into ASCII 8 Bit', 'latin1' => 'converts document encoding into iso-8859-1', 'utf8' => 'converts document encoding into UTF-8', }, move => { left => 'move current document in the tabbar one pos to the left', right => 'move current document in the tabbar one pos to the right', }, readonly => { 'as-attr' => 'turns write protection on if file is readonly', on => 'disables every modification of this document', off => 'makes document always editable even if it can\'t be saved', }, syntaxmode => { auto => 'select syntaxmode depending on fileending', none => 'turn any syntaxmode settings off', ada => 'activate language settings for Ada', as => 'activate settings for Macromedia Actionscript', asm => 'language settings for Assembler', ave => 'open settings for the Avennue language', baan => 'language of the Baan ERP systems', batch => 'Microsofts classic commandline batch control language', c => 'settings for the C / C++ language family', conf => 'for Apache Conf styled configuration files', context => 'settings for the ConTeXt Tex Macros', cs => 'syntaxmode for Microsoft C-Sharp', css => 'syntaxmode for Cascading Style Sheet language', diff => 'syntaxmode for patch files', eiffel => 'Bertrand Meyers objectoriented language Eiffel', err => 'syntaxmode for errorcode files', forth => 'language of the Forth systems', fortran => 'syntaxmode of the FORmula TRANslation language', html => 'syntaxmode for the HyperText Markup Language', idl => 'syntaxmode of the Interface Definition Language', java => 'Settings for Sun\'s Java language', js => 'syntaxmode for Javascript', latex => 'syntaxmode for the LaTeX Tex macros', lisp => 'LISt Processor settings', lua => 'syntaxmode for the embedding language Lua', make => 'highlighting for make tool scripts', matlab => 'MATLAB scripting language', nsis => 'language of the Nullsoft Scriptable Install System', pascal => 'Niklaus Wirth\'s structured language Pascal', perl => 'syntaxmode for Larry Walls Perl', php => 'Rasmus Lehrdorf PHP Hypertext Processors', property => 'Highlighting for simple config files', ps => 'Adobe\'s document desciption language Postscript', python => 'Guido van Rossums dynamic language Python', ruby => 'Yukihiro "Matz" Matsumoto\'s full objectoriented language', scheme => 'syntaxmode of the MIT LISP dialect', sh => 'settings for the UNIX Bourne Shell', sql => 'Structured Query Language originated from IBM', tcl => 'Tool Command Language from John Ousterhout', tex => 'Donald E. Knuth macro language for type setting', vb => 'settings for Microsoft Visual Basic', vbs => 'settings for Microsoft Visual Basic Script', xml => 'syntaxmode for the eXtensible Markup Language', yaml => 'syntaxmode for Indy\'s YAML Ain\'t Markup Language', }, tabs => { hard => 'insert a tab while hitting the tab key', soft => 'insert several whitespaces while hitting tab key', use => 'use tabs (hard tabs) or whitespaces (soft tabs)', width => { 1 => 'set width of tabs to an equal of 1 character', 2 => 'set width of tabs to an equal of 2 characters', 3 => 'set width of tabs to an equal of 3 characters', 4 => 'set width of tabs to an equal of 4 characters', 5 => 'set width of tabs to an equal of 5 characters', 6 => 'set width of tabs to an equal of 6 characters', 8 => 'set width of tabs to an equal of 8 characters', }, }, }, view => { dialog => { config => 'display and change the configuration of the program', find => 'open dialog for text search and settings', replace => 'open dialog for find and replace text', info => 'version numbers, authors, credits, license', keymap => 'lists which key kombination triggers which function', }, documentation => { 'advanced-tour' => 'introduction of unusual but practical features', credits => 'list of all involved people', 'feature-list' => 'thematically sorted description of all functionalities', 'navigation-guide' => 'explanations of the user interface', welcome => 'first steps: how to get help and give feedback', 'this-version' => 'new features and important changes of the current version', }, editpanel => { contextmenu => { custom => 'activate customizable editpanel context menu', default => 'activate default scintilla context menu', no => 'deactivate all editpanel context menu', }, indicator => { EOL => 'switch visibility of the end of line marker', 'brace-light' => 'highlights associated pairs of braices', 'caret-line' => 'highlights row where caret(textcursor) is located', 'indention-guide' => 'vertical dotted lines in intervals of tab width', 'right-margin' => 'shows straight vertical line on seleted width', whitespace => 'set whitespaces and tabs visible as dots and arrows', }, 'fold-toggle' => { all => 'fold or unfold all visible and not visible nodes', here => 'fold or unfold only the node on selected position', level => 'fold or unfold all nodes with same depth in hierarchy (amount of parents)', recursively => 'fold or unfold this and all nodes below in hierarchy', }, font => 'change font family, size, style etc.', 'line-wrap' => 'breaks long lines on window edge only visually', margin => { contexmenu => 'enable or disable the context menu over the margin, left of the edit panel', marker => 'margin for bookmarks, marker, debug steps ...', 'line-number' => 'sets line numbers visible', text => { 0 => 'set extra margin on both sides of textfield to 0 pixel', 1 => 'set extra margin on both sides of textfield to 1 pixel', 2 => 'set extra margin on both sides of textfield to 2 pixel', 3 => 'set extra margin on both sides of textfield to 3 pixel', 4 => 'set extra margin on both sides of textfield to 4 pixel', 6 => 'set extra margin on both sides of textfield to 6 pixel', 8 => 'set extra margin on both sides of textfield to 8 pixel', 10 => 'set extra margin on both sides of textfield to 10 pixel', 12 => 'set extra margin on both sides of textfield to 12 pixel', }, 'text-fold' => 'switch Margin for the text folding icons', }, maximize => 'toggle all panels and bars to enlarge the edit area', }, panel => { notepad => 'switch visibility of the Notepad panel', output => 'switch visibility of the Output panel', }, menubar => 'turn main menu on (visible) or off', searchbar => 'toolbar with text seach and navigation functions', 'searchbar-goto' => 'goto searchbar and use find function', 'searchbar-contexmenu' => 'enable or disable the context menu over the searchbar', statusbar => 'switch visibility of the statusbar on bottom of the window', 'statusbar-contexmenu' => 'enable or disable context menus on statusbar', 'statusbar-info' => { date => 'display change date of the current file in statusbar info field', length => 'display size info of the current file in statusbar info field', none => 'display nothing in statusbar info field', }, tabbar => 'switch visibility of the tabbar, toolbar for doc selection', 'tabbar-contexmenu' => 'enable or disable context menus on tabbar', toolbar => 'switch visibility of the main toolbar', webpage => { 'bug-tracker' => 'please report any problem with the programm', documentation => 'open online documentation with your default browser', 'feature-wish' => 'report a feature or design change wish', forum => 'go to a perl web forum based on current language setting', }, window => { fullscreen => 'use maximum screen space', 'stay-on-top' => 'application window cant be overlapped by other windows', 'transparent' => 'make main window translucent', }, zoom => { in => 'make text appear larger', normal => 'zoom text back to font settings', out => 'make text appear smaller', }, }, config => { 'app-lang' => 'change user interface language to', file => { global => { open => 'open file with current global configurations', reload => 'reload current global configuration file', 'load-from' => 'load global configs from chosen file', 'load-backup' => 'load global configs from backup', 'load-defaults' => 'load default global configs', merge => 'merge current global configs with settings in this file', save => 'save current global configs into the file we load from', 'save-as' => 'save current global configs into this file', }, interface => { commandlist => 'definition for function calls, key binding, icons', menubar => 'open definition file for the menubar', contextmenu => 'open definition file for all contextmenu', maintoolbar => 'open definition file for the main toolbar', searchbar => 'open definition file for the searchbar', statusbar => 'open definition file for the statusbar', toolbar => 'open default definition file for toolbars', }, localisation => 'open translation file for language', syntaxmode => { ada => 'open file with settings for the Ada language', as => 'open file with Macromedia Actionscript settings', asm => 'open file with language settings for Assembler', ave => 'open settings for the Avennue language', baan => 'language of the Baan ERP systems', batch => 'Microsofts classic commandline batch control language', c => 'open file with settings for the C / C++ languages', conf => 'settings for files in the Apache Conf style', context => 'settings for ConTeXt Tex Macros', cs => 'open file with syntaxmode for Microsoft C-Sharp', css => 'settings for the Cascading Style Sheet language', diff => 'syntaxmode for patch files', eiffel => 'Bertrand Meyers objectoriented language Eiffel', err => 'syntaxmode for errorcode files', forth => 'settings for the language of the Forth systems', fortran => 'syntaxmode von FORmula TRANslation open', html => 'syntaxmode for HyperText Markup Language open', idl => 'syntaxmode der Interface Definition Language open', java => 'open settings for Sun\'s Java language', js => 'open syntaxmode for Javascript', latex => 'open syntaxmode for the Tex macros named LaTeX', lisp => 'open settings for the almighty LISt Processor', lua => 'settings for the extension language Lua', nsis => 'language of the Nullsoft Scriptable Install System', make => 'highlighting for make tool scripts', matlab => 'MATLAB scripting language', pascal => 'settings for Niklaus Wirth\'s procedural language Pascal', perl => 'file with syntaxmode for Larry Walls Perl', php => 'Rasmus Lehrdorf PHP Hypertext Processor', property => 'Highlighting for simple config files', ps => 'Adobe document description language Postscript', python => 'Guido van Rossums dynamic language Python', ruby => 'Yukihiro "Matz" Matsumoto\'s full object oriented Ruby', scheme => 'open syntaxmode of the MIT LISP dialect Scheme', sh => 'open settings for the UNIX Bourne Shell', sql => 'Structured Query Language, originated from IBM', tcl => 'Tool Command Language from John Ousterhout', tex => 'Donald E. Knuth\'s macro language for typesetting', vb => 'open file with settings for Microsoft Visual Basic', vbs => 'open file with settings for Microsoft Visual Basic Script', xml => 'open settings for die eXtensible Markup Language', yaml => 'open settings for Indy\'s YAML Ain\'t Markup Language', }, templates => 'open file with the current template definitions', }, }, }, }, dialog => { config => { title => 'Configuration Dialog', panel => { general => 'General', main_window => 'Main Window', edit => 'Edit Panel', files => 'Files', }, }, config_file => { load => 'load overall configuration from the file :', save => 'store current program configuration into the file :', }, edit => { goto_line_headline => 'goto line', goto_line_input => 'choose linenumber :', wrap_custom_headline => 'custom word wrapping', wrap_width_input => 'choose new line width (maximum number of chars) :', }, error => { general => 'Error', no_param => 'called without needed parameters', file => 'file handling error', file_find => "can't find file :", file_read => "can't read file :", file_write => "can't write file :", config_read => "can't read config file :", config_parse => 'file has no data :', write_protected => 'This file is write protected by the file system.', write_protected2 => 'Please unlock this or save this text under an other filename.', }, file => { files => 'Files', open => 'Open File', insert => 'Insert File', rename => 'Rename File', save_as => 'Save File As', save_all => 'Save All', save_none => 'Save None', save_copy_as => 'Save A Copy Of This File As', overwrite => 'Overwrite Existing File !', close_unsaved => 'Closing Unsafed File', save_current => 'Save Current File ?', save_open => 'Save All Open Files ?', quit_unsaved => 'Closing Unsafed Files :', open_session => 'Open File Session', add_session => 'Add File Session', save_session => 'Save Current File Session', import_session => 'Import File Session', export_session => 'Export File Session', open_dir => 'Open Files of Directory :', file_changed => 'File Changed', file_changed_msg => 'The following file has changed :', file_deleted => 'File Deleted', file_deleted_msg => 'The following file can not be found anymore :', }, general => { all => 'All', apply => 'Apply', cancel => 'Cancel', changed => 'Changed', close => 'Close', deleted => 'Deleted', dont_allow => 'Your settings dont allow this.', ignore => 'Ignore', none => 'None', overwrite => 'Overwrite', reload => 'Reload', restore => 'Restore', save => 'Save', save_reload => 'Save as ... and Reload', select => 'Select', selected => 'Selected', }, help => {}, info => { title => 'Info about', mady_by => 'by', licensed => 'licensed under', detail => 'see under help > license for credits and', more => 'explicit licenses', homepage => 'for more info visit', contains => 'this version contains', and => 'and', wrappes => 'which wrappes', extra => 'extra Perl Modules', motto => 'Neter of software creation', dedication => 'Deditcated to all people who ever tried to write an editor.', }, keyboard_map => { title => 'Keyboard Map', }, search => { title => 'Find and Replace', confirm => { title => 'Replace With Confirmation', text => 'Replace This ?', }, label => { search_for => 'Search for :', replace_with => 'Replace with :', case => 'Match Case', word_begin => 'Word Begin', whole_word => 'Whole Word Only', regex => 'Regular Expression', auto_wrap => 'Auto Wrap', incremental => 'Incremental Search', search_in => 'Search in', selection => 'Selection', document => 'Current Doc', open_documents => 'Open Docs', search => 'Find', replace_all => 'Replace All', with_confirmation => 'With Confirmation', }, hint => { match_case => 'differ between UPPER and lower case', match_word_begin => 'match only beginnins of words', match_whole_word => 'match only whole words', match_regex => 'evaluates simple regular expression', incremental => 'search as you type', auto_wrap => 'jumpes between file endings', forward => 'find next', backward => 'find previous', fast_forward => 'find fast forward', fast_backward => 'find fast backward', document_start => 'find first in document', document_end => 'find last In document', replace_forward => 'replace and find next', replace_backward => 'replace and find previous', }, }, }, key => { back => 'Back', esc => 'Esc', enter => 'Enter', del => 'Del', left => 'Left', right => 'Right', up => 'Up', down => 'Down', pgup => 'Page Up', pgdn => 'Page Down', space => 'Space', tab => 'Tab', meta => { alt => 'Alt', 'shift' => 'Shift', ctrl => 'Ctrl', }, }, } } 1;kephra-0.4.3.34+dfsg.orig/lib/Kephra/Config/Default/ContextMenus.pm0000644000175000017500000001176611573643450024153 0ustar gregoagregoapackage Kephra::Config::Default::ContextMenus; our $VERSION = '0.03'; use strict; use warnings; sub get { return { 'editpanel_contextmenu' => [ 'item edit-changes-undo', 'item edit-changes-redo', undef, 'item edit-paste', 'item select-document', undef, 'item goto-last-edit', 'item view-dialog-find', undef, 'item file-save-current', 'item file-open', undef, 'item file-close-current', ], 'textselection_contextmenu' => [ 'item edit-copy', 'item edit-paste', 'item edit-replace', 'item edit-cut', 'item edit-delete', undef, 'item find-selection', 'item replace-selection', 'item tool-note-selection', undef, 'item edit-selection-comment-toggle-perl', undef, 'item edit-selection-convert-uppercase', 'item edit-selection-convert-lowercase', ], 'markermargin_contextmenu' => [ {'menu marker' => [ 'item marker-toggle-here', 'item marker-goto-prev-doc', 'item marker-goto-next-doc', 'item marker-goto-prev-all', 'item marker-goto-next-all', 'item marker-delete-doc', 'item marker-delete-all', ],}, undef, {'menu bookmark_toggle' => [ 'item bookmark-toggle-1', 'item bookmark-toggle-2', 'item bookmark-toggle-3', 'item bookmark-toggle-4', 'item bookmark-toggle-5', 'item bookmark-toggle-6', 'item bookmark-toggle-7', 'item bookmark-toggle-8', 'item bookmark-toggle-9', 'item bookmark-toggle-0', ],}, {'menu bookmark_goto' => [ 'item bookmark-goto-1', 'item bookmark-goto-2', 'item bookmark-goto-3', 'item bookmark-goto-4', 'item bookmark-goto-5', 'item bookmark-goto-6', 'item bookmark-goto-7', 'item bookmark-goto-8', 'item bookmark-goto-9', 'item bookmark-goto-0', ],}, 'item bookmark-delete-doc', 'item bookmark-delete-all', undef, 'item goto-line', undef, {'menu view_text_fold' => [ 'item view-editpanel-fold-toggle-here', 'item view-editpanel-fold-toggle-recursively', 'item view-editpanel-fold-toggle-level', 'item view-editpanel-fold-toggle-all', ],}, undef, 'checkitem view-editpanel-margin-marker', 'checkitem view-editpanel-margin-line-number', 'checkitem view-editpanel-margin-text-fold', {'menu view_textmargin' => [ 'radioitem view-editpanel-margin-text-0', 'radioitem view-editpanel-margin-text-1', 'radioitem view-editpanel-margin-text-2', 'radioitem view-editpanel-margin-text-3', 'radioitem view-editpanel-margin-text-4', 'radioitem view-editpanel-margin-text-6', 'radioitem view-editpanel-margin-text-8', 'radioitem view-editpanel-margin-text-10', 'radioitem view-editpanel-margin-text-12', ],}, ], 'searchbar_contextmenu' => [ 'checkitem search-attribute-incremental-switch', 'checkitem search-attribute-autowrap-switch', undef, 'checkitem search-attribute-regex-switch', 'checkitem search-attribute-match-whole-word-switch', 'checkitem search-attribute-match-word-begin-switch', 'checkitem search-attribute-match-case-switch', undef, 'radioitem search-range-selection', 'radioitem search-range-document', 'radioitem search-range-open-docs', ], 'status_syntaxstyle_contextmenu' => [ 'radioitem document-syntaxmode-c', 'radioitem document-syntaxmode-conf', 'radioitem document-syntaxmode-css', 'radioitem document-syntaxmode-html', 'radioitem document-syntaxmode-js', 'radioitem document-syntaxmode-perl', 'radioitem document-syntaxmode-xml', 'radioitem document-syntaxmode-yaml', undef, 'item document-syntaxmode-auto', 'checkitem document-syntaxmode-none', ], 'status_whitespace_contextmenu' => [ 'checkitem tool-auto-indention', 'checkitem tool-brace-indention', undef, 'checkitem view-editpanel-whitespace', {'menu document_tab_width' => [ 'checkitem document-tabs-width-1', 'checkitem document-tabs-width-2', 'checkitem document-tabs-width-3', 'checkitem document-tabs-width-4', 'checkitem document-tabs-width-5', 'checkitem document-tabs-width-6', 'checkitem document-tabs-width-8', ],}, {'menu document_convert' => [ 'item edit-document-convert-tabs2spaces', 'item edit-document-convert-spaces2tabs', '', 'item edit-document-convert-indent2spaces', 'item edit-document-convert-indent2tabs', '', 'item edit-document-format-del-trailing-whitespace', ],}, undef, 'radioitem document-tabs-soft', 'radioitem document-tabs-hard', ], 'status_lineendchar_contextmenu' => [ 'checkitem view-editpanel-indicator-EOL', undef, 'item document-EOL-auto', undef, 'radioitem document-EOL-lf', 'radioitem document-EOL-cr', 'radioitem document-EOL-cr+lf', ], 'status_info_contexmenu' => [ 'radioitem view-statusbar-info-none', 'radioitem view-statusbar-info-length', 'radioitem view-statusbar-info-date', ] } } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Config/Default/MainMenu.pm0000644000175000017500000004344411573643450023226 0ustar gregoagregoapackage Kephra::Config::Default::MainMenu; our $VERSION = '0.05'; use strict; use warnings; sub get { return [ {'menu file' => [ 'item file-new', undef, {'menu file_open file-open' => [ 'item file-open', 'item file-open-dir', undef, 'item file-insert', undef, 'item file-reload', 'item file-reload-all', ],}, 'menu file_history', undef, {'menu file_session' => [ 'item file-session-open', 'item file-session-add', 'item file-session-save', undef, 'item file-session-backup-open', 'item file-session-backup-save', undef, 'item file-session-import', 'item file-session-export', ],}, undef, 'item file-save-current', #'menu file_save' => [] 'item file-save-all', 'item file-save-as', 'item file-save-copy-as', 'item file-rename', #'item file-print', undef, {'menu file_close file-close-current' => [ 'item file-close-current', 'item file-close-other', 'item file-close-all', undef, 'item file-close-unsaved', 'item file-close-other-unsaved', 'item file-close-all-unsaved', ],}, undef, 'item app-exit-unsaved', 'item app-exit', ],}, {'menu edit' => [ 'item edit-changes-undo', 'item edit-changes-redo', {'menu edit_changes' => [ 'item edit-changes-undo-several', 'item edit-changes-redo-several', undef, 'item edit-changes-goto-begin', 'item edit-changes-goto-end', undef, 'item edit-changes-delete', ],}, undef, 'item edit-cut', 'item edit-copy', 'item edit-paste', 'item edit-replace', 'item edit-delete', undef, {'menu current_line' => [ 'item edit-line-cut', 'item edit-line-copy', 'item edit-line-duplicate', 'item edit-line-replace', 'item edit-line-swap', 'item edit-line-delete', 'item edit-line-delete-left', 'item edit-line-delete-right', undef, 'item edit-line-move-line-up', 'item edit-line-move-line-down', 'item edit-line-move-page-up', 'item edit-line-move-page-down', ],}, {'menu select' => [ 'item select-document', 'item select-toggle-simple', 'item select-toggle-content', ],}, {'menu selection' => [ 'item edit-selection-move-char-left', 'item edit-selection-move-char-right', 'item edit-selection-move-line-up', 'item edit-selection-move-line-down', 'item edit-selection-move-page-up', 'item edit-selection-move-page-down', ],}, #'menu navigation' => [, undef, {'menu selection_format' => [ 'item edit-selection-format-indent-char', 'item edit-selection-format-dedent-char', 'item edit-selection-format-indent-tab', 'item edit-selection-format-dedent-tab', 'item edit-selection-format-align-on-begin', undef, 'item edit-selection-format-join-lines', undef, 'item edit-selection-format-block-on-right-margin', 'item edit-selection-format-block-on-width', 'item edit-selection-format-linewrap-on-right-margin', 'item edit-selection-format-linewrap-on-width', undef, 'item edit-selection-format-del-trailing-whitespace', ],}, {'menu selection_comment' => [ 'item edit-selection-comment-add-perl', 'item edit-selection-comment-del-perl', 'item edit-selection-comment-toggle-perl', undef, 'item edit-selection-comment-add-c', 'item edit-selection-comment-del-c', undef, 'item edit-selection-comment-add-xml', 'item edit-selection-comment-del-xml', ],}, {'menu selection_convert' => [ 'item edit-selection-convert-uppercase', 'item edit-selection-convert-lowercase', 'item edit-selection-convert-titlecase', 'item edit-selection-convert-sentencecase', undef, 'item edit-selection-convert-spaces2tabs', 'item edit-selection-convert-tabs2spaces', undef, 'item edit-selection-convert-spaces2entities', 'item edit-selection-convert-entities2spaces', 'item edit-selection-convert-chars2entities', 'item edit-selection-convert-entities2chars', ],}, ],}, {'menu search' => [ 'item view-searchbar-goto', 'item view-dialog-find', 'item view-dialog-replace', {'menu find_functions' => [ 'item find-prev', 'item find-next', 'item find-first', 'item find-last', 'item find-selection', ],}, {'menu replace_functions' => [ 'item replace-prev', 'item replace-next', 'item replace-all', 'item replace-with-confirm', 'item replace-selection', ],}, {'menu search_attributes' => [ 'checkitem search-attribute-incremental-switch', 'checkitem search-attribute-autowrap-switch', undef, 'checkitem search-attribute-regex-switch', 'checkitem search-attribute-match-whole-word-switch', 'checkitem search-attribute-match-word-begin-switch', 'checkitem search-attribute-match-case-switch', undef, 'radioitem search-range-selection', 'radioitem search-range-document', 'radioitem search-range-open-docs', ],}, undef, 'item goto-line', 'item goto-last-edit', undef, {'menu marker' => [ 'item marker-goto-prev-doc', 'item marker-goto-next-doc', 'item marker-goto-prev-all', 'item marker-goto-next-all', 'item marker-toggle-here', 'item marker-delete-doc', 'item marker-delete-all', ],}, undef, {'menu bookmark_goto' => [ 'item bookmark-goto-1', 'item bookmark-goto-2', 'item bookmark-goto-3', 'item bookmark-goto-4', 'item bookmark-goto-5', 'item bookmark-goto-6', 'item bookmark-goto-7', 'item bookmark-goto-8', 'item bookmark-goto-9', 'item bookmark-goto-0', ],}, {'menu bookmark_toggle' => [ 'item bookmark-toggle-1', 'item bookmark-toggle-2', 'item bookmark-toggle-3', 'item bookmark-toggle-4', 'item bookmark-toggle-5', 'item bookmark-toggle-6', 'item bookmark-toggle-7', 'item bookmark-toggle-8', 'item bookmark-toggle-9', 'item bookmark-toggle-0', ],}, 'item bookmark-delete-doc', 'item bookmark-delete-all', ],}, {'menu tools' => [ 'item tool-interpreter-run-document', 'item tool-interpreter-stop-document', {'menu tool_output' => [ 'item tool-output-selection-dec', 'item tool-output-selection-hex', undef, 'item tool-output-env', 'item tool-output-inc', ],}, undef, 'menu insert_templates', 'item tool-choose-color', 'item tool-insert-time-date', undef, 'item tool-perl-insert-last-var', 'item tool-perl-copy-string', undef, 'item tool-note', 'item tool-note-selection', undef, 'checkitem tool-auto-indention', 'checkitem tool-brace-indention', 'checkitem tool-brace-completion', ],}, {'menu document' => [ {'menu document_change' => [ 'item document-change-prev', 'item document-change-next', 'item document-change-back', undef, 'item document-move-right', 'item document-move-left', ],}, undef, {'menu document_syntaxmode' => [ 'item document-syntaxmode-auto', 'checkitem document-syntaxmode-none', undef, {'menu document_syntaxmode_A-M' => [ 'checkitem document-syntaxmode-ada', 'checkitem document-syntaxmode-as', 'checkitem document-syntaxmode-asm', 'checkitem document-syntaxmode-ave', 'checkitem document-syntaxmode-baan', 'checkitem document-syntaxmode-batch', 'checkitem document-syntaxmode-c', 'checkitem document-syntaxmode-cs', 'checkitem document-syntaxmode-conf', 'checkitem document-syntaxmode-context', 'checkitem document-syntaxmode-css', 'checkitem document-syntaxmode-diff', 'checkitem document-syntaxmode-eiffel', 'checkitem document-syntaxmode-err', 'checkitem document-syntaxmode-forth', 'checkitem document-syntaxmode-fortran', 'checkitem document-syntaxmode-html', 'checkitem document-syntaxmode-idl', 'checkitem document-syntaxmode-java', 'checkitem document-syntaxmode-js', 'checkitem document-syntaxmode-latex', 'checkitem document-syntaxmode-lisp', 'checkitem document-syntaxmode-lua', 'checkitem document-syntaxmode-make', 'checkitem document-syntaxmode-matlab', ],}, {'menu document_syntaxmode_N-Z' => [ 'checkitem document-syntaxmode-nsis', 'checkitem document-syntaxmode-pascal', 'checkitem document-syntaxmode-perl', 'checkitem document-syntaxmode-php', 'checkitem document-syntaxmode-property', 'checkitem document-syntaxmode-ps', 'checkitem document-syntaxmode-python', 'checkitem document-syntaxmode-ruby', 'checkitem document-syntaxmode-scheme', 'checkitem document-syntaxmode-sh', 'checkitem document-syntaxmode-sql', 'checkitem document-syntaxmode-tcl', 'checkitem document-syntaxmode-tex', 'checkitem document-syntaxmode-vb', 'checkitem document-syntaxmode-vbs', 'checkitem document-syntaxmode-xml', 'checkitem document-syntaxmode-yaml', ],}, undef, {'menu document_syntaxmode_compiled' => [ 'checkitem document-syntaxmode-asm', 'checkitem document-syntaxmode-c', 'checkitem document-syntaxmode-cs', 'checkitem document-syntaxmode-eiffel', 'checkitem document-syntaxmode-forth', 'checkitem document-syntaxmode-fortran', 'checkitem document-syntaxmode-java', 'checkitem document-syntaxmode-pascal', ],}, {'menu document_syntaxmode_interpreted' => [ 'checkitem document-syntaxmode-batch', 'checkitem document-syntaxmode-js', 'checkitem document-syntaxmode-lisp', 'checkitem document-syntaxmode-lua', 'checkitem document-syntaxmode-nsis', 'checkitem document-syntaxmode-perl', 'checkitem document-syntaxmode-php', 'checkitem document-syntaxmode-ps', 'checkitem document-syntaxmode-python', 'checkitem document-syntaxmode-ruby', 'checkitem document-syntaxmode-scheme', 'checkitem document-syntaxmode-sh', 'checkitem document-syntaxmode-tcl', 'checkitem document-syntaxmode-vb', 'checkitem document-syntaxmode-vbs', ],}, {'menu document_syntaxmode_document' => [ 'checkitem document-syntaxmode-context', 'checkitem document-syntaxmode-css', 'checkitem document-syntaxmode-html', 'checkitem document-syntaxmode-latex', 'checkitem document-syntaxmode-ps', 'checkitem document-syntaxmode-tex', ],}, {'menu document_syntaxmode_data_structure' => [ 'checkitem document-syntaxmode-conf', 'checkitem document-syntaxmode-property', 'checkitem document-syntaxmode-sql', 'checkitem document-syntaxmode-xml', 'checkitem document-syntaxmode-yaml', ],}, {'menu document_syntaxmode_web' => [ 'checkitem document-syntaxmode-as', 'checkitem document-syntaxmode-css', 'checkitem document-syntaxmode-html', 'checkitem document-syntaxmode-js', 'checkitem document-syntaxmode-perl', 'checkitem document-syntaxmode-php', 'checkitem document-syntaxmode-vbs', ],}, {'menu document_syntaxmode_special' => [ 'checkitem document-syntaxmode-baan', 'checkitem document-syntaxmode-diff', 'checkitem document-syntaxmode-err', 'checkitem document-syntaxmode-idl', 'checkitem document-syntaxmode-make', 'checkitem document-syntaxmode-matlab', ],}, ],}, {'menu document_encoding' => [ 'radioitem document-encoding-ascii', #'radioitem document-encoding-latin1', 'radioitem document-encoding-utf8', ],}, 'checkitem document-tabs-use', {'menu document_tab_width' => [ 'radioitem document-tabs-width-1', 'radioitem document-tabs-width-2', 'radioitem document-tabs-width-3', 'radioitem document-tabs-width-4', 'radioitem document-tabs-width-5', 'radioitem document-tabs-width-6', 'radioitem document-tabs-width-8', ],}, {'menu document_lineendchar' => [ 'radioitem document-EOL-lf', 'radioitem document-EOL-cr', 'radioitem document-EOL-cr+lf', ],}, {'menu document_readonly' => [ 'radioitem document-readonly-as-attr', 'radioitem document-readonly-on', 'radioitem document-readonly-off', ],}, ],}, {'menu view' => [ {'menu view_window' => [ 'checkitem view-window-fullscreen', 'checkitem view-editpanel-maximize', 'checkitem view-window-stay-on-top', 'checkitem view-window-transparent', ],}, {'menu view_panel' => [ 'checkitem view-panel-output', 'checkitem view-panel-notepad', ],}, {'menu view_bars' => [ 'checkitem view-menubar', 'checkitem view-toolbar', 'checkitem view-tabbar', 'checkitem view-searchbar', 'checkitem view-statusbar', ],}, {'menu view_contextmenu' => [ #'checkitem view-tabbar-contexmenu', {'menu view_editpanel_contexmenu' => [ 'radioitem view-editpanel-contextmenu-custom', 'radioitem view-editpanel-contextmenu-default', 'radioitem view-editpanel-contextmenu-no', ],}, 'checkitem view-editpanel-margin-contexmenu', 'checkitem view-searchbar-contexmenu', 'checkitem view-statusbar-contexmenu', ],}, undef, 'checkitem view-editpanel-margin-marker', 'checkitem view-editpanel-margin-line-number', 'checkitem view-editpanel-margin-text-fold', {'menu view_text_fold' => [ 'item view-editpanel-fold-toggle-here', 'item view-editpanel-fold-toggle-recursively', 'item view-editpanel-fold-toggle-level', 'item view-editpanel-fold-toggle-all', ],}, {'menu view_textmargin' => [ 'radioitem view-editpanel-margin-text-0', 'radioitem view-editpanel-margin-text-1', 'radioitem view-editpanel-margin-text-2', 'radioitem view-editpanel-margin-text-3', 'radioitem view-editpanel-margin-text-4', 'radioitem view-editpanel-margin-text-6', 'radioitem view-editpanel-margin-text-8', 'radioitem view-editpanel-margin-text-10', 'radioitem view-editpanel-margin-text-12', ],}, undef, 'checkitem view-editpanel-right-margin', 'checkitem view-editpanel-line-wrap', 'checkitem view-editpanel-indicator-indention-guide', 'checkitem view-editpanel-indicator-brace-light', 'checkitem view-editpanel-indicator-caret-line', 'checkitem view-editpanel-indicator-EOL', 'checkitem view-editpanel-indicator-whitespace', 'item view-editpanel-font', {'menu view_zoom' => [ 'item view-editpanel-zoom-in', 'item view-editpanel-zoom-out', 'item view-editpanel-zoom-normal', ],}, ],}, {'menu config' => [ 'item view-dialog-config', undef, 'menu config_app_lang', undef, {'menu config_global' => [ 'item config-file-global-open', 'item config-file-global-reload', 'item config-file-global-save', undef, 'item config-file-global-load-from', 'item config-file-global-merge', 'item config-file-global-save-as', undef, 'item config-file-global-load-backup', 'item config-file-global-load-defaults', ],}, {'menu config_interface' => [ 'item config-file-interface-commandlist', 'item config-file-interface-menubar', 'item config-file-interface-contextmenu', 'item config-file-interface-toolbar', #'item config-file-interface-maintoolbar', #'item config-file-interface-searchbar', #'item config-file-interface-statusbar', ],}, 'menu config_localisation', {'menu config_syntaxmode_A-M' => [ 'item config-file-syntaxmode-ada', 'item config-file-syntaxmode-as', 'item config-file-syntaxmode-asm', 'item config-file-syntaxmode-ave', 'item config-file-syntaxmode-baan', 'item config-file-syntaxmode-batch', 'item config-file-syntaxmode-c', 'item config-file-syntaxmode-cs', 'item config-file-syntaxmode-conf', 'item config-file-syntaxmode-context', 'item config-file-syntaxmode-css', 'item config-file-syntaxmode-diff', 'item config-file-syntaxmode-eiffel', 'item config-file-syntaxmode-err', 'item config-file-syntaxmode-forth', 'item config-file-syntaxmode-fortran', 'item config-file-syntaxmode-html', 'item config-file-syntaxmode-idl', 'item config-file-syntaxmode-java', 'item config-file-syntaxmode-js', 'item config-file-syntaxmode-latex', 'item config-file-syntaxmode-lisp', 'item config-file-syntaxmode-lua', 'item config-file-syntaxmode-make', 'item config-file-syntaxmode-matlab', ],}, {'menu config_syntaxmode_N-Z' => [ 'item config-file-syntaxmode-nsis', 'item config-file-syntaxmode-pascal', 'item config-file-syntaxmode-perl', 'item config-file-syntaxmode-php', 'item config-file-syntaxmode-property', 'item config-file-syntaxmode-ps', 'item config-file-syntaxmode-python', 'item config-file-syntaxmode-ruby', 'item config-file-syntaxmode-scheme', 'item config-file-syntaxmode-sh', 'item config-file-syntaxmode-sql', 'item config-file-syntaxmode-tcl', 'item config-file-syntaxmode-tex', 'item config-file-syntaxmode-vb', 'item config-file-syntaxmode-vbs', 'item config-file-syntaxmode-xml', 'item config-file-syntaxmode-yaml', ],}, 'item config-file-templates', ],}, {'menu help' => [ 'item view-documentation-welcome', 'item view-documentation-this-version', 'item view-documentation-navigation-guide', 'item view-documentation-feature-list', 'item view-documentation-advanced-tour', 'item view-documentation-credits', undef, 'item view-webpage-documentation', 'item view-webpage-forum', 'item view-webpage-bug-tracker', 'item view-webpage-feature-wish', undef, 'item view-dialog-keymap', 'item view-dialog-info', ],}, ] } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Config/Default/ToolBars.pm0000644000175000017500000000250011573643450023226 0ustar gregoagregoapackage Kephra::Config::Default::ToolBars; use strict; use warnings; our $VERSION = '0.01'; sub get { return { main_toolbar => [ 'item file-new', 'item file-open', 'item file-print#', 'item file-close-current#', 'item file-save-all', 'item file-save', undef, 'item edit-changes-undo', 'item edit-changes-redo', undef, 'item edit-cut', 'item edit-copy', 'item edit-paste', 'item edit-replace', 'item edit-delete', undef, 'checkitem view-editpanel-line-wrap', 'checkitem view-window-stay-on-top', undef, 'item tool-interpreter-run-document', 'checkitem view-panel-output', 'checkitem view-panel-notepad', undef, 'item view-dialog-find#', 'item view-dialog-config#', 'item view-dialog-keymap#', ], searchbar => [ 'item view-searchbar', 'combobox find 180', 'item find-prev', 'item find-next', undef, 'item goto-last-edit', undef, 'item marker-goto-prev-all', 'item marker-goto-next-all', undef, 'item goto-line', 'item view-dialog-find', ], statusbar => [ 'textpanel cursor 66', 'textpanel selection 60', 'textpanel syntaxmode 50', 'textpanel codepage 40', 'textpanel tab 25', 'textpanel EOL 32', 'textpanel message -1', ], } } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Config/Default/GlobalSettings.pm0000644000175000017500000003241611701674317024432 0ustar gregoagregoapackage Kephra::Config::Default::GlobalSettings; our $VERSION = '0.16'; use strict; use warnings; sub get { return { about => { purpose => 'build in global settings', version => $Kephra::VERSION || 'no', }, app => { app_data_sub_dir => 'interface', cache => { file => 'commands.yaml', sub_dir => 'cache', use => 1, }, commandlist => { file => 'interface/commands.conf', node => 'commandlist', }, contextmenu => { defaultfile => 'interface/contextmenus.yml', id => { document_context => 'editpanel_contextmenu', document_list => '&document_change', document_selection => 'textselection_contextmenu', file_history => '&file_history', insert_templates => '&insert_templates', marker_margin => 'markermargin_contextmenu', status_eol => 'status_lineendchar_contextmenu', status_encoding => 'status_encoding_contextmenu', status_info => 'status_info_contexmenu', status_syntaxmode => 'status_syntaxstyle_contextmenu', status_tab => 'status_whitespace_contextmenu', toolbar_search => 'searchbar_contextmenu', }, }, error_output => 'panel', # (dialog|console|panel|none) iconset_path => 'interface/icon/set/jenne', # rootpath for all icons localisation => { directory => 'localisation', file => 'english.conf', # file relative to the localisation directory, defines language of the texts in the program }, menubar => { file => 'interface/mainmenu.yml', node => 'full_menubar', responsive => 1, # (0|1) 0 prevent menubar item shading visible => 1, }, panel => { notepad => { content_file => 'global/data/notepad_content.txt', eval_with => 'eval', font_family => 'Courier New', font_size => 10, size => 180, splitter_pos => 300, visible => 0, }, output => { append => 0, back_color => '000022', font_family => 'Arial', font_size => 10, fore_color => 'ffffff', interpreter_path => 'perl', size => 100, visible => 0, }, }, searchbar => { autofocus => 0, autohide => 0, contextmenu => 'toolbar_search', contextmenu_visible => 1, file => 'interface/appbars.conf', node => 'searchbar', position => 'below', # (above|below|bottom) visible => 1, }, statusbar => { contextmenu_visible => 1, file => 'interface/appbars.yml', interactive => 1, node => 'statusbar', msg_nr => 0, visible => 1, }, tabbar => { close_button => 'current' ,# (all|current|active|one|right|no) current = active # one = right, on right border contextmenu => 'document_list',# -NI id of connected context menu contextmenu_visible => 1, # (0|1) enable conextmenu over tabbar file_info => 'file_name', # (file_name|firstname) which part of filename to show info_symbol => 1, # (0|1) show *(unsaved) and #(write protected) symbols on end of tabs insert_new_tab => 'rightmost', # (left|right[most]) tab position of opened file mark_configs => 1, # (0|1) set configfile names in square brackets max_tab_width => 25, # max tab width in chars, longer filenames will be cut and ... added middle_click => 'file-close-current',# -NI command that is performed when middle click over tabbar movable_tabs => 1, # (0|1) if 0 tabs can't moved by mouse or key number_tabs => 0, # (0|1) display a number before the file name in the tabs switch_back => 1, # -NI (0|1) switch back if you klick on current tab tablist_button => 1, # (0|1) visible => 1, # (0|1) }, toolbar => { contextmenu => 0, file => 'interface/appbars.yml', node => 'main_toolbar', responsive => 1, size => 16, visible => 1, }, window => { default => { position_x => 0, position_y => 0, size_x => 800, size_y => 600, }, fullscreen => 0, icon => 'interface/icon/app/proton.xpm', max_number => 1, maximize_editpanel => 0, position_x => 10, position_y => 10, save_position => 1, size_x => 660, size_y => 531, stay_on_top => 0, title => '$filepath - $appname $version', # $filepath - path of current file # $filename - just the name.exe # $docnr - nr of current file # $doccount - nr of all opened files # $appname - name of this programm # $version - version of this programm transparency => 0.2, # how much transparent if active, 1 = 100% = invisible transparent => 0, # (0|1) trancparency active ? }, xp_style => 1, }, dialog => { button_handing => 'right', config => { save_position => 1, position_y => 100, position_x => 100, tooltips => 1, }, search => { save_position => 1, position_y => 100, position_x => 100, tooltips => 1, transparency => 0.2, # 0 - full visible .. 1 - invisible width => 436, }, }, editpanel => { DND_mode => 'copy', auto => { brace => { glue_tangent => 0, indention => 1,# indet after opening braces 1 tab more join => 1, # deletes closing bracket if there are 2 and 1 has no matching partner make => 1, # generates closing bracket for ne blocks }, focus => 0, # set focus on editpanel while onmouseover indention => 1, # indents new lines like previous }, contextmenu => { ID_margin => 'marker_margin', ID_normal => 'document_context', ID_selection => 'document_selection', visible => 'custom', margin => 1, }, control => { mouse => { 'left-selection' => 'edit-copy', 'left-middle' => 'edit-paste', 'left-right' => 'edit-cut', 'middle-selected' => 'edit-insert-selection-at-cursor', 'middle-selection' => 'find-selection, find-next', 'middle' => 'goto-last-edit', }, use_advanced_mouse_functions => 1, }, font => { family => 'Courier New', size => 10, style => 'normal', weight => 'normal', }, history => { fast_undo_steps => '7', }, indicator => { bracelight => { back_color => '99ff99', bad_color => 'ff0000', good_color => '0000ff', mode => 'adjacent', visible => 1, }, caret => { color => '0000ff', period => 500, width => 2 }, caret_line => { color => 'f5f5a5', visible => 1, }, end_of_line_marker => 0, indent_guide => { visible => 1, color => 'bbbbbb', }, right_margin => { color => 'ccccff', position => 80, style => 1, }, selection => { back_color => '001177', fore_color => 'f3f3f3' }, whitespace => { color => 'cccc99', visible => 1, }, }, line_wrap => 0, margin => { fold => { back_color => 'fff5f5', fore_color => 'aa9977', flag_line => 1, keep_caret_visible => 1, style => 'boxes', # (boxes|arrows) apearance of the fold marker visible => 1, }, linenumber => { autosize => 1, back_color => 'd8d8d4', fore_color => '777788', min_width => 3, visible => 1, }, marker => { back_color => '0022ff', fore_color => '000055', visible => 1 }, text => 2 }, scroll_width => '640', word_chars => '$%-@_abcdefghijklmnopqrstuvwxyzäöüßABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ0123456789', }, file => { current => { directory => '', }, defaultsettings => { new => { # defaults for new docs EOL => 'OS', # (OS|auto|cr|lf|cr+lf) end of line character, OS means current OS standart -NI auto means take setting of the last touched file codepage => 'ascii', # (8bit|utf8) codepage, used for charset cursor_pos => 0, readonly => 'no', # (0|1|2|on|off|protect) if =1 it set a write protection on readonly files syntaxmode => 'perl', # (auto|none|lang_id) which syntaxstyle on new files tab_size => '4', # (0..n) how much (white)spaces equals one tab? tab_use => '1', # (0|1) use of tab chars }, open => { # defaults for opened files EOL => 'auto',# (auto|cr+lf|cr|lf) EOL of opened files, if not set to auto, # the file automaticly will converted to set value codepage => 'auto',# (ascii|utf8) codepage, used for charset cursor_pos => 0, readonly => 'protect', # (0|1|2|on|off|protect) if =1 it set a write protection on readonly files syntaxmode => 'auto', # (auto|none|lang_id) which syntaxstyle on new files tab_size => '4', # (0..n) how much (white)spaces equals one tab? tab_use => 'auto', # (auto|0|1) use of tab chars }, }, endings => { ada => 'ada ads adb', as => 'as', asm => 's asm', ave => 'ave', baan => 'bc cln', batch => 'bat cmd nt', conf => 'conf', context => 'tuo sty', cpp => 'c cc cpp cxx h', cs => 'cs', css => 'css', diff => 'diff patch', err => 'err errorlist', eiffel => 'e', forth => 'forth', fortran => 'f for f77 f90 f95 f2k', haskell => 'hs', html => 'htm html ssi shtml xhtml tag stag', java => 'jav java', js => 'js', idl => 'idl odl', latex => 'aux toc idx', lisp => 'el jl lsp lisp', lua => 'lua', make => 'makefile Makefile mak configure', matlab => 'm octave', nsis => 'nsi nsh', perl => 'pl ple plx plex pm pod cgi', php => 'php php3 php4 phtml', property => 'properties session ini inf reg url cfg cnf aut', ps => 'ps', pascal => 'pas dpr dpk dfm inc pp', python => 'py pyw', ruby => 'rb', scheme => 'scm smd ss', sh => 'bsh sh', sql => 'sql', tcl => 'tcl tk itk', tex => 'tex sty', text => 'txt nfo', vb => 'vb bas frm cls ctl pag dsr dob', vbs => 'vbs dsm', xml => 'xml xsl svg xul xsd dtd xslt axl xrc rdf', yaml => 'yaml yml', }, group => { config => 'conf', perl => 'perl', text => 'text', web => 'css html php perl js', }, open => { dir_recursive => 1, # opens dirs recursive each_once => 1, # opens each file only once in_current_dir => 1, # opens dialog with the directory of current file into_empty_doc => 0, # replacing new empty documents while opening a file into_only_empty_doc => 1, # replacing new empty doc if the empty is the only one notify_change => 30,# (0..n) timer executed check if file has changed in sec only_text => 0, # to open only text files single_doc => 0, # opens only 1 document at once, enables an single document editor }, save => { auto_save => 30, # -NI(0|n) timer executed save after n sec b4_quit => 'ask', # (yes|no|ask) filesaving before closing a file b4_close => 'ask', # (yes|no|ask) filesaving before closing the progr change_doc => 0, # saves everytime you change document empty => 0, # -NI saves (restore) automaticly also empty files on_leave => 0, # -NI save on leaving focus of current document overwrite => 'ask', # (yes|no|ask) before overwriting files reload_config => 1, # reload config automatic after saving it tilde_backup => 0, # creates UNIX backup files with filename+~ unchanged => 0, # saves (touches) automaticly also unchanged files }, session => { auto => { file => 'current.yaml', node => '', save => 1, }, backup => 'backup.yaml', directory => 'session', # subdir of config where to look for session files history => { file => 'history.yml', length => 13, node => '', save => 1, }, }, templates => { directory => 'template', file => 'perl.conf', }, }, search => { attribute => { auto_wrap => 1, fast_steps => 7, in => 'document', incremental => 1, match_case => 0, match_regex => 0, match_whole_word => 0, match_word_begin => 0, }, data_file => 'global/data/search.yml', history => { length => 12, remember_only_matched => 1, save => 1, use => 1, }, marker => { any => 1, wrap => 1, }, }, texts => { special => 'english/special_feature.txt', credits => 'english/license/credits.txt', feature => 'english/all_feature.txt', keymap => 'english/keymap.txt', license => 'english/license/gpl.txt', navigation => 'english/navigation.txt', version => 'english/this_version.txt', welcome => 'english/welcome.txt', } } } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Config/Global.pm0000644000175000017500000001712211573643450021323 0ustar gregoagregoapackage Kephra::Config::Global; our $VERSION = '0.29'; use strict; use warnings; # handling main config files under /config/global/ my %settings; sub settings { \%settings } sub _settings { my $conf = shift; %settings = %$conf if ref $conf eq 'HASH'; \%settings; } sub merge_hash_into_settings { my $conf = shift; return unless ref $conf eq 'HASH'; _settings( Kephra::Config::Tree::update( settings(), $conf ) ); } sub merge_subfile_into_settings { my $file = shift; return unless $file; $file = Kephra::Config::filepath( _sub_dir(), 'sub', $file ); return unless -r $file; merge_hash_into_settings( Kephra::Config::File::load($file) ); } sub _sub_dir {'global'} my ($auto_file, $current_file); sub current_file{ $current_file = defined $_[0] ? $_[0] : $current_file } sub auto_file { $auto_file = defined $_[0] ? $_[0] : $auto_file } sub autoload { my $autosave = auto_file(); current_file( $autosave ); my $backup = $autosave . '~'; #$main::logger->debug("autoload"); for my $file ($autosave, $backup) { if ( -e $file ) { my $config_tree = Kephra::Config::File::load($file); %settings = %$config_tree if ref $config_tree eq 'HASH'; if (exists $settings{about}{version} and $settings{about}{version} ne $Kephra::VERSION){ rename $file, $file . '.old'; %settings = %{ Kephra::Config::Tree::update( Kephra::Config::Default::global_settings(), \%settings, ) }; $settings{about}{version} = $Kephra::VERSION; } last if %settings; rename $file, $file . '.failed'; } } %settings ? evaluate() : load_defaults(); Kephra::File::History::init(); # are settings loaded, hist init will produce one keys %settings; } sub autosave { #$main::logger->debug("save_autosaved"); my $file_name = auto_file(); rename $file_name, $file_name . '~'; Kephra::Config::File::store( $file_name, \%settings ); } sub open_current_file { save_current(); Kephra::Config::open_file_absolute( current_file() ); #Kephra::File::reload_current(); } sub load_backup_file { reload( auto_file() . '~' ) } sub load_defaults { %settings = %{ Kephra::Config::Default::global_settings() }; evaluate(); } sub load_from { my $file_name = Kephra::Dialog::get_file_open( Kephra::Config::Localisation::strings()->{dialog}{config_file}{load}, Kephra::Config::dirpath( _sub_dir() ), $Kephra::temp{file}{filterstring}{config} ); reload($file_name) if -e $file_name; current_file($file_name); } sub update { Kephra::App::Window::save_positions(); Kephra::Document::Data::update_attributes(); Kephra::Edit::Search::save_search_data(); Kephra::App::EditPanel::Fold::store(); Kephra::App::Panel::Notepad::save(); Kephra::App::Panel::Output::save(); } sub evaluate { my $t0 = new Benchmark; Kephra::EventTable::del_all(); Kephra::EventTable::stop_timer(); my $t1 = new Benchmark; print " iface cnfg:", Benchmark::timestr( Benchmark::timediff( $t1, $t0 ) ), "\n" if $Kephra::BENCHMARK; # set interna to default $Kephra::app{GUI}{masterID} = 20; $Kephra::temp{dialog}{control} = 0; Kephra::Document::SyntaxMode::_ID('none'); Kephra::Edit::Search::_refresh_search_flags(); # delete unnecessary ecaping of vars Kephra::API::settings()->{app}{window}{title}=~ s/\\\$/\$/g; my $t2 = new Benchmark; print " prep. data:", Benchmark::timestr( Benchmark::timediff( $t2, $t1 ) ), "\n" if $Kephra::BENCHMARK; # loading interface data (localisation, menus and bar defs) Kephra::Config::Interface::load(); my $t3 = new Benchmark; print " create gui:", Benchmark::timestr( Benchmark::timediff( $t3, $t2 ) ), "\n" if $Kephra::BENCHMARK; # main window components Kephra::App::Window::apply_settings(); Kephra::App::ContextMenu::create_all(); Kephra::App::MenuBar::create(); Kephra::App::MainToolBar::show(); Kephra::App::SearchBar::create(); Kephra::App::TabBar::apply_settings(); Kephra::App::StatusBar::create(); Kephra::App::Panel::Notepad::create(); Kephra::App::Panel::Output::create(); Kephra::App::assemble_layout(); Kephra::Config::Interface::del_temp_data(); my $t4 = new Benchmark; print " apply sets:", Benchmark::timestr( Benchmark::timediff( $t4, $t3 ) ), "\n" if $Kephra::BENCHMARK; Kephra::App::ContextMenu::connect_all(); Kephra::App::EditPanel::apply_settings_here(); Kephra::Config::build_fileendings2syntaxstyle_map(); Kephra::Config::build_fileendings_filterstring(); Kephra::EventTable::start_timer(); #todo: #Kephra::EventTable::thaw_all(); #Kephra::App::clean_acc_table(); return 1; } sub reload { my $configfile = shift || current_file(); if ( -e $configfile ) { Kephra::Document::Data::update_attributes(); my %test_hash = %{ Kephra::Config::File::load($configfile) }; if (%test_hash) { %settings = %test_hash; reload_tree(); } else { save(); Kephra::File::reload_current(); } } else { my $err_msg = Kephra::Config::Localisation::strings()->{dialog}{error}; Kephra::Dialog::warning_box ($err_msg->{file_find} . "\n $configfile", $err_msg->{config_read} ); } } sub reload_tree { update(); evaluate(); Kephra::App::TabBar::refresh_all_label(); Kephra::Document::Data::evaluate_attributes(); } sub reload_current { reload( current_file() ) } sub eval_config_file { my $file_path = Kephra::Config::standartize_path_slashes( shift ); my $config_path = Kephra::Config::dirpath(); my $l_path = length $config_path; if ($config_path eq substr( $file_path, 0, $l_path)){ $file_path = substr $file_path, $l_path+1; } my $conf = settings()->{app}; my $match = \&Kephra::Config::path_matches; if ( &$match( $file_path, auto_file(), $conf->{localisation_file}, $conf->{commandlist}{file} )) { return reload(); } if ( &$match( $file_path, $conf->{menubar}{file} ) ) { return Kephra::App::MenuBar::create() } if ( &$match( $file_path, $conf->{toolbar}{main}{file} ) ) { return Kephra::App::MainToolBar::create(); } if ( &$match( $file_path, $conf->{toolbar}{search}{file} ) ) { Kephra::App::SearchBar::create(); Kephra::App::SearchBar::position(); return; } # reload template menu wenn template file changed if ( &$match($file_path, Kephra::Config::path_from_node($settings{file}{templates})) ){ return Kephra::Menu::set_absolete('insert_templates'); } reload() if Kephra::Document::Data::get_attribute('config_file'); } # sub save { my $file_name = shift || current_file(); update(); Kephra::Config::File::store( $file_name, \%settings ); } sub save_as { my $file_name = Kephra::Dialog::get_file_save( Kephra::Config::Localisation::strings()->{dialog}{config_file}{save}, Kephra::Config::dirpath( _sub_dir() ), $Kephra::temp{file}{filterstring}{config} ); save($file_name) if ( length($file_name) > 0 ); } sub save_current { save( current_file() ) } # sub merge_with { my $filename = Kephra::Dialog::get_file_open( Kephra::Config::Localisation::strings()->{dialog}{config_file}{load}, Kephra::Config::dirpath( _sub_dir(), 'sub'), $Kephra::temp{file}{filterstring}{config} ); load_subconfig($filename); } # sub load_subconfig { my $file = shift; if ( -e $file ) { merge_hash_into_settings( Kephra::Config::File::load($file) ); reload_tree(); } } sub open_templates_file { my $config = $settings{file}{templates}; Kephra::Config::open_file( $config->{directory}, $config->{file} ); } 1; __END__ =head1 NAME Kephra::Config::Global - loading and storing the config settings for the app =head1 DESCRIPTION =cut kephra-0.4.3.34+dfsg.orig/lib/Kephra/Config/Default.pm0000644000175000017500000000545711573643450021517 0ustar gregoagregoapackage Kephra::Config::Default; our $VERSION = '0.19'; use strict; use warnings; # complete set of config to be able to start app under all circumstances sub global_settings { require Kephra::Config::Default::GlobalSettings; my $config = Kephra::Config::Default::GlobalSettings::get(); if ($^O =~ /linux/i) { $config->{editpanel}{font}{family} = 'DejaVu Sans Mono'; $config->{editpanel}{font}{size} = 10; $config->{app}{panel}{output}{font_family} = 'DejaVu Sans Mono'; $config->{app}{panel}{output}{font_size} = 9; $config->{app}{panel}{notepad}{font_family} = 'Nimbus Sans L'; $config->{app}{panel}{notepad}{font_size} = 10; $config->{app}{window}{position_x} = 10; $config->{app}{window}{position_y} = 10; $config->{app}{window}{size_x} = 770; $config->{app}{window}{size_y} = 525; } elsif ($^O =~ /darwin/i) { $config->{editpanel}{font}{family} = 'Monaco'; $config->{editpanel}{font}{size} = 12; $config->{app}{panel}{output}{font_family} = 'Monaco'; $config->{app}{panel}{output}{font_size} = 11; $config->{app}{panel}{notepad}{font_family} = 'Arial'; $config->{app}{panel}{notepad}{font_size} = 12; $config->{app}{window}{position_x} = 10; $config->{app}{window}{position_y} = 25; $config->{app}{window}{size_x} = 780; $config->{app}{window}{size_y} = 565; } return $config; } sub commandlist { require Kephra::Config::Default::CommandList; Kephra::Config::Default::CommandList::get(); } sub localisation { require Kephra::Config::Default::Localisation; Kephra::Config::Default::Localisation::get(); } sub mainmenu { require Kephra::Config::Default::MainMenu; Kephra::Config::Default::MainMenu::get(); } sub contextmenus { require Kephra::Config::Default::ContextMenus; Kephra::Config::Default::ContextMenus::get(); } sub toolbars { require Kephra::Config::Default::ToolBars; Kephra::Config::Default::ToolBars::get(); } sub drop_xp_style_file{ my $file = shift; my $content = < MOM Client Application EOD my $l18n = Kephra::Config::Localisation::strings()->{dialogs}{error}; open my $FILE, '>', $file or Kephra::Dialog::warning_box ($l18n->{file_write}." $file", $l18n->{file}); print $FILE $content; } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Config/Localisation.pm0000644000175000017500000001215211573643450022542 0ustar gregoagregoapackage Kephra::Config::Localisation; our $VERSION = '0.08'; use strict; use warnings; use File::Find(); use YAML::Tiny(); # handling config files under config/localisation my %strings; sub _set_strings { %strings = %{$_[0]} if ref $_[0] eq 'HASH' } sub strings { \%strings } sub _config { Kephra::API::settings()->{app}{localisation} } sub _sub_dir { _config->{directory} if _config->{directory} } my %index; sub _index { if (ref $_[0] eq 'HASH') {%index = %{$_[0]}} else { \%index } } my $language; sub language { $language } sub file { Kephra::Config::filepath( _sub_dir(), _config()->{file} ) } sub set_file_name { file_name($_[0]) if defined $_[0]} sub file_name { if (defined $_[0]) { _config()->{file} = $_[0] } else { _config()->{file} } } sub set_lang_by_file { $language = $index{ _config()->{file} }{language} } # sub load { my $file = file(); # can only be conf because yaml tine doesnt support utf, 1 activates utf my $l = Kephra::Config::File::load_conf( $file, 1 ) if defined $file; $l = Kephra::Config::Default::localisation() unless $l and %$l; %strings = %$l; set_lang_by_file(); } sub change_to { my ($lang_file) = shift; return unless $lang_file; set_documentation_lang( _index()->{$lang_file}{iso_code} ); set_file_name( $lang_file ); Kephra::Config::Global::reload_tree(); } # open localisation file in the editor sub open_file { my $lang_file = shift; $lang_file eq file_name() ? Kephra::Config::open_file( _sub_dir(), $lang_file ) : Kephra::Document::add( Kephra::Config::filepath(_sub_dir(), $lang_file) ); } # create menus for l18n selection nd opening l18n files sub create_menus { my $l18n_index = _index(); return unless ref $l18n_index eq 'HASH'; my $l18n = strings()->{commandlist}{help}{config}; my ($al_cmd, $fl_cmd) = ('config-app-lang', 'config-file-localisation'); my ($al_help, $fl_help) = Kephra::CommandList::get_property_list ('help', $al_cmd, $fl_cmd); my (@config_app_lang, @config_localisation); for my $lang_file (sort keys %$l18n_index) { my $lang_data = $l18n_index->{$lang_file}; my $lang = ucfirst $lang_data->{language}; my $lang_code = $lang_data->{iso_code} || ''; my $al_lang_cmd = "$al_cmd-$lang_code"; my $fl_lang_cmd = "$fl_cmd-$lang_code"; Kephra::CommandList::new_cmd( $al_lang_cmd, { call => 'Kephra::Config::Localisation::change_to('."'".$lang_file."')", state => 'Kephra::Config::Localisation::file_name() eq '."'".$lang_file."'", label => $lang, help => "$al_help $lang", }); Kephra::CommandList::new_cmd( $fl_lang_cmd, { call => 'Kephra::Config::Localisation::open_file('."'".$lang_file."')", label => $lang, help => "$fl_help $lang", }); push @config_app_lang, 'item '.$al_lang_cmd; push @config_localisation, 'item '.$fl_lang_cmd; } Kephra::Menu::create_static('config_localisation',\@config_localisation); Kephra::Menu::create_static('config_app_lang', \@config_app_lang); } sub refresh_index { my $use_cache = Kephra::Config::Interface::_config()->{cache}{use}; my $index_file = Kephra::Config::filepath (Kephra::Config::Interface::_cache_sub_dir(), 'index_l18n.yml'); my $l18n_dir = Kephra::Config::dirpath( _sub_dir() ); my %old_index = %{ YAML::Tiny::LoadFile( $index_file ) } if -e $index_file; my %new_index; my ($FH, $file_name, $age); my $getmetaheader = qr|[\r\n]+(.*)[\r\n]+|s; my $lines = qr/[\r\n]+/; my $seperatekv = qr/\s*(\S+)\s*=\s*(.+)\s*/; #$File::Find::prune = 0; File::Find::find( sub { return if -d $_; $file_name = $_; $age = Kephra::File::IO::get_age($file_name); # if file is known and not refreshed just copy loaded data if (exists $old_index{$file_name} and $age == $old_index{$file_name}{age}) { $new_index{$file_name} = $old_index{$file_name}; return; } open $FH, "<", $file_name ; #:encoding(UTF-8) binmode($FH, ":raw"); #:crlf my ($chunk, $header, %filedata) = ('',''); #read just the meta data header do { return if eof $FH; # abort because no complete about header found read $FH, $chunk, 1000; $header .= $chunk; } until $header =~ /$getmetaheader/; # split to lines, delete spaces and extract keys and valuse for (split /$lines/, $1){ /$seperatekv/; $filedata{$1} = $2; } $filedata{'age'} = $age; # filter out local backup files of l18n files - not save for any file ending return if $filedata{language}.'.conf' ne $file_name; $new_index{$file_name} = \%filedata if defined $filedata{'purpose'} and $filedata{'purpose'} eq 'global localisation' # if its an stable enduser version the l18n strings has to be updated and (not defined $Kephra::PATCHLEVEL or $filedata{'version'} eq $Kephra::VERSION); }, $l18n_dir); YAML::Tiny::DumpFile($index_file, \%new_index); _index(\%new_index); \%new_index; } sub set_documentation_lang { my $lang = shift; return until $lang; $lang = $lang eq 'de' ? 'deutsch' : 'english'; Kephra::Config::Global::merge_subfile_into_settings ( Kephra::Config::filepath('documentation', $lang.'.conf') ); } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Config/Interface.pm0000644000175000017500000000552711573643450022031 0ustar gregoagregoapackage Kephra::Config::Interface; our $VERSION = '0.08'; use strict; use warnings; # handling config files under config/interface sub _config { Kephra::API::settings()->{app} } sub _sub_dir { _config()->{app_data_sub_dir} } sub _cache_sub_dir { File::Spec->catdir(_sub_dir(), _config()->{cache}{sub_dir})} sub load { Kephra::CommandList::clear(); Kephra::Config::Localisation::refresh_index(); my $use_cache = _config()->{cache}{use}; # config allow to use the cache my $load_cache = 0; # cache is successful loaded my (%file,%old_index,%new_index); if ($use_cache and 0) { # supend using cache my $read = \&Kephra::Config::File::load; my $path = \&Kephra::Config::filepath; my $get_age = \&Kephra::File::IO::get_age; my $cache_dir = _cache_sub_dir(); $file{index} = &$path( $cache_dir, 'index_cmd.yml'); $file{cmd_cache} = &$path( $cache_dir, 'cmd_main.yml' ); $file{l18n_cache}= &$path( $cache_dir, 'l18n_main.yml'); $file{cmd} = Kephra::CommandList::file(); $file{l18n} = Kephra::Config::Localisation::file(); %old_index = %{ &$read($file{index}) } if -e $file{index}; %new_index = ( 'l18n' => {'file' => $file{cmd}, 'age' => &$get_age($file{cmd})}, 'cmd' => {'file' => $file{l18n}, 'age' => &$get_age($file{l18n})}, ); if (-e $file{cmd} and -e $file{l18n}) { YAML::Tiny::DumpFile( $file{index}, \%new_index ); if (-e $file{cmd_cache} and -e $file{l18n_cache} and scalar keys %new_index == scalar keys %old_index) { $load_cache = 1; for (keys %new_index) { $load_cache = 0 unless $new_index{$_}{age} == $old_index{$_}{age} and $new_index{$_}{file}eq $old_index{$_}{file}; } } if ($load_cache) { Kephra::CommandList::data( &$read( $file{cmd_cache} ) ); Kephra::Config::Localisation::_set_strings ( &$read( $file{l18n_cache} ) ); Kephra::Config::Localisation::set_lang_by_file(); } } else { unlink $file{index} if -e $file{index}; } } unless ($load_cache) { Kephra::Config::Localisation::load(); Kephra::CommandList::load(); del_temp_data(); if ($use_cache) { my $write = \&YAML::Tiny::DumpFile; &$write( $file{cmd_cache}, Kephra::CommandList::data() ); &$write( $file{l18n_cache}, Kephra::Config::Localisation::strings() ); } } Kephra::CommandList::eval_data(); Kephra::Config::Localisation::create_menus(); Kephra::App::EditPanel::create_mouse_binding(); } sub del_temp_data { Kephra::CommandList::del_temp_data() } sub open_file { my $item = shift; my $config = _config(); return unless exists $config->{$item}; my $file = $config->{$item}{file}; $file = $config->{$item}{defaultfile} if $item eq 'contextmenu'; $file = $config->{$item}{file} if $item eq 'toolbar'; Kephra::Config::open_file( $file ); } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Config/File.pm0000644000175000017500000000637711573643450021014 0ustar gregoagregoapackage Kephra::Config::File; our $VERSION = '0.13'; use strict; use warnings; # # internal # sub _get_type { my $name = shift; if (not defined $name) { #$main::logger->error(" return; } return unless $name; return 'conf' if $name =~ /\.conf$/; return 'conf' if $name =~ /\.cfg$/; return 'yaml' if $name =~ /\.yaml$/; return 'yaml' if $name =~ /\.yml$/; return; # TODO: log or throw exception if no or invalid file given # make the extension checking stricter? # accept only .yml .yaml and .conf extension? } # # API 2 App # sub load_from_node_data { my $node = shift; return unless defined $node->{file} and $node->{node}; load_node( Kephra::Config::filepath( $node->{file} ), $node->{node} ); } sub load_node{ my $file_name = shift; my $start_node = shift; my $config_tree = load($file_name); return defined $start_node ? Kephra::Config::Tree::get_subtree( $config_tree, $start_node ) : $config_tree; } # !!! -NI sub store_node{ my $file_name = shift; my $start_node = shift; } sub load { my $file_name = shift; return unless -e $file_name; my $type = _get_type($file_name); return unless $type; if ($type eq 'conf') { load_conf($file_name) } elsif ($type eq 'yaml') { load_yaml($file_name) } } sub store { my $file_name = shift; my $config = shift; # if want to write into nonexisting dir, create it unless (-w $file_name){ my ($volume,$dir,$file) = File::Spec->splitpath( $file_name ); $dir = File::Spec->catdir( $volume, $dir ); mkdir $dir unless -e $dir; } my $type = _get_type($file_name); if ($type eq 'conf') { store_conf($file_name, $config) } elsif ($type eq 'yaml') { store_yaml($file_name, $config) } } # # API 2 YAML # sub load_yaml { &YAML::Tiny::LoadFile #if ($^O=~/(?:linux|darwin)/i) { #YAML::Tiny::Load( Kephra::File::IO::lin_load_file($_[0]) ) #} else { } } sub store_yaml { &YAML::Tiny::DumpFile } # # API 2 General::Config # sub load_conf { my $configfilename = shift; my $utf = shift || 0; my %config; my $error_msg = Kephra::Config::Localisation::strings()->{dialog}{error}; my %opt = ( -AutoTrue => 1, -UseApacheInclude => 1, -IncludeRelative => 1, -InterPolateVars => 0, -AllowMultiOptions => 1, -MergeDuplicateOptions => 0, -MergeDuplicateBlocks => 0, -SplitPolicy => 'equalsign', -SaveSorted => 1, -UTF8 => $utf, ); $opt{'-ConfigFile'} = $configfilename; #if ($^O=~/(?:linux|darwin)/i) {$opt{'-String'} = Kephra::File::IO::lin_load_file($configfilename);}else {} $Kephra::app{config}{parser}{conf} = Config::General->new(%opt); if ( -e $configfilename ) { eval { %config = $Kephra::app{config}{parser}{conf}->getall }; Kephra::Dialog::warning_box ("$configfilename: \n $@", $error_msg->{config_read}) if $@ or !%config; } else { Kephra::Dialog::warning_box ($error_msg->{config_read}."-".$configfilename, $error_msg->{file}); } \%config; } sub store_conf { my ( $configfilename, $config ) = @_; $Kephra::app{config}{parser}{conf}->save_file( $configfilename, $config ); } 1; =head1 NAME Kephra::Config::File - IO of config files =head1 DESCRIPTION =cutkephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/0000755000175000017500000000000012300715241017225 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Marker.pm0000644000175000017500000002427711573643433021036 0ustar gregoagregoapackage Kephra::Edit::Marker; our $VERSION = '0.24'; use strict; use warnings; # internal data handling subs sub _ep { Kephra::App::EditPanel::_ref() } sub _config { Kephra::API::settings()->{search}{marker} } my @bookmark; my @bookmark_nr = 0..9; my $marker_nr = 10; # pos remembered by edit control sub _attribute {'marked_lines'} sub _bookmarks { @bookmark } sub bookmark_is_set { my $nr = shift; return if $nr < 0 or $nr > 9; $bookmark[$nr]{set}; } sub _marker_search_byte { my $search_byte = 1 << $marker_nr; $search_byte |= (1 << scalar(@bookmark_nr) )-1 if _config()->{any}; $search_byte; } sub _refresh_bookmark_data { # checks if this bookmark is still valid # refresh or deletes data data if necessary my $nr = shift; return unless bookmark_is_set($nr); my $bm_data = $bookmark[$nr]; my $doc_nr = Kephra::Document::Data::validate_doc_nr( $bm_data->{doc_nr} ); $doc_nr = Kephra::Document::Data::nr_from_file_path($bm_data->{file}) if Kephra::Document::Data::get_file_path($doc_nr) ne $bm_data->{file}; _delete_bookmark_data($nr), return 0 if $doc_nr == -1; $bm_data->{doc_nr} = $doc_nr; my $ep = Kephra::Document::Data::_ep($doc_nr); my $line = $ep->MarkerNext(0, (1 << $nr) ); _delete_bookmark_data($nr), return 0 if $line == -1; my $ll = $ep->LineLength( $line ); if ($bm_data->{col} > $ll) { $bm_data->{col} = $ll; $bm_data->{pos} = $ep->PositionFromLine( $line ) + $bm_data->{col}; } return $bm_data->{line} = $line; } sub _refresh_all_bookmarks { _refresh_bookmark_data($_) for @bookmark_nr } sub _delete_bookmark_data { my $nr = shift; return if $nr < 0 or $nr > 9; $bookmark[$nr] = {}; } sub _get_pos {# switch: was command triggered from context menu or key/main menu my $ep = _ep(); my $line = Kephra::App::EditPanel::Margin::clicked_on_line(); return $line > -1 ? $ep->PositionFromLine($line) : $ep->GetCurrentPos(); } sub _get_line {# switch: was command triggered from context menu or key/main menu my $line = Kephra::App::EditPanel::Margin::clicked_on_line(); return $line > -1 ? $line : _ep()->GetCurrentLine(); } # # external API # sub define_marker { my $ep = shift; my $conf = Kephra::App::EditPanel::Margin::_marker_config(); my $color = \&Kephra::Config::color; my $fore = &$color( $conf->{fore_color} ); my $back = &$color( $conf->{back_color} ); $ep->MarkerDefineBitmap ( $_, Kephra::CommandList::get_cmd_property ( 'bookmark-goto-'.$_, 'icon' ) ) for @bookmark_nr; $ep->MarkerDefineBitmap( $marker_nr, Kephra::CommandList::get_cmd_property('marker-toggle-here', 'icon')); } sub delete_doc { my $doc_nr = shift; delete_all_bookmarks_in_doc($doc_nr); delete_all_marker_in_doc($doc_nr); } # bookmarks sub restore_bookmarks { my $bookmark_data = shift; for my $nr (@bookmark_nr) { if ( defined $bookmark_data->{$nr}){ my $this_bm = $bookmark_data->{$nr}; next unless ref $this_bm eq 'HASH' and $this_bm->{file} and $this_bm->{pos}; $bookmark[$nr]{file} = $this_bm->{file}; my $bookmark = $bookmark[$nr]; my $doc_nr = $bookmark->{doc_nr} = Kephra::Document::Data::nr_from_file_path( $this_bm->{file} ); next if $doc_nr < 0; my $ep = Kephra::Document::Data::_ep($doc_nr); my $pos = $bookmark->{pos} = $this_bm->{pos}; my $line = $bookmark->{line} = $ep->LineFromPosition( $pos ); $bookmark->{col} = $pos - $ep->PositionFromLine( $line ); $bookmark->{set} = 1 if $ep->MarkerAdd( $line, $nr ) > -1; } } } sub get_bookmark_data { _refresh_bookmark_data($_) for @bookmark_nr; my %bm_data; for my $nr (@bookmark_nr) { next unless bookmark_is_set($nr); $bm_data{$nr}{file} = $bookmark[$nr]{file}; $bm_data{$nr}{pos} = $bookmark[$nr]{pos}; } \%bm_data; } sub toggle_bookmark_in_pos { my $nr = shift; my $pos = shift; my $ep = _ep(); my $line = $ep->LineFromPosition($pos); # if bookmark is not in current line it will be set my $marker_in_line = (1 << $nr) & $ep->MarkerGet($line); delete_bookmark($nr); unless ($marker_in_line) { my $bookmark = $bookmark[$nr]; $bookmark->{file} = Kephra::Document::Data::file_path(); $bookmark->{pos} = $pos; $bookmark->{doc_nr} = Kephra::Document::Data::current_nr(); $bookmark->{col} = $pos - $ep->PositionFromLine($line); $bookmark->{line} = $line; $bookmark->{set} = 1 if $ep->MarkerAdd( $line, $nr) > -1; } } sub toggle_bookmark_here { # toggle triggered by margin middle click my ($ep, $event ) = @_; return unless ref $event eq 'Wx::MouseEvent'; my $pos = $ep->PositionFromPoint( $event->GetPosition() ); my $marker = $ep->MarkerGet($ep->LineFromPosition($pos) ); if ( $marker & ((1 << 10)-1) ){ for my $nr (@bookmark_nr) { # delete bookmarks in this line delete_bookmark($nr) if $marker & (1 << $nr) } } else { for my $nr (@bookmark_nr) { # set a free bookmark with lowest number return toggle_bookmark_in_pos($nr, $pos) unless bookmark_is_set($nr); } } } sub toggle_bookmark { # toggle command, triggered from macro, key, [context] menu toggle_bookmark_in_pos(shift, _get_pos() ); } sub goto_bookmark { my $nr = shift; if ( _refresh_bookmark_data($nr) ) { Kephra::Document::Change::to_nr( $bookmark[$nr]{doc_nr} ); Kephra::Edit::Goto::pos( $bookmark[$nr]{pos} ); } } sub delete_bookmark { my $nr = shift; if ( _refresh_bookmark_data( $nr ) ){ my $ep = Kephra::Document::Data::_ep( $bookmark[$nr]->{doc_nr} ); $ep->MarkerDeleteAll($nr); _delete_bookmark_data($nr); } } sub delete_all_bookmarks_in_doc { my $cnr = Kephra::Document::Data::current_nr(); for my $nr (@bookmark_nr) { _refresh_bookmark_data( $nr ); next unless bookmark_is_set($nr); delete_bookmark($nr) if $bookmark[$nr]->{doc_nr} eq $cnr; } } sub delete_all_bookmarks { delete_bookmark($_) for @bookmark_nr } # marker sub restore { my $doc_nr = shift; my $marker_pos = Kephra::Document::Data::get_attribute( _attribute(), $doc_nr); return unless ref $marker_pos eq 'ARRAY'; my $ep = Kephra::Document::Data::_ep($doc_nr); $ep->MarkerAdd( $_, $marker_nr) for @$marker_pos; } sub store { # update marker pos in the file data, saved later in File:Session # bookmarks are saved by Kephra::Edit::Search::save_search_data() my $search_byte = 1 << $marker_nr; for my $doc_nr (@{Kephra::Document::Data::all_nr()}) { my $ep = Kephra::Document::Data::_ep($doc_nr); my $line = 0; my @marker_pos; push @marker_pos, $line++ while -1 != ( $line = $ep->MarkerNext( $line, $search_byte ) ); Kephra::Document::Data::set_attribute( _attribute(), \@marker_pos, $doc_nr); } } sub toggle_marker_in_line { # generic set / delete marker in line my $line = shift; my $ep = _ep(); ($ep->MarkerGet($line) & (1 << $marker_nr)) ? $ep->MarkerDelete( $line, $marker_nr) : $ep->MarkerAdd( $line, $marker_nr); } sub toggle_marker_here { # toggle triggered by margin left click my ($ep, $event ) = @_; return unless ref $event eq 'Wx::MouseEvent'; #$ep->LineFromPosition( $event->GetPosition() if ref $event eq 'Wx::StyledTextEvent' toggle_marker_in_line( $ep->LineFromPosition( $ep->PositionFromPoint( $event->GetPosition() ) ) ); } sub toggle_marker { # toggle triggered by keyboard / icon / contextmenu toggle_marker_in_line( _get_line() ); } sub goto_prev_marker_in_doc { my $ep = _ep(); my $do_wrap = _config()->{wrap}; my $search_byte = _marker_search_byte(); my $line = $ep->MarkerPrevious( $ep->GetCurrentLine - 1, $search_byte ); $line = $ep->MarkerPrevious( $ep->GetLineCount(), $search_byte ) if $line == -1 and $do_wrap; Kephra::Edit::Goto::line_nr( $line ) if $line > -1; } sub goto_next_marker_in_doc { my $ep = _ep(); my $do_wrap = _config()->{wrap}; my $search_byte = _marker_search_byte(); my $line = $ep->MarkerNext( $ep->GetCurrentLine + 1, $search_byte ); $line = $ep->MarkerNext( 0, $search_byte ) if $line == -1 and $do_wrap; Kephra::Edit::Goto::line_nr( $line ) if $line > -1; } sub goto_prev_marker { my $search_byte = _marker_search_byte(); my $ep = _ep(); my $line = my $cur_line = $ep->MarkerPrevious( $ep->GetCurrentLine() - 1, $search_byte ); if ($line > -1) { Kephra::Edit::Goto::line_nr( $line ) } else { my $do_wrap = _config()->{wrap}; my $doc_nr = my $cur_doc = Kephra::Document::Data::current_nr(); while ( ($doc_nr = Kephra::Document::Data::next_nr(-1, $doc_nr)) != -1 ){ return if $cur_doc < $doc_nr and not $do_wrap; $ep = Kephra::Document::Data::_ep($doc_nr); $line = $ep->MarkerPrevious( $ep->GetLineCount(), $search_byte ); return if ($doc_nr == $cur_doc) and ($line == $cur_line or $line == -1); if ($line > -1) { Kephra::Document::Change::to_number( $doc_nr ); return Kephra::Edit::Goto::line_nr( $line ); } } } } sub goto_next_marker { my $search_byte = _marker_search_byte(); my $ep = _ep(); my $line = my $cur_line = $ep->MarkerNext( $ep->GetCurrentLine() + 1, $search_byte ); if ($line > -1) { Kephra::Edit::Goto::line_nr( $line ) } else { my $do_wrap = _config()->{wrap}; my $doc_nr = my $cur_doc = Kephra::Document::Data::current_nr(); while ( ($doc_nr = Kephra::Document::Data::next_nr(-1, $doc_nr)) != -1 ){ return if $cur_doc > $doc_nr and not $do_wrap; $ep = Kephra::Document::Data::_ep($doc_nr); $line = $ep->MarkerNext( 0, $search_byte ); return if ($doc_nr == $cur_doc) and ($line == $cur_line or $line == -1); if ($line > -1) { Kephra::Document::Change::to_number( $doc_nr ); return Kephra::Edit::Goto::line_nr( $line ); } } } } sub delete_all_marker_in_doc { my $doc_nr = Kephra::Document::Data::valid_or_current_doc_nr(shift); my $ep = Kephra::Document::Data::_ep($doc_nr); $ep->MarkerDeleteAll($marker_nr); } sub delete_all_marker { $_->MarkerDeleteAll($marker_nr) for @{Kephra::Document::Data::get_all_ep()}; } 1; =head1 NAME Kephra::Edit::Marker - bookmark and marker functions =head1 DESCRIPTION Marker are position in the document, that are marked by symbols in the margin on the left side. Every document can have many Marker. They can be navigated via [Alt+][Shift+]F2 or search bar. But there are only 10 bookmarks numbered from 0 to 9. =cutkephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Search/0000755000175000017500000000000011573643427020453 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Search/.svn/0000755000175000017500000000000012167342732021332 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Search/.svn/prop-base/0000755000175000017500000000000011573643427023227 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Search/.svn/text-base/0000755000175000017500000000000011573643427023233 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Search/.svn/text-base/InputTarget.pm.svn-base0000644000175000017500000000121111573643427027547 0ustar gregoagregoapackage Kephra::Edit::Search::InputTarget; our $VERSION = '0.04'; use strict; use base qw(Wx::TextDropTarget); use Wx; use Wx::DND; sub new { my $class = shift; my $target = shift; my $kind = shift; my $self = $class->SUPER::new(@_); $self->{target} = $target if substr(ref $target, 0, 12) eq 'Wx::ComboBox'; $self->{kind} = $kind; return $self; } sub OnDropText { my ( $self, $x, $y, $text ) = @_; $self->{target}->SetValue( $text ) if $self->{target}; $self->{kind} eq 'replace' ? Kephra::Edit::Search::set_replace_item($text) : Kephra::Edit::Search::set_find_item($text); 0; #don't skip event } 1;kephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Search/.svn/entries0000444000175000017500000000062412167342050022717 0ustar gregoagregoa10 dir 749 https://kephra.svn.sourceforge.net/svnroot/kephra/dev/base/lib/Kephra/Edit/Search https://kephra.svn.sourceforge.net/svnroot/kephra 2010-07-05T03:08:50.409918Z 569 sir_lichtkind 92bac4d8-7f40-0410-be34-dc4e62cfba7f InputTarget.pm file 2011-06-08T09:55:35.000000Z 81d547653f2185e9c44c8b2628239d56 2010-07-05T03:08:50.409918Z 569 sir_lichtkind 649 kephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Search/.svn/tmp/0000755000175000017500000000000012167342050022123 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Search/.svn/tmp/prop-base/0000755000175000017500000000000011573643427024027 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Search/.svn/tmp/text-base/0000755000175000017500000000000011573643427024033 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Search/.svn/tmp/props/0000755000175000017500000000000011573643427023302 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Search/.svn/all-wcprops0000644000175000017500000000035011573643427023523 0ustar gregoagregoaK 25 svn:wc:ra_dav:version-url V 60 /svnroot/kephra/!svn/ver/569/dev/base/lib/Kephra/Edit/Search END InputTarget.pm K 25 svn:wc:ra_dav:version-url V 75 /svnroot/kephra/!svn/ver/569/dev/base/lib/Kephra/Edit/Search/InputTarget.pm END kephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Search/.svn/props/0000755000175000017500000000000011573643427022502 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Search/InputTarget.pm0000644000175000017500000000121111573643427023252 0ustar gregoagregoapackage Kephra::Edit::Search::InputTarget; our $VERSION = '0.04'; use strict; use base qw(Wx::TextDropTarget); use Wx; use Wx::DND; sub new { my $class = shift; my $target = shift; my $kind = shift; my $self = $class->SUPER::new(@_); $self->{target} = $target if substr(ref $target, 0, 12) eq 'Wx::ComboBox'; $self->{kind} = $kind; return $self; } sub OnDropText { my ( $self, $x, $y, $text ) = @_; $self->{target}->SetValue( $text ) if $self->{target}; $self->{kind} eq 'replace' ? Kephra::Edit::Search::set_replace_item($text) : Kephra::Edit::Search::set_find_item($text); 0; #don't skip event } 1;kephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Search.pm0000644000175000017500000004730011573643433021012 0ustar gregoagregoapackage Kephra::Edit::Search; our $VERSION = '0.31'; use strict; use warnings; # internal and menu functions about find and replace text # drag n drop target class # internal functions my ($find_item, $found_pos, $old_pos, $replace_item); my $flags; my $history_refresh; my @find_history; my @replace_history; sub _config { Kephra::API::settings()->{search} } sub _attributes{ _config()->{attribute} } sub _history { _config()->{history} } sub _find_pos { $found_pos } sub _refresh_search_flags { my $attr = _attributes(); $flags = 0; $flags |= &Wx::wxSTC_FIND_MATCHCASE if defined $attr->{match_case} and $attr->{match_case}; if ( defined $attr->{match_whole_word} and $attr->{match_whole_word} ) { $flags |= &Wx::wxSTC_FIND_WHOLEWORD } else { $flags |= &Wx::wxSTC_FIND_WORDSTART if $attr->{match_word_begin} and $attr->{match_word_begin}; } $flags |= &Wx::wxSTC_FIND_REGEXP if defined $attr->{match_regex} and $attr->{match_regex}; } sub load_search_data { my $file = Kephra::Config::filepath( _config()->{data_file} ); my $config_tree = Kephra::Config::File::load($file); set_find_item( $config_tree->{find}{item} || '' ); set_replace_item( $config_tree->{replace}{item} || '' ); if (defined $config_tree->{find}{history}){ if (ref $config_tree->{find}{history} eq 'ARRAY'){ @find_history = @{ $config_tree->{find}{history} }; } else { $find_history[0] = $config_tree->{find}{history} } } if (defined $config_tree->{replace}{history}){ if (ref $config_tree->{replace}{history} eq 'ARRAY'){ @replace_history = @{ $config_tree->{replace}{history} }; } else { $replace_history[0] = $config_tree->{replace}{history} } } my $history = _history(); # remove dups and cut to the configured length if ( $history->{use} ) { my ( %seen1, %seen2 ); my @uniq = grep { !$seen1{$_}++ } @find_history; @find_history = splice @uniq, 0, $history->{length}; @uniq = grep { !$seen2{$_}++ } @replace_history; @replace_history = splice @uniq, 0, $history->{length}; } else { @find_history = (); @replace_history = (); } # search item is findable $found_pos = 0; Kephra::EventTable::trigger ('find.item.history.changed', 'replace.item.history.changed'); Kephra::Edit::Marker::restore_bookmarks( $config_tree->{bookmark} ); } sub save_search_data { my $file = Kephra::Config::filepath( _config()->{data_file} ); my $config_tree = Kephra::Config::File::load($file); $config_tree->{find}{item} = get_find_item(); $config_tree->{find}{history} = get_find_history(); $config_tree->{replace}{item} = get_replace_item(); $config_tree->{replace}{history} = get_replace_history(); $config_tree->{bookmark} = Kephra::Edit::Marker::get_bookmark_data(); Kephra::Config::File::store($file, $config_tree); Kephra::Edit::Marker::store(); } # sub get_find_item { $find_item || ''} sub set_find_item { my $old = $find_item; my $new = shift; if (defined $new and (not defined $old or $new ne $old)){ $find_item = $new; $found_pos = -1; Kephra::EventTable::trigger('find.item.changed'); } } sub set_selection_as_find_item { set_find_item( Kephra::App::EditPanel::_ref()->GetSelectedText ) } sub item_findable { _exist_find_item() } sub _exist_find_item { (defined $find_item and $find_item) ? 1 : 0 } sub _exist_replace_item { (defined $replace_item and $replace_item) ? 1 : 0 } sub get_replace_item { $replace_item || ''} sub set_replace_item { my $old = $replace_item; my $new = shift; if (defined $new and (not defined $old or $new ne $old)){ $replace_item = $new; Kephra::EventTable::trigger('replace.item.changed'); } } sub set_selection_as_replace_item { set_replace_item( Kephra::App::EditPanel::_ref()->GetSelectedText ) } sub get_find_history { \@find_history } sub get_replace_history { \@replace_history } sub refresh_find_history { my $found_match = shift; my $find_item = get_find_item(); my $history = _history(); return unless $history->{use}; # check if refresh needed return if $history->{remember_only_matched} and not $found_match; if ($find_item and $find_history[0] ne $find_item) { for ( 0 .. $#find_history ) { # delete the dup if ( $find_history[$_] eq $find_item ) { @find_history = @find_history[ 0 .. $_-1, $_+1 .. $#find_history ]; last; } pop @find_history if $_ == $history->{length} - 1; } unshift @find_history, $find_item; # insert new history item Kephra::EventTable::trigger('find.item.history.changed'); } } sub refresh_replace_history { my $replace_item = get_replace_item(); my $history = _history(); if ($replace_item) { for ( 0 .. $#replace_history ) { if ( $replace_history[$_] eq $replace_item ) { @replace_history = @replace_history[ 0 .. $_-1, $_+1 .. $#replace_history ]; last; } pop @replace_history if $_ == $history->{length} - 1; } unshift @replace_history, $replace_item; Kephra::EventTable::trigger('replace.item.history.changed'); } } sub _caret_2_sel_end { my $ep = Kephra::App::EditPanel::_ref(); my $pos = $ep->GetCurrentPos; my $sel_start = $ep->GetSelectionStart; my $sel_end = $ep->GetSelectionEnd; if ( $pos != $sel_end ) { $ep->SetCurrentPos($sel_end); $ep->SetSelectionStart($sel_start); } } # sub set_range{ _attributes()->{in} = shift } sub get_range{ _attributes()->{in} } sub get_attribute{ my $attr = shift; if ($attr eq 'match_case' or $attr eq 'match_word_begin'or $attr eq 'match_whole_word'or $attr eq 'match_regex' or $attr eq 'auto_wrap' or $attr eq 'incremental' ) { _attributes()->{$attr} } } sub switch_attribute{ my $attr = shift; if ($attr eq 'match_case' or $attr eq 'match_word_begin'or $attr eq 'match_whole_word'or $attr eq 'match_regex' or $attr eq 'auto_wrap' or $attr eq 'incremental' ) { unless (defined _attributes->{$attr}) { _attributes->{$attr} = 1 } else { _attributes->{$attr} ^= 1 } _refresh_search_flags() if substr($attr, 0, 1) eq 'm'; } } # find helper function sub replace_selection { Kephra::App::EditPanel::_ref()->ReplaceSelection( get_replace_item() ) } sub _find_next { my $ep = Kephra::App::EditPanel::_ref(); $ep->SearchAnchor; $found_pos = $ep->SearchNext( $flags, get_find_item() ); Kephra::EventTable::trigger('find'); return $found_pos; } sub _find_prev { my $ep = Kephra::App::EditPanel::_ref(); $ep->SearchAnchor; $found_pos = $ep->SearchPrev( $flags, get_find_item() ); Kephra::EventTable::trigger('find'); return $found_pos; } sub _find_first { Kephra::Edit::Goto::_pos(0); _find_next(); } sub _find_last { Kephra::Edit::Goto::_pos(-1); _find_prev(); } sub first_increment { my $ep = Kephra::App::EditPanel::_ref(); if ( _exist_find_item() ) { Kephra::Edit::_save_positions; if ( _find_first() > -1 ) { #_caret_2_sel_end(); Kephra::Edit::_center_caret; return 1; } } Kephra::Edit::Goto::_pos( $old_pos ) if defined $old_pos; return 0; } #sub next_increment {} # find related menu calls sub find_all { #Kephra::Dialog::msg_box(&Wx::wxUNICODE(), ''); my $ep = Kephra::App::EditPanel::_ref(); if ( _exist_find_item() ) { my $search_result = _find_first(); my ($sel_start, $sel_end); #Kephra::Dialog::msg_box( , ''); #$ep->IndicatorSetStyle(0, &Wx::wxSTC_INDIC_TT ); #$ep->IndicatorSetForeground(0, &Wx::Colour->new(0xff, 0x00, 0x00)); $ep->IndicatorSetStyle(1, &Wx::wxSTC_INDIC_TT ); $ep->IndicatorSetForeground(1, &Wx::Colour->new(0xff, 0x00, 0x00)); # ^= &Wx::wxSTC_INDIC_STRIKE; $ep->SetSelection(0,0); return 0 if $search_result == -1; while ($search_result > -1){ ($sel_start, $sel_end) = $ep->GetSelection; Kephra::Edit::Goto::_pos( $sel_end ); $ep->StartStyling($sel_start, 224);#224 $ep->SetStyleBytes($sel_end - $sel_start, 128); $search_result = _find_next(); } Kephra::Edit::Goto::_pos( $sel_end ); $ep->Colourise( 0, $sel_end); return 1; } else { Kephra::Edit::Goto::_pos( $old_pos ) if defined $old_pos; return 1; } } sub find_prev { my $ep = Kephra::App::EditPanel::_ref(); my $attr = _attributes(); my $return = -1; if ( _exist_find_item() ) { Kephra::Edit::_save_positions; Kephra::Edit::Goto::_pos( $ep->GetSelectionStart - 1 ); $return = _find_prev(); if ( $return == -1 ) { if ( get_range() eq 'document' ) { $return = _find_last() if $attr->{auto_wrap}; } elsif ( get_range() eq 'open_docs' ) { $Kephra::temp{dialog}{control} = 1; my $begin_doc = Kephra::Document::Data::current_nr(); while ( $return == -1 ) { Kephra::Edit::_restore_positions; last if ( ( Kephra::Document::Data::current_nr() == 0 ) and !$attr->{auto_wrap} ); Kephra::Document::Change::tab_left(); Kephra::Edit::_save_positions(); $return = _find_last(); last if ( Kephra::Document::Data::current_nr() == $begin_doc ); } $Kephra::temp{dialog}{control} = 0; } } if ( $return == -1 ) { Kephra::Edit::_restore_positions() } else { _caret_2_sel_end(); Kephra::Edit::_center_caret() } refresh_find_history($return); } $return; } sub find_next { my $ep = Kephra::App::EditPanel::_ref(); my $attr = _attributes(); my $return = -1; if ( _exist_find_item() ) { Kephra::Edit::_save_positions(); Kephra::Edit::Goto::_pos( $ep->GetSelectionEnd ); $return = _find_next(); if ( $return == -1 ) { if ( get_range() eq 'document' ) { $return = _find_first() if $attr->{auto_wrap}; } elsif ( get_range() eq 'open_docs' ) { $Kephra::temp{dialog}{control} = 1; my $begin_doc = Kephra::Document::Data::current_nr(); while ( $return == -1 ) { Kephra::Edit::_restore_positions(); last if Kephra::Document::Data::current_nr() == Kephra::Document::Data::last_nr() and not $attr->{auto_wrap}; Kephra::Document::Change::tab_right(); Kephra::Edit::_save_positions(); $return = _find_first(); last if ( Kephra::Document::Data::current_nr() == $begin_doc ); } $Kephra::temp{dialog}{control} = 0; } } if ( $return == -1 ) { Kephra::Edit::_restore_positions() } else { _caret_2_sel_end(); Kephra::Edit::_center_caret(); } refresh_find_history($return); } $return; } sub fast_back { my $ep = Kephra::App::EditPanel::_ref(); my $attr = _attributes(); my $return = -1; if (_exist_find_item()) { for ( 1 .. $attr->{fast_steps} ) { Kephra::Edit::_save_positions(); Kephra::Edit::Goto::_pos( $ep->GetSelectionStart - 1 ); $return = _find_prev(); if ( $return == -1 ) { if ( get_range() eq 'document' ) { $return = _find_last() if $attr->{auto_wrap}; } elsif ( get_range() eq 'open_docs' ) { $Kephra::temp{dialog}{control} = 1; my $begin_doc = Kephra::Document::Data::current_nr(); while ( $return == -1 ) { Kephra::Edit::_restore_positions(); last if Kephra::Document::Data::current_nr() == 0 and not $attr->{auto_wrap}; Kephra::Document::Change::tab_left(); Kephra::Edit::_save_positions(); $return = _find_last(); last if Kephra::Document::Data::current_nr() == $begin_doc; } $Kephra::temp{dialog}{control} = 0; } } refresh_find_history($return) if ( $_ == 1 ); if ( $return == -1 ) { Kephra::Edit::_restore_positions(); last; } else { _caret_2_sel_end(); Kephra::Edit::_center_caret(); } } } } sub fast_fore { my $ep = Kephra::App::EditPanel::_ref(); my $attr = _attributes(); my $return = -1; if (_exist_find_item()) { for ( 1 .. $attr->{fast_steps} ) { Kephra::Edit::_save_positions(); Kephra::Edit::Goto::_pos( $ep->GetSelectionEnd ); $return = _find_next(); if ( $return == -1 ) { if ( get_range() eq 'document' ) { $return = _find_first() if $attr->{auto_wrap}; } elsif ( get_range() eq 'open_docs' ) { $Kephra::temp{dialog}{control} = 1; my $begin_doc = Kephra::Document::Data::current_nr(); while ( $return == -1 ) { Kephra::Edit::_restore_positions(); last if Kephra::Document::Data::current_nr() == Kephra::Document::Data::last_nr() and not $attr->{auto_wrap}; Kephra::Document::Change::tab_right(); Kephra::Edit::_save_positions(); $return = _find_first(); last if Kephra::Document::Data::current_nr() == $begin_doc; } $Kephra::temp{dialog}{control} = 0; } } refresh_find_history($return) if $_ == 1; if ( $return == -1 ) { Kephra::Edit::_restore_positions(); last; } else { _caret_2_sel_end(); Kephra::Edit::_center_caret(); } } } } sub find_first { my $menu_call = shift; my $ep = Kephra::App::EditPanel::_ref(); my $attr = _attributes(); my ( $sel_begin, $sel_end ) = $ep->GetSelection; my $pos = $ep->GetCurrentPos; my $len = _exist_find_item(); my $return; if ( _exist_find_item() ) { Kephra::Edit::_save_positions(); if ($menu_call and $sel_begin != $sel_end and $sel_end - $sel_begin > $len ) { set_range('selection') } if ( get_range() eq 'selection' ) { Kephra::Edit::Goto::_pos($sel_begin); $return = _find_next(); if ($return > -1 and $ep->GetCurrentPos + $len <= $sel_end) { Kephra::Edit::_center_caret(); } else { Kephra::Edit::_restore_positions(); $return = -1; } } else { $return = _find_first(); if ( get_range() eq 'open_docs' and ($sel_begin == $ep->GetSelectionStart or $return == -1 ) ){ $Kephra::temp{dialog}{control} = 1; $return = -1; my $begin_doc = Kephra::Document::Data::current_nr(); while ( $return == -1 ) { Kephra::Edit::_restore_positions(); last if Kephra::Document::Data::current_nr() == 0 and not $attr->{auto_wrap}; Kephra::Document::Change::tab_left(); Kephra::Edit::_save_positions(); $return = _find_first(); last if ( Kephra::Document::Data::current_nr() == $begin_doc ); } $Kephra::temp{dialog}{control} = 0; } if ( $return > -1 ) { _caret_2_sel_end(); Kephra::Edit::_center_caret(); } else { Kephra::Edit::_restore_positions(); } } refresh_find_history($return); } $return; } sub find_last { my $menu_call = shift; my $ep = Kephra::App::EditPanel::_ref(); my $attr = _attributes(); my ( $sel_begin, $sel_end ) = $ep->GetSelection; my $pos = $ep->GetCurrentPos; my $len = _exist_find_item(); my $return; if (_exist_find_item()) { Kephra::Edit::_save_positions(); if ($menu_call and $sel_begin != $sel_end and $sel_end - $sel_begin > $len) { set_range('selection'); } if ( get_range() eq 'selection' ) { Kephra::Edit::Goto::_pos($sel_end); $return = _find_prev(); if ($return > -1 and $ep->GetCurrentPos >= $sel_begin) { Kephra::Edit::_center_caret(); } else { Kephra::Edit::_restore_positions(); $return = -1; } } else { $return = _find_last(); if (get_range() eq 'open_docs' and ($sel_begin == $ep->GetSelectionStart or $return == -1) ){ $Kephra::temp{dialog}{control} = 1; $return = -1; my $begin_doc = Kephra::Document::Data::current_nr(); while ( $return == -1 ) { Kephra::Edit::_restore_positions(); last if Kephra::Document::Data::current_nr() == Kephra::Document::Data::last_nr() and not $attr->{auto_wrap}; Kephra::Document::Change::tab_right(); Kephra::Edit::_save_positions(); $return = _find_last(); last if ( Kephra::Document::Data::current_nr() == $begin_doc ); } $Kephra::temp{dialog}{control} = 0; } if ( $return > -1 ) { _caret_2_sel_end(); Kephra::Edit::_center_caret(); } else { Kephra::Edit::_restore_positions(); } } refresh_find_history($return); } $return; } # replace sub replace_back { my $ep = Kephra::App::EditPanel::_ref(); if ( $ep->GetSelectionStart != $ep->GetSelectionEnd ) { replace_selection(); refresh_replace_history(); find_prev(); } } sub replace_fore { my $ep = Kephra::App::EditPanel::_ref(); if ( $ep->GetSelectionStart != $ep->GetSelectionEnd ) { replace_selection(); refresh_replace_history(); find_next(); } } sub replace_all { my $menu_call = shift; my $ep = Kephra::App::EditPanel::_ref(); my ($sel_begin, $sel_end ) = $ep->GetSelection; my $line = $ep->GetCurrentLine; my $len = _exist_find_item(); my $replace_string = get_replace_item(); #if ($len) { # forbid replace with nothing if ( $menu_call and $sel_begin != $sel_end and $sel_end - $sel_begin > $len ) { _attributes()->{in} = 'selection'; } if ( get_range() eq 'selection' ) { $ep->BeginUndoAction; Kephra::Edit::Goto::_pos($sel_begin); while ( _find_next() > -1 ) { last if ( $ep->GetCurrentPos + $len >= $sel_end ); $ep->ReplaceSelection($replace_string); } $ep->EndUndoAction; } elsif ( get_range() eq 'document' ) { $ep->BeginUndoAction; Kephra::Edit::Goto::_pos(0); while ( _find_next() > -1 ) { $ep->ReplaceSelection($replace_string); } $ep->EndUndoAction; } elsif ( get_range() eq 'open_docs' ) { my $begin_doc = Kephra::Document::Data::current_nr(); do { { Kephra::Edit::_save_positions(); $ep->BeginUndoAction; Kephra::Edit::Goto::_pos(0); while ( _find_next() > -1 ) { $ep->ReplaceSelection($replace_string); } $ep->EndUndoAction; Kephra::Edit::_restore_positions(); } } until ( Kephra::Document::Change::tab_right() == $begin_doc ); } $ep->GotoLine($line); refresh_replace_history; Kephra::Edit::_keep_focus(); #} # end of don't replace nothing } sub replace_confirm { if (_exist_find_item()) { my $ep = Kephra::App::EditPanel::_ref(); my $attr = _attributes(); my $line = $ep->LineFromPosition( $ep->GetCurrentPos ); my $len = _exist_find_item(); my $sel_begin = $ep->GetSelectionStart; my $sel_end = $ep->GetSelectionEnd; my $answer = &Wx::wxYES; my $menu_call = shift; set_range('selection') if $menu_call and $sel_begin != $sel_end and $sel_end - $sel_begin > $len; if (get_range() eq 'selection') { sniff_selection( $ep, $sel_begin, $sel_end, $len, $line ); } elsif (get_range() eq 'document') { sniff_selection( $ep, 0, $ep->GetTextLength, $len, $line ); } elsif (get_range() eq 'open_docs') { my $begin_doc = Kephra::Document::Data::current_nr(); do { { next if $answer == &Wx::wxCANCEL; Kephra::Edit::_save_positions(); $answer = sniff_selection ( $ep, 0, $ep->GetTextLength, $len, $line ); Kephra::Edit::_restore_positions(); } } until ( Kephra::Document::Change::tab_right() == $begin_doc ); } } sub sniff_selection { my ( $ep, $sel_begin, $sel_end, $len, $line ) = @_; my $l10n = Kephra::Config::Localisation::strings()->{dialog}{search}{confirm}; my $answer; Kephra::Edit::Goto::_pos($sel_begin); $ep->BeginUndoAction(); while ( _find_next() > -1 ) { last if $ep->GetCurrentPos + $len >= $sel_end; Kephra::Edit::_center_caret(); $answer = Kephra::Dialog::get_confirm_3 ($l10n->{text}, $l10n->{title}, 100, 100); last if $answer == &Wx::wxCANCEL; if ($answer == &Wx::wxYES) {replace_selection()} else {$ep->SetCurrentPos( $ep->GetCurrentPos + 1 )} } $ep->EndUndoAction; Kephra::Edit::Goto::_pos( $ep->PositionFromLine($line) ); Kephra::Edit::_center_caret(); $answer; } refresh_replace_history(); Kephra::Edit::_keep_focus(); } 1; =head1 NAME Kephra::Edit::Search - find and replace functions =head1 DESCRIPTION =cutkephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Format.pm0000644000175000017500000001637511714037724021042 0ustar gregoagregoapackage Kephra::Edit::Format; our $VERSION = '0.26'; use strict; use warnings; sub _ep_ref { Kephra::App::EditPanel::_ref() } sub _config { Kephra::API::settings()->{editpanel} } # change indention width of selected text sub _indent_selection { my $width = shift || 0; my $ep = _ep_ref(); $ep->BeginUndoAction; for ( $ep->LineFromPosition($ep->GetSelectionStart) .. $ep->LineFromPosition($ep->GetSelectionEnd) ) { $ep->SetLineIndentation( $_, $ep->GetLineIndentation($_) + $width ) unless $ep->PositionFromLine($_) == $ep->GetLineEndPosition($_); } $ep->EndUndoAction; } sub autoindent { my $ep = _ep_ref(); my $line = $ep->GetCurrentLine; $ep->BeginUndoAction; $ep->CmdKeyExecute(&Wx::wxSTC_CMD_NEWLINE); my $indent = $ep->GetLineIndentation( $line ); $ep->SetLineIndentation( $line + 1, $indent); $ep->GotoPos( $ep->GetLineIndentPosition( $line + 1 ) ); $ep->EndUndoAction; } sub blockindent_open { my $ep = _ep_ref(); my $tabsize = Kephra::Document::Data::attr('tab_size'); my $line = $ep->GetCurrentLine; my $first_cpos = $ep->PositionFromLine($line) + $ep->GetLineIndentation($line); # position of first char in line my $matchfirst = $ep->BraceMatch($first_cpos); $ep->BeginUndoAction; # dedent a "} else {" correct if ($ep->GetCharAt($first_cpos) == 125 and $matchfirst > -1) { $ep->SetLineIndentation( $line, $ep->GetLineIndentation( $ep->LineFromPosition($matchfirst) ) ); } # grabbing my $bracepos = $ep->GetCurrentPos - 1; my $leadindent = $ep->GetLineIndentation($line); my $matchbrace = $ep->BraceMatch( $bracepos ); my $matchindent= $ep->GetLineIndentation($ep->LineFromPosition($matchbrace)); # make newl line $ep->CmdKeyExecute(&Wx::wxSTC_CMD_NEWLINE); # make new brace if there is missing one if (_config()->{auto}{brace}{make} and ($matchbrace == -1 or $ep->GetLineIndentation($line) != $matchindent )){ $ep->CmdKeyExecute(&Wx::wxSTC_CMD_NEWLINE); $ep->AddText('}'); $ep->SetLineIndentation( $line + 2, $leadindent ); } $ep->SetLineIndentation( $line + 1, $leadindent + $tabsize ); $ep->GotoPos( $ep->GetLineIndentPosition( $line + 1 ) ); $ep->EndUndoAction; } sub blockindent_close { my $ep = _ep_ref(); my $bracepos = shift; unless ($bracepos) { $bracepos = $ep->GetCurrentPos - 1; $bracepos-- while $ep->GetCharAt($bracepos) == 32; } $ep->BeginUndoAction; # 1 if it not textend, goto next line my $match = $ep->BraceMatch($bracepos); my $line = $ep->GetCurrentLine; unless ($ep->GetLineIndentPosition($line)+1 == $ep->GetLineEndPosition($line) or $ep->LineFromPosition($match) == $line ) { $ep->GotoPos($bracepos); $ep->CmdKeyExecute(&Wx::wxSTC_CMD_NEWLINE); $ep->GotoPos( $ep->GetCurrentPos + 1 ); $line++; } # 2 wenn match dann korrigiere einrückung ansonst letzte - tabsize if ( $match > -1 ) { $ep->SetLineIndentation( $line, $ep->GetLineIndentation( $ep->LineFromPosition($match) ) ); } else { $ep->SetLineIndentation( $line, $ep->GetLineIndentation( $line - 1 ) - Kephra::Document::Data::attr('tab_size') ); } # make new line _config()->{auto}{indent} ? autoindent() : $ep->CmdKeyExecute(&Wx::wxSTC_CMD_NEWLINE); # 3 lösche dubs wenn in nächster zeile nur spaces bis dup #if ( _config()->{auto}{brace}{join} ) { #my $delbrace = $ep->PositionFromLine( $line + 2 ) #+ $ep->GetLineIndentation( $line + 1 ); #if ( $ep->GetCharAt($delbrace) == 125 ) { #$ep->SetTargetStart( $ep->GetCurrentPos ); #$ep->SetTargetEnd( $delbrace + 1 ); #$ep->ReplaceTarget(''); #} #} $ep->EndUndoAction; } sub indent_space { _indent_selection( 1) } sub dedent_space { _indent_selection(-1) } sub indent_tab { _indent_selection( Kephra::Document::Data::attr('tab_size') ) } sub dedent_tab { _indent_selection(-Kephra::Document::Data::attr('tab_size') ) } # sub align_indent { my $ep = _ep_ref(); my $firstline = $ep->LineFromPosition( $ep->GetSelectionStart ); my $align = $ep->GetLineIndentation($firstline); $ep->BeginUndoAction(); $ep->SetLineIndentation($_ ,$align) for $firstline + 1 .. $ep->LineFromPosition($ep->GetSelectionEnd); $ep->EndUndoAction(); } # deleting trailing spaces on line ends sub del_trailing_spaces { &Kephra::Edit::_save_positions; my $ep = _ep_ref(); my $text = Kephra::Edit::_select_all_if_none(); $text =~ s/[ \t]+(\r|\n|\Z)/$1/g; $ep->BeginUndoAction; $ep->ReplaceSelection($text); $ep->EndUndoAction; Kephra::Edit::_restore_positions(); } # sub join_lines { my $ep = _ep_ref(); my $text = $ep->GetSelectedText(); $text =~ s/[\r|\n]+/ /g; # delete end of line marker $ep->BeginUndoAction; $ep->ReplaceSelection($text); $ep->EndUndoAction; } sub blockformat{ return unless Scalar::Util::looks_like_number($_[0]); my $width = (int shift) + 1; my $ep = _ep_ref(); my ($begin, $end) = $ep->GetSelection; my $bline = $ep->LineFromPosition($begin); my $tmp_begin = $ep->PositionFromLine($bline); my $bspace = ' ' x $ep->GetLineIndentation($bline); my $space = _config()->{auto}{indention} ? $bspace : ''; chop $bspace; $ep->SetSelection($tmp_begin, $end); require Text::Wrap; $Text::Wrap::columns = $width; $Text::Wrap::unexpand = Kephra::Document::Data::attr('tab_use'); $Text::Wrap::tabstop = Kephra::Document::Data::attr('tab_size'); my $text = $ep->GetSelectedText; $text =~ s/[\r|\n]+/ /g; $ep->BeginUndoAction(); $ep->ReplaceSelection( Text::Wrap::fill($bspace, $space, $text) ); $ep->EndUndoAction(); } sub blockformat_LLI{ blockformat( _config()->{indicator}{right_margin}{position} ); } sub blockformat_custom { my $l18n = Kephra::Config::Localisation::strings()->{dialog}{edit}; my $width = Kephra::Dialog::get_text( $l18n->{wrap_width_input}, $l18n->{wrap_custom_headline} ); blockformat( $width ) if defined $width; } # breaking too long lines into smaller one sub line_break { return unless Scalar::Util::looks_like_number($_[0]); my $width = (int shift) + 1; my $ep = _ep_ref(); my ($begin, $end)= $ep->GetSelection; my $tmp_begin = $ep->LineFromPosition( $ep->PositionFromLine($begin) ); $ep->SetSelection($tmp_begin, $end); require Text::Wrap; $Text::Wrap::columns = $width; $Text::Wrap::unexpand = Kephra::Document::Data::attr('tab_use'); $Text::Wrap::tabstop = Kephra::Document::Data::attr('tab_size'); $ep->BeginUndoAction(); $ep->ReplaceSelection( Text::Wrap::wrap('', '', $ep->GetSelectedText) ); $ep->EndUndoAction(); } sub linebreak_custom { my $l10n = Kephra::Config::Localisation::strings()->{dialog}{edit}; my $width = Kephra::Dialog::get_text ($l10n->{wrap_width_input}, $l10n->{wrap_custom_headline} ); line_break( $width ) if defined $width; } sub linebreak_LLI { line_break( _config()->{indicator}{right_margin}{position} ); } sub linebreak_window { my $app = Kephra::App::Window::_ref(); my $ep = _ep_ref(); my ($width) = $app->GetSizeWH(); my $pos = $ep->GetColumn( $ep->PositionFromPointClose(100, 67) ); Kephra::Dialog::msg_box( $pos, '' ); #line_break($width); } 1; __END__ =head1 NAME Kephra::App::Format - functions that play with indention and length of lines =head1 DESCRIPTION kephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Goto.pm0000644000175000017500000001167511573643433020523 0ustar gregoagregoapackage Kephra::Edit::Goto; our $VERSION = '0.11'; use strict; use warnings; # # internal calls # sub _ep_ref { Kephra::App::EditPanel::_ref() } sub _center_caret { Kephra::Edit::_center_caret() } sub _pos { my $ep = _ep_ref(); my $pos = shift; $pos += $ep->GetLength if $pos < 0; $ep->GotoPos($pos); $ep->EnsureCaretVisible(); } # # simple jump calls # sub pos { position(@_) } sub position { # jump caret to character based text position my $pos = shift; return unless $pos; my $ep = _ep_ref(); my $max = $ep->GetLength; my $fvl = $ep->GetFirstVisibleLine; my $visible = $ep->GetLineVisible( $ep->LineFromPosition($pos) ); $pos += $max if $pos < 0; $pos = 0 if $pos < 0; $pos = $max if $pos > $max; $ep->SetCurrentPos($pos); $ep->SetSelection ($pos, $pos); $ep->SearchAnchor; #$visible ? $ep->ScrollToLine($fvl) : _center_caret(); $ep->EnsureCaretVisible; $ep->EnsureVisible( $ep->LineFromPosition($pos) ); #_center_caret(); } sub next_visible_pos { my $ep = _ep_ref(); my $line = $ep->GetCurrentLine(); return if $ep->GetLineVisible($line); $line = $ep->GetFoldParent($line) until $ep->GetLineVisible($line); $ep->GotoLine($line); _center_caret(); } sub line { my $ep = _ep_ref(); my $l18n = Kephra::API::localisation()->{dialog}{edit}; my $line = Kephra::Dialog::get_number( $l18n->{goto_line_input}, $l18n->{goto_line_headline}, $ep->GetCurrentLine + 1 ); line_nr( $line - 1) unless $line == &Wx::wxCANCEL; } sub line_nr { position( _ep_ref()->PositionFromLine( shift ) ) } sub last_edit { my $pos = Kephra::Document::Data::get_attribute('edit_pos'); position( $pos ) if defined $pos; } # # block navigation # sub prev_block{ _ep_ref()->CmdKeyExecute(&Wx::wxSTC_CMD_PARAUP) } sub next_block{ _ep_ref()->CmdKeyExecute(&Wx::wxSTC_CMD_PARADOWN) } # # brace navigation # sub prev_brace { my $ep = _ep_ref(); my $oldpos = my $pos = $ep->GetCurrentPos; my $braceleft = 1; # is brace left to caret $braceleft--, $pos-- if $ep->BraceMatch($pos-1) > -1; $ep->GotoPos($pos - 1); $ep->SearchAnchor(); my $newpos = $ep->SearchPrev(&Wx::wxSTC_FIND_REGEXP, '[{}()\[\]]'); $newpos++ if $ep->BraceMatch($newpos) > $newpos; $newpos-- if not $braceleft and $newpos == $ep->BraceMatch($pos)+1; $newpos > -1 ? position($newpos) : position($oldpos); } sub next_brace { my $ep = _ep_ref( ); my $oldpos = my $pos = $ep->GetCurrentPos; my $braceleft = 0; # is brace left to caret $braceleft++, $pos-- if $ep->BraceMatch($pos-1) > -1 and $ep->BraceMatch($pos) == -1; $ep->GotoPos($oldpos + 1); $ep->SearchAnchor(); my $newpos = $ep->SearchNext(&Wx::wxSTC_FIND_REGEXP, '[{}()\[\]]'); $newpos++ if $ep->BraceMatch($newpos) > $newpos; $newpos++ if not $braceleft and $newpos == $ep->BraceMatch($pos); $newpos > -1 ? position($newpos) : position($oldpos); } sub prev_related_brace { my $ep = _ep_ref(); my $pos = $ep->GetCurrentPos; my $braceright = 1; # is brace right to caret my $matchpos = $ep->BraceMatch(--$pos); $braceright--, $matchpos = $ep->BraceMatch(++$pos) if $matchpos == -1; if ($matchpos == -1) { prev_brace() } else { if ($matchpos < $pos) { $braceright ? position($matchpos) : position($matchpos+1); } else { # when there is no matching brace my $open_char = chr $ep->GetCharAt($pos); my $close_char = chr $ep->GetCharAt($matchpos); $ep->GotoPos($pos); $ep->SearchAnchor(); my $next_open = $ep->SearchPrev(0, $open_char); $ep->GotoPos($pos); $ep->SearchAnchor(); my $next_close = $ep->SearchPrev(0, $close_char); if ($next_open ==-1 and $next_close == -1) { $ep->GotoPos($ep->GetLength); $ep->SearchAnchor(); position( $ep->SearchPrev(0, $close_char) ); } else { $next_open > $next_close ? position( $next_open + 1 ) : position( $next_close ); } } } } sub next_related_brace { my $ep = _ep_ref(); my $pos = $ep->GetCurrentPos; my $braceleft = 1; # is brace left to caret my $matchpos = $ep->BraceMatch($pos); $braceleft--, $matchpos = $ep->BraceMatch(--$pos) if $matchpos == -1; if ($matchpos == -1) { next_brace() } else { if ($matchpos > $pos) { $braceleft ? position($matchpos+1) : position($matchpos); } else { # when there is no matching brace my $open_char = chr $ep->GetCharAt($matchpos); my $close_char = chr $ep->GetCharAt($pos); $ep->GotoPos($pos + 1); $ep->SearchAnchor(); my $next_open = $ep->SearchNext(0, $open_char); $ep->GotoPos($pos + 1); $ep->SearchAnchor(); my $next_close = $ep->SearchNext(0, $close_char); if ($next_open ==-1 and $next_close == -1) { $ep->GotoPos(0); $ep->SearchAnchor(); position( $ep->SearchNext(0, $open_char) ); } else { $next_open < $next_close ? position( $next_open + 1 ) : position( $next_close ); } } } } 1; __END__ =head1 NAME Kephra::App::Goto - caret jump functions =head1 DESCRIPTION =cutkephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Comment.pm0000644000175000017500000001531111573643433021204 0ustar gregoagregoapackage Kephra::Edit::Comment; our $VERSION = '0.08'; use strict; use warnings; # Comment sub add_block { my $csymbol = shift; my $symlength = length $csymbol; my $ep = &Kephra::App::EditPanel::_ref; my ($a, $b) = $ep->GetSelection; my ($al, $bl) = ($ep->LineFromPosition( $a ), $ep->LineFromPosition( $b )); my $lip; my $lipa = $ep->GetLineIndentPosition($al); my $lipb = $ep->GetLineIndentPosition($bl); $a += $symlength if $ep->GetTextRange($lipa, $lipa + $symlength) ne $csymbol and $a > $lipa; $b -= $symlength if $ep->GetTextRange($lipb, $lipb + $symlength) ne $csymbol and $b <= $lipb; $ep->BeginUndoAction; for ( $al .. $bl ) { $lip = $ep->GetLineIndentPosition($_); $ep->InsertText($lip, $csymbol), $b += $symlength if $ep->GetTextRange($lip, $lip + $symlength) ne $csymbol; } $ep->SetSelection($a, $b); $ep->EndUndoAction; } sub remove_block { my $csymbol = shift; my $symlength = length $csymbol; my $ep = &Kephra::App::EditPanel::_ref; my ($a, $b) = $ep->GetSelection; my ($al, $bl) = ($ep->LineFromPosition( $a ), $ep->LineFromPosition( $b )); my $lip; my $lipa = $ep->GetLineIndentPosition($al); my $rema = $ep->GetTextRange($lipa, $lipa + $symlength) eq $csymbol; my $lipb = $ep->GetLineIndentPosition($bl); my $remb = $ep->GetTextRange($lipb, $lipb + $symlength) eq $csymbol; $ep->BeginUndoAction; for ( $al .. $bl ) { $lip = $ep->GetLineIndentPosition($_); $ep->SetTargetStart($lip); $ep->SetTargetEnd( $lip + $symlength ); $ep->ReplaceTarget(''), $b -= $symlength if $ep->SearchInTarget($csymbol) > -1; } $a -= $symlength if $rema and $a > $lipa; $b += $symlength if $remb and $b <= $lipb; $ep->SetSelection($a, $b); $ep->EndUndoAction; } sub toggle_block { my $csymbol = shift; my $symlength = length $csymbol; my $ep = &Kephra::App::EditPanel::_ref; my $lip; $ep->BeginUndoAction; my ($a, $b) = $ep->GetSelection; my ($al, $bl) = ($ep->LineFromPosition( $a ), $ep->LineFromPosition( $b )); $lip = $ep->GetLineIndentPosition($al); my $add = $ep->GetTextRange($lip, $lip + $symlength) ne $csymbol; my $found; $ep->BeginUndoAction; for ($al .. $bl) { $lip = $ep->GetLineIndentPosition($_); $ep->SetTargetStart($lip); $ep->SetTargetEnd( $lip + $symlength ); $found = $ep->SearchInTarget($csymbol) != -1; if ($add){ $ep->InsertText($lip, $csymbol), $b += $symlength if not $found } else { $ep->ReplaceTarget('') , $b -= $symlength if $found } } $a = $add ? $a + $symlength : $a - $symlength; $a = $ep->PositionFromLine( $al ) if $a < $ep->PositionFromLine( $al ); $b = $ep->PositionFromLine( $bl ) if $b < $ep->PositionFromLine( $bl ); $ep->SetSelection($a, $b); $ep->EndUndoAction; } sub format_block { my $csymbol = shift; my $ep = Kephra::App::EditPanel::_ref(); my $lp; my $a = $ep->LineFromPosition( $ep->GetSelectionStart ); my $b = $ep->LineFromPosition( $ep->GetSelectionEnd ); $ep->BeginUndoAction; for ($b .. $a) { $lp = $ep->PositionFromLine($_); } $ep->EndUndoAction; } sub add_stream { my $ep = Kephra::App::EditPanel::_ref(); my ( $openbrace, $closebrace ) = @_; my ( $startpos, $endpos ) = $ep->GetSelection; my ( $commentpos, $firstopos, $lastopos, $firstcpos, $lastcpos ) = ( -1, $endpos, -1, $endpos, -1 ); $ep->BeginUndoAction; $ep->SetTargetStart($startpos); $ep->SetTargetEnd($endpos); while ( ( $commentpos = $ep->SearchInTarget($openbrace) ) > -1 ) { $firstopos = $commentpos if $firstopos > $commentpos; $lastopos = $commentpos; $ep->SetSelectionStart($commentpos); $ep->SetSelectionEnd( $commentpos + length($openbrace) ); $ep->ReplaceSelection(""); $endpos -= length($openbrace); $ep->SetTargetStart($commentpos); $ep->SetTargetEnd($endpos); } $ep->SetTargetStart($startpos); $ep->SetTargetEnd($endpos); while ( ( $commentpos = $ep->SearchInTarget($closebrace) ) > -1 ) { $firstcpos = $commentpos if ( $firstcpos > $commentpos ); $lastcpos = $commentpos; $ep->SetSelectionStart($commentpos); $ep->SetSelectionEnd( $commentpos + length($closebrace) ); $ep->ReplaceSelection(""); $endpos -= length($closebrace); $ep->SetTargetStart($commentpos); $ep->SetTargetEnd($endpos); } $ep->InsertText( $endpos, $closebrace ) if $lastcpos == -1; $ep->InsertText( $startpos, $openbrace ) if $lastopos == -1; $ep->InsertText( $startpos, $openbrace ) if $firstopos < $firstcpos; $ep->InsertText( $endpos, $closebrace ) if $lastopos < $lastcpos; #$ep->InsertText($endpos, $closebrace); #$ep->InsertText($startpos, $openbrace); $ep->EndUndoAction; } sub remove_stream { #o=openposition c=closeposition my ( $openbrace, $closebrace ) = @_; my $ep = Kephra::App::EditPanel::_ref(); my ( $startpos, $endpos ) = $ep->GetSelection(); my $firstopos = my $firstcpos = $endpos; my $commentpos = my $lastopos = my $lastcpos = -1; if ( $startpos < $endpos ) { $ep->BeginUndoAction(); $ep->SetTargetStart($startpos); $ep->SetTargetEnd($endpos); while ( ( $commentpos = $ep->SearchInTarget($openbrace) ) > -1 ) { $firstopos = $commentpos if ( $firstopos > $commentpos ); $lastopos = $commentpos; $ep->SetSelectionStart($commentpos); $ep->SetSelectionEnd( $commentpos + length($openbrace) ); $ep->ReplaceSelection(""); $endpos -= length($openbrace); $ep->SetTargetStart($commentpos); $ep->SetTargetEnd($endpos); } $ep->SetTargetStart($startpos); $ep->SetTargetEnd($endpos); while ( ($commentpos = $ep->SearchInTarget($closebrace) ) > -1 ) { $firstcpos = $commentpos if ( $firstcpos > $commentpos ); $lastcpos = $commentpos; $ep->SetSelectionStart($commentpos); $ep->SetSelectionEnd( $commentpos + length($closebrace) ); $ep->ReplaceSelection(""); $endpos -= length($closebrace); $ep->SetTargetStart($commentpos); $ep->SetTargetEnd($endpos); } if ( $firstopos > $firstcpos ) { $ep->InsertText( $startpos, $closebrace ); } if ( $lastopos > $lastcpos ) { $ep->InsertText( $endpos, $openbrace ); } if ( ( $lastopos == -1 ) && ( $lastcpos == -1 ) ) { $ep->InsertText( $startpos, $closebrace ); $ep->InsertText( $endpos + length($closebrace), $openbrace ); } $ep->EndUndoAction(); } } sub add_script { add_block ('#') } sub sub_script { remove_block('#') } sub toggle_script { toggle_block('#') } sub format_script { format_block('#') } sub sub_xml { remove_stream( '' ) } sub add_xml { add_stream ( '' ) } sub add_c { add_stream ( '/*', '*/' ) } sub sub_c { remove_stream( '/*', '*/' ) } 1; __END__ =head1 NAME Kephra::App::Comment - add and remove comments in your code text =head1 DESCRIPTION =cutkephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Select.pm0000644000175000017500000001175311573643433021027 0ustar gregoagregoapackage Kephra::Edit::Select; our $VERSION = '0.08'; use strict; use warnings; sub _ep_ref { Kephra::App::EditPanel::is( shift ) || Kephra::App::EditPanel::_ref() } sub _line_empty { my $line = shift; my $ep = _ep_ref( shift ); $line = $ep->GetCurrentLine() unless defined $line; return $ep->PositionFromLine($line) == $ep->GetLineEndPosition($line); } # sub get_block_start { my $pos = shift; my $ep = _ep_ref( shift ); $pos = $ep->GetCurrentPos unless defined $pos; my $line = $ep->LineFromPosition($pos); return $pos if _line_empty($line); return $pos if _line_empty($line-1) and $pos == $ep->PositionFromLine($line); my $cpos = $ep->GetCurrentPos; $ep->SetCurrentPos( $pos ); $ep->CmdKeyExecute(&Wx::wxSTC_CMD_PARAUP); $pos = $ep->GetCurrentPos; $ep->SetCurrentPos( $cpos ); return $pos; } sub get_block_end { my $pos = shift; my $ep = _ep_ref( shift ); $pos = $ep->GetCurrentPos unless defined $pos; my $line = $ep->LineFromPosition($pos); return $pos if _line_empty($line); return $pos if _line_empty($line+1) and $pos == $ep->GetLineEndPosition($line); my $cpos = $ep->GetCurrentPos; $ep->SetCurrentPos( $pos ); $ep->CmdKeyExecute(&Wx::wxSTC_CMD_PARADOWN); $line = $ep->GetCurrentLine(); $line--; $line-- until $ep->PositionFromLine($line)!=$ep->GetLineEndPosition($line); $pos = $ep->GetLineEndPosition($line); $ep->SetCurrentPos( $cpos ); return $pos; } sub to_block_begin{ _ep_ref()->CmdKeyExecute(&Wx::wxSTC_CMD_PARAUPEXTEND) } sub to_block_end { _ep_ref()->CmdKeyExecute(&Wx::wxSTC_CMD_PARADOWNEXTEND) } # sub nothing { my $ep = _ep_ref( shift ); my $pos = $ep->GetCurrentPos; $ep->SetSelection( $pos, $pos ) } sub word { my $pos = shift; my $ep = _ep_ref( shift ); $pos = $ep->GetCurrentPos unless defined $pos; $ep->SetSelection($ep->WordStartPosition($pos,1),$ep->WordEndPosition($pos,1)); } sub line { my $line = shift; my $ep = _ep_ref( shift ); $line = $ep->GetCurrentLine() unless defined $line; $ep->SetSelection($ep->PositionFromLine($line),$ep->GetLineEndPosition($line)); } sub block { my $pos = shift; my $ep = _ep_ref( shift ); $pos = $ep->GetCurrentPos unless defined $pos; $ep->SetSelection( get_block_start($pos), get_block_end($pos) ); } sub all { &document } sub document { _ep_ref()->SelectAll } sub all_if_non { my $ep = _ep_ref(); $ep->SelectAll if $ep->GetSelectionStart == $ep->GetSelectionEnd; my ($start, $end) = $ep->GetSelection; return $ep->GetTextRange( $start, $end ); } sub toggle_simple { # selects word line block or nothing my $ep = _ep_ref( shift ); my ($start, $end)= $ep->GetSelection; # initial selection my $startline = $ep->LineFromPosition($start); my $endline = $ep->LineFromPosition($end); return if _line_empty($startline) and _line_empty($endline); # try select word, if already more selected, do a line if ($startline == $endline){ word($start); my ($probestart, $probeend) = $ep->GetSelection; return unless $start <= $probestart and $end >= $probeend; line(); ($probestart, $probeend) = $ep->GetSelection; return unless $start == $probestart and $end == $probeend; } my $blockstart = get_block_start($start); my $blockend = get_block_end($end); # select nothing because block was selected return nothing() if $start == $blockstart and $end == $blockend; $ep->SetSelection($blockstart, $blockend); } sub toggle_content { # selects text inside of < > [] {} () '' "" my $ep = _ep_ref( shift ); my $min = my $max = my $pos = $ep->GetCurrentPos; my ($start, $end)= $ep->GetSelection; my $startline = $ep->LineFromPosition($start); my $endline = $ep->LineFromPosition($end); my $style = $ep->GetStyleAt($pos); # select quotetation, styles: 6" 7' re styles 17, 18 if ($style == 6 or $style == 7){ $min-- while $ep->GetStyleAt($min-1) == $style; $max++ while $ep->GetStyleAt($max+1) == $style; unless ($start==$min and $end-1==$max) { if ($start-1==$min and $end==$max) {$ep->SetSelection($min, $max+1)} else {$ep->SetSelection($min+1, $max)} return; } } #my %delimiter = ( #'>' => '<', ']'=>'[', '}'=>'{', ')'=>'(', #'/' => '/', '\'' => '\'', '"' => '"' #); #print "$start, $end--\n"; #$ep->GetTextRange(); #$ep->PositionFromLine($line) $ep->GetLineEndPosition($line); #$ep->BraceMatch($newpos) #my $blockstart = get_block_start($start); #my $blockend = get_block_end($end); #$ep->PositionFromLine($line); #$ep->GetLineEndPosition($line); #$pasttext =~ /([||||||])/ #/{|}|\(|\)|\[|\]/ #tr/{}()\[\]//; #$` #my $matchpos = $ep->BraceMatch(--$pos); #print '',($ep->GetSelection),"\n"; } # expand rectangular selection sub expand_rect_left{} sub expand_rect_right{} sub expand_rect_up{} sub expand_rect_down{} 1; __END__ =head1 NAME Kephra::Edit::Select - calls to select different text parts =head1 DESCRIPTION =over 4 =item nothing =item word =item line =item block =item document =back kephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/History.pm0000644000175000017500000000161411573643433021244 0ustar gregoagregoapackage Kephra::Edit::History; our $VERSION = '0.03'; =head1 NAME Kephra::App::History - undo, redo and so on =head1 DESCRIPTION =cut use strict; use warnings; # undo, redo etc. sub _ep_ref { Kephra::App::EditPanel::_ref() } sub _config { Kephra::API::settings()->{editpanel}{history} } sub undo { _ep_ref()->Undo } sub redo { _ep_ref()->Redo } sub undo_several { my $ep = _ep_ref(); $ep->Undo for 1 .. _config->{fast_undo_steps}; } sub redo_several { my $ep = _ep_ref(); $ep->Redo for 1 .. _config->{fast_undo_steps}; } sub undo_begin { my $ep = _ep_ref(); $ep->Undo while $ep->CanUndo; } sub redo_end { my $ep = _ep_ref(); $ep->Redo while $ep->CanRedo; } sub clear_history { _ep_ref()->EmptyUndoBuffer; Kephra::EventTable::trigger('document.savepoint'); } sub can_undo { _ep_ref()->CanUndo } sub can_redo { _ep_ref()->CanRedo } 1;kephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Convert.pm0000644000175000017500000001164711714037526021227 0ustar gregoagregoapackage Kephra::Edit::Convert; our $VERSION = '0.10'; use strict; use warnings; # wrapper method for the always same preparation and afterwork sub _default { my $action = shift; return until ref $action eq 'CODE'; my $ep = Kephra::App::EditPanel::_ref(); Kephra::EventTable::freeze_group('edit'); my ($begin, $end) = $ep->GetSelection; Kephra::Edit::_save_positions(); $ep->BeginUndoAction; $ep->SelectAll if $begin == $end; &$action( $ep ); $ep->EndUndoAction; Kephra::Edit::_restore_positions(); Kephra::EventTable::thaw_group('edit'); } # perform regexes on selection sub _tr { my ($dir, @arg) = @_; my ($fi, $ti); ($fi, $ti) = $dir eq 'fore' ? (0,1) : (1,0); _default( sub { my $ep = shift; my $text = $ep->GetSelectedText(); $text =~ s/$_->[$fi]/$_->[$ti]/g for @arg; $ep->ReplaceSelection($text); } ); } # # external calls # sub upper_case {_default( sub{ shift->CmdKeyExecute(&Wx::wxSTC_CMD_UPPERCASE) } )} sub lower_case {_default( sub{ shift->CmdKeyExecute(&Wx::wxSTC_CMD_LOWERCASE) } )} sub title_case {_default( sub{ my $ep = shift; my ($sel_end, $pos) = ($ep->GetSelectionEnd, 0); $ep->SetCurrentPos( $ep->GetSelectionStart - 1 ); while () { $ep->CmdKeyExecute(&Wx::wxSTC_CMD_WORDRIGHT); $pos = $ep->GetCurrentPos; last if $sel_end <= $pos; $ep->SetSelection( $pos, $pos + 1 ); $ep->CmdKeyExecute(&Wx::wxSTC_CMD_UPPERCASE); } } )} sub sentence_case { _default( sub{ my $ep = shift; my $line; my ($sel_end, $pos) = ($ep->GetSelectionEnd, 0); $ep->SetCurrentPos( $ep->GetSelectionStart() - 1 ); while () { $ep->CmdKeyExecute(&Wx::wxSTC_CMD_WORDRIGHT); $pos = $ep->GetCurrentPos; $line = $ep->LineFromPosition($pos); if ($pos == $ep->GetLineEndPosition( $ep->LineFromPosition($pos) )) { $ep->CmdKeyExecute(&Wx::wxSTC_CMD_WORDRIGHT); $pos = $ep->GetCurrentPos; } last if $sel_end <= $pos; $ep->SetSelection( $pos, $pos + 1 ); $ep->CmdKeyExecute(&Wx::wxSTC_CMD_UPPERCASE); $ep->SetCurrentPos( $pos + 1 ); $ep->SearchAnchor; last if $ep->SearchNext( 0, "." ) == -1 ; } } )} # # # sub _tabs2spaces { [' ' x Kephra::App::EditPanel::_ref()->GetTabWidth, "\t"] } sub spaces2tabs { _tr('fore', _tabs2spaces()) } sub tabs2spaces { _tr('back', _tabs2spaces()) } # # # sub indent2tabs { _indention(1) } sub indent2spaces { _indention(0) } sub _indention { my $indention = shift; my $ep = Kephra::App::EditPanel::_ref(); my ($begin, $end) = $ep->GetSelection; my $use_tabs = $ep->GetUseTabs; my $i; $ep->SetUseTabs($indention); $ep->BeginUndoAction(); for ($ep->LineFromPosition($begin) .. $ep->LineFromPosition($end)) { $i = $ep->GetLineIndentation($_); $ep->SetLineIndentation( $_, $i + 1 ); $ep->SetLineIndentation( $_, $i ); } $ep->EndUndoAction; $ep->SetUseTabs($use_tabs); } # # HTML enteties # my $space2entety = [' ',' ']; my @char2entity = ( ['à','à'],['á','á'],['â','â'],['ä','ä'], ['À','À'],['Ã','Á'],['Â','Â'],['Ä','Ä'], ['ã','ã'],['Ã¥','å'],['Ã','Ã'],['Ã…','Å'], ['æ','æ'], ['Æ','Æ'],['ç','ç'],['Ç','Ç'], ['è','è'],['é','é'],['ê','ê'],['ë','ë'], ['È','È'],['É','É'],['Ê','Ê'],['Ë','Ë'], ['ð','ð'], ['Ã','Ð'], ['ì','ì'],['í','í'],['î','î'],['ï','ï'], ['ÃŒ','Ì'],['Ã','Í'],['ÃŽ','Î'],['Ã','Ï'], ['µ','µ'], ['ñ','ñ'],['Ñ','ñ'], ['ò','ò'],['ó','ó'],['ô','ô'],['ö','ö'], ['Ã’','Ò'],['Ó','Ó'],['Ô','Ô'],['Ö','Ö'], ['õ','õ'],['ø','ø'],['Õ','Õ'],['Ø','Ø'], ['ù','ù'],['ú','ú'],['û','û'],['ü','ü'], ['Ù','Ù'],['Ú','Ú'],['Û','Û'],['Ü','Ü'], ['ý','ý'],['Ã','Ý'],['ÿ','ÿ'], ['þ','þ'], ['Þ','Þ'], ['ß','ß'], ['Å ','¦'],['Ž','´'], ['ž','¸'],['Å¡','¨'], ['·','·'],['¯','¯'], ['«','«'], ['»','»'], ['¡','¡'],['¿','¿'], ['±','±'],['×','×'], ['÷','÷'], ['¬','¬'], ['°','°'], ['º','º'], ['ª','ª'], ['¹','¹'], ['²','²'], ['³','³'], ['Å’','¼'],['Å“','½'],['Ÿ','¾'], ['€','¤'],['¢','¢'], ['£','£'],['Â¥','¥'], ['§','§'], ['¶','¶'], ['©','©'], ['®','®'], ); sub spaces2entities { _tr('fore', $space2entety) } sub entities2spaces { _tr('back', $space2entety) } sub chars2entities { _tr('fore', @char2entity) } sub entities2chars { _tr('back', @char2entity) } 1; __END__ =head1 NAME Kephra::App::Convert - character and word translation functions =head1 DESCRIPTION kephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit/Special.pm0000644000175000017500000000355511573643433021171 0ustar gregoagregoapackage Kephra::Edit::Special; $VERSION = '0.01'; use strict; use warnings; sub _ep_ref { Kephra::App::EditPanel::_ref() } sub copy_surrounding_string { # Edit String (surrounding string encapsulated by "" or '') my $ep = _ep_ref(); my $pos = $ep->GetCurrentPos; my $line = $ep->GetCurrentLine; my $lpos = $ep->PositionFromLine($line); my $befor_text = $ep->GetTextRange($lpos, $pos); my $after_text = $ep->GetTextRange($pos+1, $ep->GetLineEndPosition($line)); my $sq_start = rindex $befor_text, '\''; my $sq_stop = index $after_text, '\''; my $dq_start = rindex $befor_text, '"'; my $dq_stop = index $after_text, '"'; return if ($sq_start == -1 or $sq_stop == -1) and ($dq_start == -1 or $dq_stop == -1); Kephra::Edit::_save_positions(); if ($sq_start > $dq_start){$ep->SetSelection($lpos+$sq_start+1, $pos+$sq_stop+1)} else {$ep->SetSelection($lpos+$dq_start+1, $pos+$dq_stop+1)} Kephra::Edit::copy(); Kephra::Edit::_restore_positions(); } sub insert_last_perl_var { my $ep = _ep_ref(); my $lnr = $ep->GetCurrentLine; return unless $lnr; my $pos = $ep->GetCurrentPos; my $var; # store catched var name into that scalar my $nl = ''; # namespace level, how nested is current ns? while (1){ # go up and get me the conent of the line my $line = $ep->GetLine(--$lnr); # catch the perl var my $result = $line =~ /([\$@%]\w+)[\[{ -=\(\r\n]/; $nl++ if $line =~ /^\s*\}/; $nl-- if $line =~ /\{\s*(#.*)?$/; $var = $nl ? '' : $1; # exit loop if found something in this , no subnamespace, # or reached end of file or end of block last if $var or $lnr == 0 or ($nl and $nl < 0); } return unless $var; $ep->InsertText( $pos, $var); $ep->GotoPos($pos + length $var); } sub insert_time_date { my @t = localtime; Kephra::Edit::insert( sprintf( "%02d:%02d %02d.%02d.%d", $t[2],$t[1],$t[3],1+$t[4],1900+$t[5] ) ); } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Document/0000755000175000017500000000000012300715234020120 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/Document/Data.pm0000644000175000017500000002053411573643454021352 0ustar gregoagregoapackage Kephra::Document::Data; our $VERSION = '0.08'; use strict; use warnings; # global values my %values; # global doc values sub values { \%values } sub get_value { $values{$_[0]} if defined $values{$_[0]} } sub set_value { $values{$_[0]} = $_[1] if defined $_[1] } sub inc_value { $values{$_[0]}++ } sub dec_value { $values{$_[0]}-- } sub del_value { delete $values{$_[0]} if defined $values{$_[0]}} # values per dos my @attributes; # data per doc for all open docs my $current_attr; # data of current doc my $current_nr = 0; my $previous_nr = 0; # global attr functions sub _attributes { \@attributes } sub _values { \%values } sub _hash { $attributes[$_[0]] } sub _ep { my $nr = valid_or_current_doc_nr($_[0]); return if $nr < 0; my $ep = $attributes[$nr]{ep_ref}; $ep if Kephra::App::EditPanel::is($ep); } sub count { @attributes } sub last_nr { $#attributes } sub previous_nr { $previous_nr } sub current_nr { $current_nr } sub next_nr { my $inc = shift; return unless defined $inc and $inc; my $base = shift; $base = current_nr() unless defined $base; my $last_nr = last_nr(); my $nr = $base + $inc; $nr += $last_nr+1 if $nr < 0; $nr -= $last_nr+1 if $nr > $last_nr; return validate_doc_nr($nr); } sub all_nr { [0..last_nr()] } sub get_previous_nr { $previous_nr } sub set_previous_nr { $previous_nr = $_[0] if defined $_[0] } sub get_current_nr { $current_nr } sub set_current_nr { $current_nr = $_[0] if defined $_[0] and validate_doc_nr($_[0]) > -1; $current_attr = $attributes[$current_nr]; Kephra::App::EditPanel::_set_ref( _ep($current_nr) ); my $fconf = Kephra::File::_config(); $fconf->{current}{directory} = get_attribute('directory', $current_nr) if ref $fconf; } sub validate_doc_nr { my $nr = shift; return -1 unless defined $nr; return -1 unless $nr eq int $nr; $nr = exists $attributes[$nr] ? $nr : -1; } sub valid_or_current_doc_nr { my $nr = validate_doc_nr(shift); $nr == -1 ? current_nr() : $nr; } sub create_slot { my $nr = shift; $attributes[$_+1] = $attributes[$_] for reverse $nr .. last_nr(); $attributes[$nr] = {}; set_current_nr($current_nr+1) if $current_nr >= $nr; $previous_nr++ if $previous_nr >= $nr; } sub empty_slot { my $nr = shift; return if $nr < 0 or exists $attributes[$nr]; $attributes[$nr] = {} } sub delete_slot { my $nr = validate_doc_nr(shift); return if $nr < 0; splice @attributes, $nr, 1; } # generic attr data accessors on any value and any doc sub get_attribute { my $attr = shift; return unless defined $attr or $attr; my $nr = shift; $nr = defined $nr ? validate_doc_nr($nr) : current_nr(); return if $nr < 0; $attributes[ $nr ]{ $attr } if defined $attributes[ $nr ]{ $attr }; } sub set_attribute { my $attr = shift; my $value = shift; return unless defined $value; my $nr = shift; $nr = defined $nr ? validate_doc_nr($nr) : current_nr(); return if $nr < 0; $attributes[ $nr ]{ $attr } = $value; $value; } sub set_all_attributes { # all attr of one doc my $attr = shift; my $nr = validate_doc_nr(shift); return if $nr < 0 or ref $attr ne 'HASH'; $attributes[ $nr ] = $attr; } # shortcut accessors just for current doc and many values sub attributes { my $params = shift; my $nr = validate_doc_nr(shift); return if $nr < 0; my $attr = $attributes[$nr]; if (ref $params eq 'ARRAY') { my @result; push @result, $attr->{ $_ } for @$params; return \@result; } elsif (ref $params eq 'HASH') { $attr->{$_} = $params->{$_} for keys %$params; } } # shortcut accessors just for current doc and one value sub attr { if (defined $_[1]){ $current_attr->{$_[0]} = $_[1]} else { $current_attr->{$_[0]} } } # specific data (attribute) accessors sub first_name { get_attribute('firstname', $_[0]) } sub file_name { get_attribute('file_name', $_[0]) } sub file_path { defined $_[0] ? set_file_path($_[0]) : get_file_path() } sub get_file_path { get_attribute('file_path', $_[0]) } sub set_file_path { my ( $file_path, $doc_nr ) = @_; $doc_nr = valid_or_current_doc_nr($doc_nr); set_attribute('file_path', $file_path, $doc_nr); dissect_path( $file_path, $doc_nr ); } sub dissect_path { my ($file_path, $doc_nr) = @_; $doc_nr = validate_doc_nr($doc_nr); return if $doc_nr < 0; my $attr = $attributes[$doc_nr]; my ($volume, $directories, $file) = File::Spec->splitpath( $file_path ); $directories = $volume.$directories if $volume; $attr->{directory} = $directories; $attr->{file_name} = $file; if ( length($file) > 0 ) { my @filenameparts = split /\./, $file ; $attr->{ending} = pop @filenameparts if @filenameparts > 1; $attr->{firstname}= join '.', @filenameparts; } } sub all_file_pathes { my @pathes; push @pathes, $_->{file_path} for @attributes; return \@pathes; } sub all_file_names { my @names; $names[$_] = $_->{file_name} for @attributes; return \@names; } sub nr_from_file_path { my $given_path = shift; return -1 unless $given_path; for ( 0 .. $#attributes ) { if (defined $attributes[$_]{'file_path'} and $attributes[$_]{'file_path'} eq $given_path) { return $_; } } return -1; } sub file_already_open { 1 if nr_from_file_path(shift) > -1 } sub cursor_pos { $attributes[$current_nr]{cursor_pos} if $values{loaded}; } sub nr_from_ep { my $ep = shift; for (@{all_nr()}) { return $_ if $ep eq _ep($_); } return -1; } sub get_all_ep { my @ep; for (@{all_nr()}) { my $ep = _ep($_); push @ep, $ep if $ep; } \@ep; } # more complex operations sub set_missing_attributes_to_default { my ($nr, $file) = @_; $nr = validate_doc_nr($nr); return if $nr < 0; $file = get_file_path($nr) unless defined $file; my $default = Kephra::File::_config()->{defaultsettings}; } sub set_attributes_to_default { my ($nr, $file) = @_; $nr = validate_doc_nr($nr); return if $nr < 0; my $config = Kephra::File::_config()->{defaultsettings}; return unless ref $config eq 'HASH'; $file = get_file_path($nr) unless defined $file; my $attr = { 'edit_pos' => -1, 'ep_ref' => _ep($nr), 'file_path' => $file, }; my $default = (defined $file and -e $file) ? $config->{open} : $config->{new}; $attr->{$_} = $default->{$_} for qw(EOL codepage cursor_pos readonly syntaxmode tab_size tab_use); set_all_attributes($attr, $nr); dissect_path($file, $nr); set_current_nr($nr) if $nr == current_nr(); } sub evaluate_attributes { my $doc_nr = validate_doc_nr(shift); return if $doc_nr < 0; my $config = Kephra::File::_config(); my $attr = $attributes[$doc_nr]; my $ep = Kephra::App::EditPanel::_ref(); Kephra::EventTable::freeze('document.text.change'); Kephra::Document::Property::set( {$_ => $attr->{$_} } ) for qw(codepage tab_use tab_size EOL readonly syntaxmode); Kephra::EventTable::thaw('document.text.change'); # setting selection and caret position if ($attr->{selstart} and $attr->{selstart}) { $attr->{cursor_pos} < $attr->{selend} ? $ep->SetSelection( $attr->{selend},$attr->{selstart}) : $ep->SetSelection( $attr->{selstart},$attr->{selend}); } else { $ep->GotoPos( $attr->{cursor_pos} ) } if ($config->{open}{in_current_dir}){ $config->{current}{directory} = $attr->{directory} if $attr->{directory}; } else { $config->{current}{directory} = '' } Kephra::App::EditPanel::set_word_chars($ep); Kephra::App::EditPanel::Indicator::paint_bracelight($ep) if Kephra::App::EditPanel::Indicator::bracelight_visible(); Kephra::App::EditPanel::Margin::autosize_line_number(); Kephra::App::EditPanel::Fold::restore($doc_nr); Kephra::App::StatusBar::refresh_cursor(); Kephra::Edit::Marker::restore($doc_nr); Kephra::Edit::_let_caret_visible(); } sub update_attributes { # was named save_properties my $doc_nr = valid_or_current_doc_nr(shift); return if $doc_nr < 0; my $attr = _hash($doc_nr); my $ep = _ep($doc_nr); $attr->{cursor_pos}= $ep->GetCurrentPos; $attr->{selstart} = $ep->GetSelectionStart; $attr->{selend} = $ep->GetSelectionEnd; Kephra::App::EditPanel::Fold::store($doc_nr); Kephra::Edit::Marker::store($doc_nr); } 1; =head1 NAME Kephra::Document::Data - API for data assotiated with opened documents =head1 DESCRIPTION =cut kephra-0.4.3.34+dfsg.orig/lib/Kephra/Document/Property.pm0000644000175000017500000001555311573643454022332 0ustar gregoagregoapackage Kephra::Document::Property; our $VERSION = '0.04'; use strict; use warnings; # some internal shortcut helper sub _ep_ref { Kephra::Document::Data::_ep($_[0]) } sub _doc_nr { Kephra::Document::Data::valid_or_current_doc_nr($_[0]) } sub _is_current { $_[0] == Kephra::Document::Data::current_nr() } sub _get_attr { Kephra::Document::Data::get_attribute(@_) } sub _set_attr { Kephra::Document::Data::set_attribute(@_) } # # general API for single and multiple values (getter/setter) # sub get { my $property = shift; my $doc_nr = _doc_nr(shift); return if $doc_nr < 0; if (not ref $property) { _get_attr($property, $doc_nr) } elsif (ref $property eq 'ARRAY') { my @result; push @result, _get_attr($_, $doc_nr) for @$property; \@result; } } sub _set{ my ($key, $v) = @_; return unless defined $v; return set_codepage($v) if $key eq 'codepage'; return set_EOL_mode($v) if $key eq 'EOL'; return set_readonly($v) if $key eq 'readonly'; return set_syntaxmode($v)if $key eq 'syntaxmode'; return set_tab_size($v) if $key eq 'tab_size'; return set_tab_mode($v) if $key eq 'tab_use'; } sub set { if (not ref $_[0] and defined $_[1]){_set(@_)} elsif ( ref $_[0] eq 'HASH') {_set($_, $_[0]->{$_}) for keys %{$_[0]}} } sub get_file { _get_attr('file_path') } sub set_file { my ($file, $nr) = @_; $nr = _doc_nr($nr); return if $nr < 0; Kephra::Document::Data::set_file_path($file, $nr); Kephra::App::TabBar::refresh_label($nr); Kephra::App::Window::refresh_title() if _is_current($nr); } # # property specific API # # # syntaxmode sub get_syntaxmode { _get_attr('syntaxmode') } sub set_syntaxmode { Kephra::Document::SyntaxMode::set(@_) } # # sub get_codepage { _get_attr('codepage', $_[0]) } sub set_codepage { my ($new_value, $doc_nr) = @_; $doc_nr = _doc_nr($doc_nr); return if $doc_nr < 0 or not defined $new_value; my $old_value = get_codepage($doc_nr); my $ep = _ep_ref($doc_nr); if ($old_value eq 'ascii' and $new_value eq 'utf8'){ #unless (Encode::is_utf8($ep->GetText())) { Kephra::Document::Data::update_attributes($doc_nr); eval { #Encode::encode('ascii'); $ep->SetText( Encode::decode('utf8', $ep->GetText()) ); }; #print "$@\n"; Kephra::Document::Data::evaluate_attributes($doc_nr); #} #print Encode::is_utf8($ep->GetText())."\n"; } elsif ($old_value eq 'utf8' and $new_value eq 'ascii') { Kephra::Document::Data::update_attributes($doc_nr); $ep->SetText( Encode::encode('utf8', $ep->GetText()) ); Kephra::Document::Data::evaluate_attributes($doc_nr); } #print "ask auto $mode\n"; #$ep->SetCodePage( &Wx::wxSTC_CP_UTF8 ); _set_attr('codepage', $new_value, $doc_nr); Kephra::App::StatusBar::codepage_info($new_value); } sub switch_codepage { set_codepage( get_codepage( _doc_nr() ) eq 'utf8' ? 'ascii' : 'utf8' ); } # # tab size sub get_tab_size { _get_attr('tab_size', $_[0]) } sub set_tab_size { my ($size, $nr) = @_; $nr = _doc_nr($nr); return if not $size or $nr < 0; my $ep = _ep_ref(); $ep->SetTabWidth($size); $ep->SetIndent($size); $ep->SetHighlightGuide($size); _set_attr('tab_size', $size, $nr); } # # tab use sub get_tab_mode { _get_attr('tab_use', $_[0]) } sub set_tab_mode { my $mode = shift; my $nr = _doc_nr(shift); return if $nr < 0; my $ep = _ep_ref(); if ($mode eq 'auto') { if ($ep->GetTextLength){ my $line; for my $lnr (0 .. $ep->GetLineCount()-1){ $line = $ep->GetLine($lnr); if ($line =~ /^( |\t)/) { $mode = $1 eq ' ' ? 0 : 1; last; } } } else { $mode = Kephra::File::_config()->{defaultsettings}{new}{tab_use}; } } $ep->SetUseTabs($mode); _set_attr('tab_use', $mode, $nr); Kephra::App::StatusBar::tab_info() if _is_current($nr); } sub set_tabs_hard { set_tab_mode(1) } sub set_tabs_soft { set_tab_mode(0) } sub switch_tab_mode{ get_tab_mode() ? set_tab_mode(0) : set_tab_mode(1) } # # EOL sub EOL_length { _get_attr('EOL_length') } sub get_EOL_mode { _get_attr('EOL') } sub set_EOL_mode { my $mode = shift; return unless defined $mode; if ($mode eq 'OS') { if (&Wx::wxMSW) {$mode = 'cr+lf'} elsif (&Wx::wxMAC) {$mode = 'cr' } else {$mode = 'lf' } } $mode = detect_EOL_mode() if $mode eq 'auto'; my $ep = _ep_ref(); my $eoll = 1; if ( $mode eq 'cr+lf'or $mode eq 'win') {$ep->SetEOLMode(&Wx::wxSTC_EOL_CRLF); $eoll = 2; } elsif ( $mode eq 'cr'or $mode eq 'mac') {$ep->SetEOLMode(&Wx::wxSTC_EOL_CR) } else {$ep->SetEOLMode(&Wx::wxSTC_EOL_LF) } _set_attr('EOL', $mode); _set_attr('EOL_length', $eoll); Kephra::App::StatusBar::EOL_info($mode); } sub convert_EOL { my $mode = shift || get_EOL_mode(); my $doc_nr = _doc_nr(shift); my $ep = _ep_ref($doc_nr); $mode = Kephra::File::_config()->{defaultsettings}{EOL_open} unless $mode; $mode = detect_EOL_mode() if $mode eq 'auto'; Kephra::EventTable::freeze_group('edit'); if ($mode eq 'cr+lf' or $mode eq 'win') {$ep->ConvertEOLs(&Wx::wxSTC_EOL_CRLF)} elsif ($mode eq 'cr' or $mode eq 'mac' ) {$ep->ConvertEOLs(&Wx::wxSTC_EOL_CR)} else {$ep->ConvertEOLs(&Wx::wxSTC_EOL_LF)} Kephra::EventTable::thaw_group('edit'); set_EOL_mode($mode); } sub detect_EOL_mode { my $ep = _ep_ref(); my $end_pos = $ep->PositionFromLine(1); my $begin_pos = $end_pos - 3; $begin_pos = 0 if $begin_pos < 0; my $text = $ep->GetTextRange( $begin_pos, $end_pos ); if ( length($text) < 1 ) { return 'auto' } else { #print "win \n" if $text =~ /\r\n/; #return 'cr+lf' if $text =~ /\r\n/; #return 'cr' if $text =~ /\r/; #return 'lf' if $text =~ /\n/; return 'auto'; } } # # write protection sub get_readonly { _get_attr('readonly') } sub set_readonly { my $status = shift; my $ep = _ep_ref(); if (not $status or $status eq 'off' ) { $ep->SetReadOnly(0); $status = 'off'; } elsif ( $status eq 'on' or $status eq '1' ) { $ep->SetReadOnly(1); $status = 'on'; } elsif ( $status eq 'protect' or $status eq '2' ) { my $file = Kephra::Document::Data::get_file_path(); if ( $file and not -w $file ) {$ep->SetReadOnly(1)} else {$ep->SetReadOnly(0)} $status = 'protect'; } _set_attr('readonly', $status); $status = $ep->GetReadOnly ? 1 : 0; _set_attr('editable', $status); Kephra::App::TabBar::refresh_current_label() if Kephra::App::TabBar::_config()->{info_symbol}; } sub set_readonly_on { set_readonly('on') } sub set_readonly_off { set_readonly('off') } sub set_readonly_protect { set_readonly('protect') } 1; __END__ =head1 NAME Kephra::Document::Property - external API for document handling =head1 DESCRIPTION =over 4 =item syntaxmode =item codepage =item readonly =item tab size and usage =item end of line marker =back kephra-0.4.3.34+dfsg.orig/lib/Kephra/Document/SyntaxMode.pm0000644000175000017500000000677611573643454022610 0ustar gregoagregoapackage Kephra::Document::SyntaxMode; our $VERSION = '0.06'; use strict; use warnings; my $current; sub _ID { $current = defined $_[0] ? $_[0] : $current } # syntaxstyles sub _get_auto{ &_get_by_fileending } sub _get_by_fileending { my $file_ending = Kephra::Document::Data::get_attribute('ending', shift ); chop $file_ending if $file_ending and (substr ($file_ending, -1) eq '~'); my $language_id; if ($file_ending) { $language_id = $Kephra::temp{file}{end2langmap} { Kephra::Config::_lc_utf($file_ending) }; } else { return "none" } if ( !$language_id or $language_id eq '') { return "none" } elsif ( $language_id eq 'text' ) { return "none" } return $language_id; } sub switch_auto { my $auto_style = _get_auto(); if (_ID() ne $auto_style) { set($auto_style) } else { set('none') } } sub reload { my $nr = Kephra::Document::Data::valid_or_current_doc_nr(shift); set( Kephra::Document::Data::get_attribute('syntaxmode', $nr), $nr ); } sub update { _ID(Kephra::Document::Data::attr('syntaxmode')) } sub set { my $style = shift; my $doc_nr = Kephra::Document::Data::valid_or_current_doc_nr(shift); return if $doc_nr == -1; my $ep = Kephra::Document::Data::_ep($doc_nr); my $color = \&Kephra::Config::color; $style = _get_by_fileending() if $style eq 'auto'; $style = 'none' unless $style; # do nothing when syntaxmode of next doc is the same #return if _ID() eq $style; # prevent clash between big lexer & indicator if ( $style =~ /asp|html|php|xml/ ) { $ep->SetStyleBits(7) } else { $ep->SetStyleBits(5) } # clear style infos $ep->StyleResetDefault; Kephra::App::EditPanel::load_font($ep); $ep->StyleClearAll; $ep->SetKeyWords( $_, '' ) for 0 .. 1; # load syntax style if ( $style eq 'none' ) { $ep->SetLexer(&Wx::wxSTC_LEX_NULL); } else { eval("require syntaxhighlighter::$style"); eval("syntaxhighlighter::$style" . '::load($ep)'); } # restore bracelight, bracebadlight indentguide colors my $indicator = Kephra::App::EditPanel::_config()->{indicator}; my $bracelight = $indicator->{bracelight}; if ( $bracelight->{visible} ) { $ep->StyleSetBold( &Wx::wxSTC_STYLE_BRACELIGHT, 1 ); $ep->StyleSetBold( &Wx::wxSTC_STYLE_BRACEBAD, 1 ); $ep->StyleSetForeground ( &Wx::wxSTC_STYLE_BRACELIGHT, &$color( $bracelight->{good_color} ) ); $ep->StyleSetBackground ( &Wx::wxSTC_STYLE_BRACELIGHT, &$color( $bracelight->{back_color} ) ); $ep->StyleSetForeground ( &Wx::wxSTC_STYLE_BRACEBAD, &$color( $bracelight->{bad_color} ) ); $ep->StyleSetBackground ( &Wx::wxSTC_STYLE_BRACEBAD, &$color( $bracelight->{back_color} ) ); $ep->StyleSetForeground (&Wx::wxSTC_STYLE_INDENTGUIDE,&$color($indicator->{indent_guide}{color})); } Kephra::Document::Data::set_attribute( 'syntaxmode', $style, $doc_nr); _ID($style); Kephra::EventTable::freeze('document.text.change'); $ep->Colourise( 0, $ep->GetTextLength ); # refresh editpanel painting, not needed normally Kephra::EventTable::thaw('document.text.change'); # cleanup Kephra::App::EditPanel::Margin::refresh_changeable_settings($ep); Kephra::App::StatusBar::style_info($style); return $style; } sub compile {} sub apply_color {} sub open_file { Kephra::Config::open_file( 'syntaxhighlighter', "$_[0].pm") } 1; =head1 NAME Kephra::Document::SyntaxMode - content language specific settings of a doc =head1 DESCRIPTION =cutkephra-0.4.3.34+dfsg.orig/lib/Kephra/Document/Change.pm0000644000175000017500000000252411573643454021665 0ustar gregoagregoapackage Kephra::Document::Change; our $VERSION = '0.07'; use strict; use warnings; # # changing the current document # # set document with a given nr as current document sub to_nr { to_number(@_) } sub to_number { my $new_doc = Kephra::Document::Data::validate_doc_nr(shift); my $old_doc = Kephra::Document::Data::current_nr(); if ($new_doc != $old_doc and $new_doc > -1) { Kephra::Document::Data::update_attributes($old_doc); Kephra::File::save_current() if Kephra::File::_config()->{save}{change_doc}; Kephra::Document::Data::set_current_nr($new_doc); Kephra::Document::Data::set_previous_nr($old_doc); Kephra::App::Window::refresh_title(); Kephra::App::TabBar::raise_tab_by_doc_nr($new_doc); Kephra::App::StatusBar::refresh_all_cells(); Kephra::EventTable::trigger_group( 'doc_change' ); Kephra::App::EditPanel::gets_focus(); return 1; } else { #print "not changed\n" } return 0; } #sub to_path{} # planing # change to the previous used document sub switch_back { to_number( Kephra::Document::Data::previous_nr() ) } # change to the previous used document sub tab_left { Kephra::App::TabBar::raise_tab_left() } sub tab_right { Kephra::App::TabBar::raise_tab_right() } sub move_left { Kephra::App::TabBar::rotate_tab_left() } sub move_right{ Kephra::App::TabBar::rotate_tab_right()} 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Plugin.pm0000644000175000017500000000016711774655572020170 0ustar gregoagregoapackage Kephra::Plugin; our $VERSION = '0.00'; use strict; use warnings; sub install{} sub deinstall{} sub init {} 1;kephra-0.4.3.34+dfsg.orig/lib/Kephra/EventTable.pm0000644000175000017500000001226511573643454020756 0ustar gregoagregoapackage Kephra::EventTable; our $VERSION = '0.16'; use strict; use warnings; # get pointer to the event list my %timer; my %table; my %group = ( edit => [qw(document.text.change document.text.select caret.move)], doc_change => [qw(document.current.number.changed document.savepoint document.text.select)], ); sub _table { \%table } sub start_timer { # set or update timer events my $win = Kephra::App::Window::_ref(); my $config = Kephra::API::settings()->{file}; stop_timer(); if ($config->{open}{notify_change}) { $timer{file_notify} = Wx::Timer->new( $win, 2 ); $timer{file_notify}->Start( $config->{open}{notify_change} * 1000 ); Wx::Event::EVT_TIMER( $win, 2, sub { Kephra::File::changed_notify_check() } ); } if ($config->{save}{auto_save}) { $timer{file_save} = Wx::Timer->new( $win, 1 ); $timer{file_save}->Start( $config->{save}{auto_save} * 1000 ); Wx::Event::EVT_TIMER( $win, 1, sub { Kephra::File::save_all_named() } ); } } sub stop_timer { my $win = Kephra::App::Window::_ref(); $timer{file_save}->Stop if ref $timer{file_save} eq 'Wx::Timer'; delete $timer{file_save}; $timer{file_notify}->Stop if ref $timer{file_notify} eq 'Wx::Timer'; delete $timer{file_notify}; } sub delete_all_timer {} ####################################################################### sub add_call { return until ref $_[2] eq 'CODE'; my $list = _table(); $list->{active}{ $_[0] }{ $_[1] } = $_[2]; $list->{owner}{ $_[3] }{ $_[0] }{ $_[1] } = 1 if $_[3]; } sub add_frozen_call { return until ref $_[2] eq 'CODE'; my $list = _table(); $list->{frozen}{ $_[0] }{ $_[1] } = $_[2]; $list->{owner}{ $_[3] }{ $_[0] }{ $_[1] } = 1 if $_[3]; } sub trigger { my $active = _table()->{active}; for my $event (@_){ if (ref $active->{$event} eq 'HASH'){ $_->() for values %{ $active->{$event} } } } } sub trigger_group { my $group_name = shift; return unless $group_name and ref $group{$group_name} eq 'ARRAY'; trigger( @{$group{$group_name}} ); } sub freeze { my $list = _table(); for my $event (@_){ if (ref $list->{active}{$event} eq 'HASH'){ $list->{frozen}{$event}{$_} = $list->{active}{$event}{$_} for keys %{$list->{active}{$event}}; delete $list->{active}{$event}; } } } sub freeze_group { my $group_name = shift; return unless $group_name and ref $group{$group_name} eq 'ARRAY'; freeze( @{$group{$group_name}} ); } sub freeze_all { freeze($_) for keys %{_table()->{active}} } sub thaw { my $list = _table(); for my $event (@_){ if (ref $list->{frozen}{$event} eq 'HASH'){ $list->{active}{$event}{$_} = $list->{frozen}{$event}{$_} for keys %{$list->{frozen}{$event}}; delete $list->{frozen}{$event}; } } } sub thaw_group { my $group_name = shift; return unless $group_name and ref $group{$group_name} eq 'ARRAY'; thaw( @{$group{$group_name}} ); } sub thaw_all { thaw($_) for keys %{_table()->{frozen}} } sub del_call { return until $_[1]; my $list = _table()->{active}; delete $list->{ $_[0] }{ $_[1] } if exists $list->{ $_[0] }{ $_[1] }; $list = _table()->{frozen}; delete $list->{ $_[0] }{ $_[1] } if exists $list->{ $_[0] }{ $_[1] }; } sub del_subscription { my $subID = shift; my $list = _table()->{active}; for my $event (keys %$list){ delete $list->{$event}->{$subID} if exists $list->{$event}->{$subID}; } $list = _table()->{frozen}; for my $event (keys %$list){ delete $list->{$event}->{$subID} if exists $list->{$event}->{$subID}; } } sub del_own_subscriptions { my $owner = shift; my $list = _table(); return unless ref $list->{owner}{ $owner } eq 'HASH'; my $lista = $list->{active}; my $listf = $list->{frozen}; my $own_ev = $list->{owner}{ $owner }; for my $ev (keys %$own_ev) { for (keys %{$own_ev->{$ev}}) { delete $lista->{ $ev }{ $_ } if exists $lista->{ $ev }{ $_ }; delete $listf->{ $ev }{ $_ } if exists $listf->{ $ev }{ $_ }; } } delete $list->{owner}{ $owner }; } sub del_all_active { $table{active} = () } sub del_all_frozen { $table{frozen} = () } sub del_all { %table = () } 1; __END__ =head1 NAME Kephra::API::EventTable - API to internal events =head1 DESCRIPTION Every routine can subscribe a callback to any event that will than triggered when that event takes place. Also extentions (plugins) can do that. Event ID can also be triggered to simulate application events. Some function do freeze events to speed up certain repeating actions (don't forget to thaw after that). Callbacks can also sanely removed, if no longer needed. Names of Events contain dots as separator of of namespaces. =head1 SPECIFICATION =head2 add_call =over =item * EvenID =item * CallbackID for removing that callback. Must be unique in for this event. =item * Callback a Coderef. =item * Owner for removing all callbacks of that owner. =back =head1 List of all Events =over 4 =item * menu.open =item * editpanel.focus =item * document.text.select =item * document.text.change =item * document.savepoint =item * document.list =item * caret.move =item * app.close =back =cut kephra-0.4.3.34+dfsg.orig/lib/Kephra/Document.pm0000644000175000017500000001500411573643454020475 0ustar gregoagregoapackage Kephra::Document; our $VERSION = '0.53'; use strict; use warnings; sub _file_config { Kephra::File::_config() } sub _new_if_allowed { # new(empty), add(open) restore(open session) my $mode = shift; my $ep = Kephra::App::EditPanel::_ref(); my $file = Kephra::Document::Data::get_file_path(); my $old_doc_nr= Kephra::Document::Data::current_nr(); my $new_doc_nr= Kephra::Document::Data::get_value('buffer'); my $config = _file_config()->{open}; # check settings # in single doc mode close previous doc first if ( $config->{single_doc} == 1 ) { Kephra::File::close_current(); return 0; } unless ( $mode eq 'new' ) { if ($ep->GetText eq '' and $ep->GetModify == 0 and (not $file or not -e $file)){ return $old_doc_nr if ($config->{into_empty_doc} == 1) or ($config->{into_only_empty_doc} == 1 and $new_doc_nr == 1 ); } } # still there? good, now we make a new document Kephra::Document::Data::create_slot($new_doc_nr); Kephra::App::TabBar::add_edit_tab($new_doc_nr); Kephra::App::EditPanel::apply_settings_here ( Kephra::Document::Data::_ep($new_doc_nr) ); Kephra::Document::Data::inc_value('buffer'); return $new_doc_nr; } sub _load_file_in_buffer { my $file = shift; my $doc_nr = shift || Kephra::Document::Data::current_nr(); my $ep = Kephra::Document::Data::_ep($doc_nr); return unless -r $file and Kephra::App::EditPanel::is( $ep ); $ep->ClearAll(); # retrieve if utf is set Kephra::Document::Data::set_file_path($file, $doc_nr); if (Kephra::File::IO::open_buffer($doc_nr) ){ Kephra::File::_remember_save_moment($doc_nr); $ep->EmptyUndoBuffer; $ep->SetSavePoint; Kephra::Document::Data::inc_value('loaded'); } } # sub new { # make document empty and reset all document properties to default my $old_nr = Kephra::Document::Data::current_nr(); my $doc_nr = _new_if_allowed('new'); Kephra::Document::Data::set_previous_nr( $old_nr ); Kephra::Document::Data::set_current_nr( $doc_nr ); Kephra::App::TabBar::raise_tab_by_doc_nr($doc_nr); &reset($doc_nr); Kephra::EventTable::trigger('document.new'); } sub reset { # restore once opened file from its settings my $doc_nr = Kephra::Document::Data::validate_doc_nr(shift); $doc_nr = Kephra::Document::Data::current_nr() unless defined $doc_nr; my $ep = Kephra::Document::Data::_ep( $doc_nr ); Kephra::Document::Property::set_readonly(0, $doc_nr); $ep->ClearAll; $ep->EmptyUndoBuffer; $ep->SetSavePoint; Kephra::Document::Data::set_attributes_to_default($doc_nr, ''); Kephra::Document::Data::evaluate_attributes($doc_nr); Kephra::App::Window::refresh_title(); Kephra::App::TabBar::refresh_label($doc_nr); Kephra::App::StatusBar::refresh_all_cells(); Kephra::Edit::Marker::delete_doc($doc_nr); Kephra::App::EditPanel::Margin::autosize_line_number($ep, $doc_nr); } sub restore { # add newly opened file from known settings my %file_settings = %{ shift; }; my $file = $file_settings{file_path}; my $config = _file_config(); if ( -e $file ) { # open only text files and empty files return if $config->{open}{only_text} == 1 and -B $file; # check if file is already open and goto this already opened return if $config->{open}{each_once} == 1 and Kephra::Document::Data::file_already_open($file); my $doc_nr = _new_if_allowed('restore'); $file_settings{ep_ref} = Kephra::Document::Data::_ep($doc_nr); Kephra::Document::Data::set_all_attributes(\%file_settings, $doc_nr); _load_file_in_buffer($file, $doc_nr); Kephra::Document::Data::set_current_nr($doc_nr); Kephra::Document::Data::set_file_path($file, $doc_nr); Kephra::Document::Data::evaluate_attributes($doc_nr); Kephra::App::TabBar::raise_tab_by_doc_nr($doc_nr); return $doc_nr; } return -1; } sub add { # create a new document if settings allow it my $file = shift; my $config = _file_config(); my $old_nr = Kephra::Document::Data::current_nr(); if ( defined $file and -e $file ) { $file = Kephra::Config::standartize_path_slashes( $file ); # open only text files and empty files # return if -B $file and $config->{open}{only_text} == 1; # check if file is already open and goto this already opened my $other_nr = Kephra::Document::Data::nr_from_file_path($file); return Kephra::Document::Change::to_nr( $other_nr ) if $config->{open}{each_once} == 1 and $other_nr > -1; # save constantly changing settings Kephra::Document::Data::update_attributes(); # create new edit panel my $doc_nr = _new_if_allowed('add') || 0; # return because settings didn't allow new doc return if $doc_nr > 0 and $doc_nr == $old_nr; Kephra::Document::Data::set_current_nr($doc_nr); Kephra::Document::Data::set_previous_nr($old_nr); # load default settings for doc attributes Kephra::Document::Data::set_attributes_to_default($doc_nr, $file); _load_file_in_buffer($file, $doc_nr); Kephra::Document::Property::convert_EOL(), Kephra::File::_save_nr($doc_nr) unless Kephra::Document::Data::get_attribute{'EOL',$doc_nr} eq 'auto'; Kephra::Document::Data::evaluate_attributes($doc_nr); Kephra::App::Window::refresh_title(); Kephra::App::TabBar::raise_tab_by_doc_nr($doc_nr); Kephra::App::EditPanel::Margin::autosize_line_number(); Kephra::EventTable::trigger('document.new'); Kephra::EventTable::trigger('document.list'); } } # document wide coverter sub convert_indent2tabs { _edit( \&Kephra::Edit::Convert::indent2tabs )} sub convert_indent2spaces { _edit( \&Kephra::Edit::Convert::indent2spaces)} sub convert_spaces2tabs { _edit( \&Kephra::Edit::Convert::spaces2tabs )} sub convert_tabs2spaces { _edit( \&Kephra::Edit::Convert::tabs2spaces )} sub del_trailing_spaces { _edit( \&Kephra::Edit::Format::del_trailing_spaces)} sub save_state { } sub restore_styte { } # sub _edit { my $coderef = shift; return unless ref $coderef eq 'CODE'; Kephra::Edit::_save_positions(); Kephra::Edit::Select::all(); &$coderef(); Kephra::Edit::_restore_positions(); 1; } sub do_with_all { my $code = shift; return unless ref $code eq 'CODE'; my $nr = Kephra::Document::Data::current_nr(); my $attr = Kephra::Document::Data::_attributes(); Kephra::Document::Data::update_attributes(); for ( @{ Kephra::Document::Data::all_nr() } ) { Kephra::Document::Data::set_current_nr($_); &$code( $attr->[$_] ); } Kephra::Document::Data::set_current_nr($nr); Kephra::Document::Data::evaluate_attributes($nr); } 1; =head1 NAME Kephra::Document - general doc functions =head1 DESCRIPTION =cutkephra-0.4.3.34+dfsg.orig/lib/Kephra/API.pm0000644000175000017500000000120511573643454017326 0ustar gregoagregoapackage Kephra::API; our $VERSION = '0.02'; use strict; use warnings; # passive part, just getter sub settings { Kephra::Config::Global::settings() } sub localisation { Kephra::Config::Localisation::strings() } sub commands { Kephra::CommandList::data() } sub events { Kephra::EventTable::_table() } sub menu { Kephra::Menu::_all() } sub toolbar { Kephra::ToolBar::_all() } # active part sub run_cmd { my @cmd; push @cmd, split /\s*,\s*/, $_ for @_; Kephra::CommandList::run_cmd_by_id($_) for @cmd; } 1; =head1 NAME Kephra::API - Interface between Modules and Plugins =head1 DESCRIPTION =cut kephra-0.4.3.34+dfsg.orig/lib/Kephra/Edit.pm0000644000175000017500000003156511573643454017616 0ustar gregoagregoapackage Kephra::Edit; our $VERSION = '0.42'; use strict; use warnings; # # internal helper function # sub _ep_ref { Kephra::App::EditPanel::_ref() } sub _keep_focus{ Wx::Window::SetFocus( _ep_ref() ) } sub _let_caret_visible { my $ep = _ep_ref(); my ($selstart, $selend) = $ep->GetSelection; my $los = $ep->LinesOnScreen; if ( $selstart == $selend ) { $ep->ScrollToLine($ep->GetCurrentLine - ( $los / 2 )) unless $ep->GetLineVisible( $ep->GetCurrentLine() ); } else { my $startline = $ep->LineFromPosition($selstart); my $endline = $ep->LineFromPosition($selend); $ep->ScrollToLine( $startline - (($los - $endline - $startline) / 2) ) unless $ep->GetLineVisible($startline) and $ep->GetLineVisible($endline); } $ep->EnsureCaretVisible; } sub _center_caret { my $ep = _ep_ref(); my $line = $ep->GetCurrentLine(); $ep->ScrollToLine( $line - ( $ep->LinesOnScreen / 2 )); $ep->EnsureVisible($line); $ep->EnsureCaretVisible(); } my @pos_stack; sub _save_positions { my $ep = _ep_ref(); my %pos; $pos{document} = Kephra::Document::Data::current_nr(); $pos{pos} = $ep->GetCurrentPos; $pos{line} = $ep->GetCurrentLine; $pos{col} = $ep->GetColumn( $pos{pos} ); $pos{sel_begin} = $ep->GetSelectionStart; $pos{sel_end} = $ep->GetSelectionEnd; push @pos_stack, \%pos; } sub _restore_positions { my $ep = _ep_ref(); my %pos = %{ pop @pos_stack }; if (%pos) { Kephra::Document::Change::to_number( $pos{document} ) if $pos{document} != Kephra::Document::Data::current_nr(); $ep->SetCurrentPos( $pos{pos} ); $ep->GotoLine( $pos{line} ) if $ep->GetCurrentLine != $pos{line}; if ( $ep->GetColumn( $ep->GetCurrentPos ) == $pos{col} ) { $ep->SetSelection( $pos{sel_begin}, $pos{sel_end} ); } else { my $npos = $ep->PositionFromLine( $pos{line} ) + $pos{col}; my $max = $ep->GetLineEndPosition( $pos{line} ); $npos = $max if $npos > $max; $ep->SetCurrentPos($npos); $ep->SetSelection( $npos, $npos ); } } &_let_caret_visible; } sub _select_all_if_none { my $ep = _ep_ref(); my ($start, $end) = $ep->GetSelection; if ( $start == $end ) { $ep->SelectAll; ($start, $end) = $ep->GetSelection; } return $ep->GetTextRange( $start, $end ); } sub _selection_left_to_right { my $ep = shift || _ep_ref(); my ($start, $end) = $ep->GetSelection; my $pos = $ep->GetCurrentPos; return -1 if $start == $end; return $start == $pos ? 0 : 1; } sub _nearest_grid_pos { # position in document from given line and column my $line = shift; my $col = shift; my $ep = shift || _ep_ref(); return unless defined $col; # first staight foreward attempt my $lpos = $ep->PositionFromLine($line); my $pos = $lpos + $col; return $pos if $ep->GetColumn($pos) == $col and $ep->LineFromPosition($pos) == $line; # if line too short take last pos of line my $endpos = $ep->GetLineEndPosition($line); return $endpos if $ep->GetColumn($endpos) < $col; # if tabs used calculate my $ipos = $ep->GetLineIndentation($line); my $icol = $ep->GetColumn($ipos); return $ipos + $col - $icol if $icol <= $col; # if between indenting tabs take neares my $tabsize = $ep->GetTabWidth(); my $tabs = $col / $tabsize; return ($col % $tabsize < $tabsize / 2) ? $lpos + $tabs : $lpos + $tabs + 1; } sub can_paste { _ep_ref()->CanPaste } sub can_copy { Kephra::Document::Data::attr('text_selected') } # # simple textedit # sub cut { _ep_ref()->Cut } sub copy { my $ep = _ep_ref(); $ep->Copy; $ep->SelectionIsRectangle() ? Kephra::Document::Data::set_value('copied_rect_selection',get_clipboard_text()) : Kephra::Document::Data::set_value('copied_rect_selection',''); } sub paste { my $lch = Kephra::Document::Data::get_value('copied_rect_selection'); my $cb = get_clipboard_text(); (defined $lch and $lch eq $cb) ? paste_rectangular($cb) : _ep_ref()->Paste; } sub paste_rectangular { my $text = shift || get_clipboard_text(); my $ep = shift || _ep_ref(); my $dragpos = shift; my $droppos = shift; # all additional parameters have to be provided or no one return -1 if defined $dragpos and not defined $droppos; my @lines = split( /[\r\n]+/, $text); $droppos = $ep->GetCurrentPos unless defined $dragpos; my $linenr = $ep->LineFromPosition( $droppos ); my $colnr = $ep->GetColumn($droppos ); if (defined $dragpos){ # calculate real drop position if dragged foreward # because selection is cut out before inserted and this changed droppos if ($dragpos <= $droppos){ my $selwidth = length $lines[0]; my $dnddelta = $linenr - $ep->LineFromPosition( $dragpos ); my $max = scalar @lines; #$dnddelta = $max < $dnddelta ? $max : $dnddelta; #$dnddelta *= $selwidth; #$droppos -= $dnddelta; #print "$dragpos ---$droppos\n"; } } $ep->BeginUndoAction; $ep->ReplaceSelection(''),$ep->SetCurrentPos($droppos) if defined $dragpos; my $insertpos; for my $line (@lines){ $insertpos = $ep->PositionFromLine($linenr) + $colnr; $insertpos += $colnr - $ep->GetColumn( $insertpos ) ; $insertpos = $ep->GetLineEndPosition($linenr) if $ep->LineFromPosition( $insertpos ) > $linenr; $ep->InsertText( $insertpos, $line); $linenr++; } $ep->EndUndoAction; } sub replace { my $ep = _ep_ref(); my $text = get_clipboard_text(); copy(); _ep_ref()->ReplaceSelection($text); } sub clear { _ep_ref()->Clear } sub get_clipboard_text { my $cboard = &Wx::wxTheClipboard; my $text; $cboard->Open; if ( $cboard->IsSupported( &Wx::wxDF_TEXT ) ) { my $data = Wx::TextDataObject->new; my $ok = $cboard->GetData( $data ); if ( $ok ) { $text = $data->GetText; } else { # todo: error handling } } $cboard->Close; return defined $text ? $text : -1; } sub del_back_tab{ my $ep = _ep_ref(); my $pos = $ep->GetCurrentPos(); my $tab_size = Kephra::Document::Data::attr('tab_size'); my $deltaspace = $ep->GetColumn($pos--) % $tab_size; $deltaspace = $tab_size unless $deltaspace; do { $ep->CmdKeyExecute(&Wx::wxSTC_CMD_DELETEBACK) } while $ep->GetCharAt(--$pos) == 32 and --$deltaspace; } # # Edit Selection # sub get_selection { _ep_ref()->GetSelectedText() } sub move_target { my $linedelta = shift; return unless defined $linedelta; my $ep = shift || _ep_ref(); my $targetstart = $ep->GetTargetStart(); my $targettext = $ep->GetTextRange($targetstart, $ep->GetTargetEnd()); $ep->BeginUndoAction; $ep->ReplaceTarget(''); $ep->InsertText($targetstart+$linedelta, $targettext); $ep->EndUndoAction; } sub move_selection { my $linedelta = shift; return unless defined $linedelta; my $ep = shift || _ep_ref(); my ($selbegin, $selend) = $ep->GetSelection(); my $targettext = $ep->GetSelectedText(); $ep->BeginUndoAction; $ep->ReplaceSelection(''); my $pos = $ep->GetCurrentPos; $pos += $linedelta; $ep->InsertText($pos, $targettext); $ep->SetSelection($pos, $pos + $selend - $selbegin); $ep->EndUndoAction; } sub move_lines { my $linedelta = shift; return unless defined $linedelta; my $ep = shift || _ep_ref(); my ( $selbegin, $selend) = $ep->GetSelection(); my $sellength = $selend - $selbegin; my $selstartline = $ep->LineFromPosition($selbegin); my $targetstart = $ep->GetTargetStart(); my $targetend = $ep->GetTargetEnd(); my $blockbegin = $ep->PositionFromLine($selstartline); my $blockend = $ep->PositionFromLine( $ep->LineFromPosition($selend)+1 ); my $selcolumn = $selbegin - $blockbegin; # endmode is taken when last line on start or end of operation has no EOL # then i take the the EOL char from the line before instead and have to # insert in a pos before to keep consistent my $endmode; if ($blockend == $ep->GetLength() or $ep->LineFromPosition($selend) + $linedelta >= $ep->GetLineCount()-1 ) { $blockbegin = $ep->GetLineEndPosition($selstartline-1); $blockend = $ep->GetLineEndPosition( $ep->LineFromPosition($selend) ); $endmode = 1; } $selstartline += $linedelta; my $blocktext = $ep->GetTextRange($blockbegin, $blockend); $ep->BeginUndoAction; $ep->SetTargetStart( $blockbegin ); $ep->SetTargetEnd( $blockend ); $ep->ReplaceTarget(''); $selstartline = 0 if $selstartline < 0; $selstartline = $ep->GetLineCount() if $selstartline > $ep->GetLineCount(); my $target = $endmode ? $ep->GetLineEndPosition($selstartline-1) : $ep->PositionFromLine($selstartline); $ep->InsertText($target, $blocktext); $selbegin = $ep->PositionFromLine($selstartline) + $selcolumn; $ep->SetSelection($selbegin, $selbegin + $sellength); $ep->SetTargetStart($targetstart ); $ep->SetTargetEnd( $targetend ); $ep->EndUndoAction; } sub selection_move_left { my $ep = shift || _ep_ref(); my ($selbegin, $selend) = $ep->GetSelection(); if ( $selbegin == $selend or $ep->LineFromPosition( $selbegin ) != $ep->LineFromPosition( $selend ) ) { Kephra::Edit::Format::dedent_tab(); } else { my $newpos = $ep->WordStartPosition($selbegin, 1); my $move_delta = $newpos == $selbegin ? -1 : $newpos - $selbegin; move_selection( $move_delta ); } } sub selection_move_right{ my $ep = _ep_ref(); my ($selbegin, $selend) = $ep->GetSelection(); my $endline = $ep->LineFromPosition( $selend ); if ( $selbegin == $selend or $ep->LineFromPosition( $selbegin ) != $endline ) { Kephra::Edit::Format::indent_tab(); } else { my $newpos = $ep->WordEndPosition($selend, 1); my $move_delta = $newpos == $selend ? 1 : $newpos - $selend; move_selection( $move_delta ) unless $endline == $ep->GetLineCount() - 1 and $ep->GetLineEndPosition($endline) == $selend; } } sub selection_move_up { my $ep = shift || _ep_ref(); my ($selbegin, $selend) = $ep->GetSelection(); my $firstline = $ep->LineFromPosition( $selbegin ); my $lastline = $ep->LineFromPosition( $selend ); if ( $selbegin != $selend and $firstline == $lastline) { my $line = $firstline; my $col = $ep->GetColumn( $selbegin ); return unless $line; $line--; move_selection( _nearest_grid_pos($line, $col) - $selbegin ); } else { move_lines( -1, $ep ) } } sub selection_move_down { my $ep = shift || _ep_ref(); my ($selbegin, $selend) = $ep->GetSelection(); my $firstline = $ep->LineFromPosition( $selbegin ); my $lastline = $ep->LineFromPosition( $selend ); if ($selbegin != $selend and $firstline == $lastline) { my $line = $firstline; my $col = $ep->GetColumn( $selbegin ); return if $line+1 == $ep->GetLineCount(); $line++; move_selection( _nearest_grid_pos($line, $col) - $selend ); } else { move_lines( 1, $ep ) } } sub selection_move_page_up { my $ep = shift || _ep_ref(); my ($selbegin, $selend) = $ep->GetSelection(); my $firstline = $ep->LineFromPosition( $selbegin ); my $lastline = $ep->LineFromPosition( $selend ); my $linedelta = $ep->LinesOnScreen; if ($selbegin != $selend and $firstline == $lastline) { my $line = $firstline; my $col = $ep->GetColumn( $selbegin ); return unless $line; $line -= $linedelta; $line = 0 if $line < 0; move_selection( _nearest_grid_pos($line, $col) - $selbegin ); } else { move_lines( -$linedelta, $ep ) } } sub selection_move_page_down { my $ep = shift || _ep_ref(); my ($selbegin, $selend) = $ep->GetSelection(); my $firstline = $ep->LineFromPosition( $selbegin ); my $lastline = $ep->LineFromPosition( $selend ); my $linedelta = $ep->LinesOnScreen; if ($selbegin != $selend and $firstline == $lastline) { my $line = $firstline; my $col = $ep->GetColumn( $selbegin ); return if $line+1 == $ep->GetLineCount(); $line += $linedelta; $line = $ep->GetLineCount()-1 if $line >= $ep->GetLineCount(); move_selection( _nearest_grid_pos($line, $col) - $selend ); } else { move_lines( $linedelta, $ep ) } } # sub insert { my ($text, $pos) = @_; return unless $text; my $ep = _ep_ref(); $pos = $ep->GetCurrentPos unless defined $pos; $ep->InsertText($pos, $text); $pos += length $text; $ep->SetSelection($pos, $pos); } sub insert_text { insert(@_) } sub insert_at_pos { insert(@_) } # # Edit Line # sub cut_current_line { _ep_ref()->CmdKeyExecute(&Wx::wxSTC_CMD_LINECUT) } sub copy_current_line{ _ep_ref()->CmdKeyExecute(&Wx::wxSTC_CMD_LINECOPY)} sub double_current_line { my $ep = _ep_ref(); my $pos = $ep->GetCurrentPos; $ep->BeginUndoAction; $ep->CmdKeyExecute(&Wx::wxSTC_CMD_LINECOPY); $ep->CmdKeyExecute(&Wx::wxSTC_CMD_PASTE); $ep->GotoPos($pos); $ep->EndUndoAction; } sub replace_current_line { my $ep = _ep_ref(); my $line = $ep->GetCurrentLine; $ep->BeginUndoAction; $ep->GotoLine($line); $ep->Paste; $ep->SetSelection( $ep->GetSelectionEnd, $ep->GetLineEndPosition( $ep->GetCurrentLine ) ); $ep->Cut; $ep->GotoLine($line); $ep->EndUndoAction; } sub del_current_line{_ep_ref()->CmdKeyExecute(&Wx::wxSTC_CMD_LINEDELETE)} sub del_line_left {_ep_ref()->DelLineLeft() } sub del_line_right {_ep_ref()->DelLineRight()} sub eval_newline_sub{} 1; __END__ =head1 NAME Kephra::Edit - basic edit menu calls and internals for editing =head1 DESCRIPTION =cutkephra-0.4.3.34+dfsg.orig/lib/Kephra/Menu.pm0000644000175000017500000002554211573643454017633 0ustar gregoagregoapackage Kephra::Menu; our $VERSION = '0.18'; use strict; use warnings; my %menu; sub _all { \%menu } sub _ref { if ( is($_[1]) ) { $menu{$_[0]}{ref} = $_[1] } elsif ( exists $menu{$_[0]}{ref} ) { $menu{$_[0]}{ref} } } sub _data { $menu{$_[0]} if stored($_[0]) } sub is { 1 if ref $_[0] eq 'Wx::Menu' } sub stored { 1 if ref $menu{$_[0]} eq 'HASH'} sub set_absolete { $menu{$_[0]}{absolete} = 1 } sub not_absolete { $menu{$_[0]}{absolete} = 0 } sub is_absolete { $menu{$_[0]}{absolete} } sub set_update { $menu{$_[0]}{update} = $_[1] if ref $_[1] eq 'CODE' } sub get_update { $menu{$_[0]}{update} } sub no_update { delete $menu{$_[0]}{update} if stored($_[0]) } sub add_onopen_check { return until ref $_[2] eq 'CODE'; $menu{ $_[0] }{onopen}{ $_[1] } = $_[2]; } sub del_onopen_check { return until $_[1]; delete $menu{$_[0]}{onopen}{$_[1]} if exists $menu{$_[0]}{onopen}{$_[1]}; } sub ready { # make menu ready for display my $id = shift; if ( stored($id) ){ my $menu = _data($id); if ($menu->{absolete} and $menu->{update}) { $menu->{absolete} = 0 if $menu->{update}() } if (ref $menu->{onopen} eq 'HASH') { $_->() for values %{$menu->{onopen}} } _ref($id); } } sub create_dynamic { # create on runtime changeable menus my ( $menu_id, $menu_name ) = @_ ; if ($menu_name eq '&insert_templates') { set_absolete($menu_id); set_update($menu_id, sub { my $cfg = Kephra::API::settings()->{file}{templates}; my $file = Kephra::Config::filepath($cfg->{directory}, $cfg->{file}); my $tmp = Kephra::Config::File::load( $file ); my @menu_data; if (exists $tmp->{template}){ $tmp = Kephra::Config::Tree::_convert_node_2_AoH(\$tmp->{template}); my $untitled = Kephra::Config::Localisation::strings()->{app}{general}{untitled}; my $filepath = Kephra::Document::Data::get_file_path() || "<$untitled>"; my $filename = Kephra::Document::Data::file_name() || "<$untitled>"; my $firstname = Kephra::Document::Data::first_name() || "<$untitled>"; for my $template ( @{$tmp} ) { my %item; $item{type} = 'item'; $item{label}= $template->{name}; $item{call} = sub { my $content = $template->{content}; $content =~ s/\[\$\$firstname\]/$firstname/g; $content =~ s/\[\$\$filename\]/$filename/g; $content =~ s/\[\$\$filepath\]/$filepath/g; Kephra::Edit::insert_text($content); }; $item{help} = $template->{description}; push @menu_data, \%item; eval_data($menu_id, \@menu_data); } return 1; } }); } elsif ($menu_name eq '&file_history'){ set_absolete($menu_id); set_update($menu_id, sub { my @menu_data = @{assemble_data_from_def ( ['item file-session-history-open-all', undef] )}; my $history = Kephra::File::History::get(); if (ref $history eq 'ARRAY') { my $nr = 0; for ( @$history ) { my $file = $_->{file_path}; push @menu_data, { type => 'item', label => ( File::Spec->splitpath( $file ) )[2], help => $file, call => eval 'sub {Kephra::File::History::open( '.$nr++.' )}', }; } } eval_data($menu_id, \@menu_data); return Kephra::File::History::had_init() ? 1 : 0; 1; # it was successful }); Kephra::EventTable::add_call ( 'document.list', 'menu_'.$menu_id, sub { set_absolete( $menu_id ) if Kephra::File::History::update(); } ); } elsif ($menu_name eq '&document_change') { set_update( $menu_id, sub { return unless exists $Kephra::temp{document}{buffer}; my $filenames = Kephra::Document::Data::all_file_names(); my $pathes = Kephra::Document::Data::all_file_pathes(); my $untitled = Kephra::Config::Localisation::strings()->{app}{general}{untitled}; my $space = ' '; my @menu_data; for my $nr (0 .. @$filenames-1){ my $item = \%{$menu_data[$nr]}; $space = '' if $nr == 9; $item->{type} = 'radioitem'; $item->{label} = $filenames->[$nr] ? $space.($nr+1)." - $filenames->[$nr] \t - $pathes->[$nr]" : $space.($nr+1)." - <$untitled> \t -"; $item->{call} = eval 'sub {Kephra::Document::Change::to_nr('.$nr.')}'; } }); #add_onopen_check( $menu_id, 'select', sub { # my $menu = _ref($menu_id); # $menu->FindItemByPosition # ( Kephra::Document::Data::current_nr() )->Check(1) if $menu; #}); #Kephra::EventTable::add_call ( # 'document.list', 'menu_'.$menu_id, sub { set_absolete($menu_id) } #); } } sub create_static { # create solid, not on runtime changeable menus my ($menu_id, $menu_def) = @_; return unless ref $menu_def eq 'ARRAY'; not_absolete($menu_id); eval_data($menu_id, assemble_data_from_def($menu_def)); } sub create_menubar { #my $menubar = Wx::MenuBar->new(); #my $m18n = Kephra::Config::Localisation::strings()->{app}{menu}; #my ($pos, $menu_name); #for my $menu_def ( @$menubar_def ){ #for my $menu_id (keys %$menu_def){ # removing the menu command if there is one #$pos = index $menu_id, ' '; #if ($pos > -1){ #if ('menu' eq substr $menu_id, 0, $pos ){ #$menu_name = substr ($menu_id, $pos+1); # ignoring menu structure when command other that menu or blank #} else { next } #} else { #$menu_name = $menu_id; #} #$menubar->Append( #Kephra::Menu::create_static( $menu_name, $menu_def->{$menu_id}), #$m18n->{label}{$menu_name} #); #} #} } # create menu data structures (MDS) from menu skeleton definitions (command list) sub assemble_data_from_def { my $menu_def = shift; return unless ref $menu_def eq 'ARRAY'; my $menu_l18n = Kephra::Config::Localisation::strings()->{app}{menu}; my ($cmd_name, $cmd_data, $type_name, $pos, $sub_id); my @mds = (); # menu data structure for my $item_def (@$menu_def){ my %item; # creating separator if (not defined $item_def){ $item{type} = '' # sorting commented lines out } elsif (substr($item_def, -1) eq '#'){ next; # creating separator } elsif ($item_def eq '' or $item_def eq 'separator') { $item{type} = '' # eval a sublist } elsif (ref $item_def eq 'HASH'){ $sub_id = $_ for keys %$item_def; $pos = index $sub_id, ' '; # make submenu if keyname is without command if ($pos == -1){ $item{type} = 'menu'; $item{id} = $sub_id; $item{label} = $menu_l18n->{label}{$sub_id}; $item{help} = $menu_l18n->{help}{$sub_id} || ''; $item{data} = assemble_data_from_def($item_def->{$sub_id}); } else { my @id_parts = split / /, $sub_id; $item{type} = $id_parts[0]; # make submenu when finding the menu command if ($item{type} eq 'menu'){ $item{id} = $id_parts[1]; $item{label}= $menu_l18n->{label}{$id_parts[1]}; $item{help} = $menu_l18n->{help}{$id_parts[1]} || ''; $item{data} = assemble_data_from_def($item_def->{$sub_id}); $item{icon} = $id_parts[2] if $id_parts[2]; } } # menu items } else { $pos = index $item_def, ' '; next if $pos == -1; $item{type} = substr $item_def, 0, $pos; $cmd_name = substr $item_def, $pos+1; if ($item{type} eq 'menu'){ $item{id} = $cmd_name; $item{label} = $menu_l18n->{label}{$cmd_name}; } else { $cmd_data = Kephra::CommandList::get_cmd_properties( $cmd_name ); # skipping when command call is missing next unless ref $cmd_data and exists $cmd_data->{call}; for ('call','enable','state','label','help','icon'){ $item{$_} = $cmd_data->{$_} if $cmd_data->{$_}; } $item{label} .= "\t " . $cmd_data->{key} . "`" if $cmd_data->{key}; } } push @mds, \%item; } return \@mds; } sub eval_data { # eval menu data structures (MDS) to wxMenus my $menu_id = shift; return unless defined $menu_id; #emty the old or create new menu under the given ID my $menu = _ref($menu_id); if (defined $menu and $menu) { $menu->Delete( $_ ) for $menu->GetMenuItems } else { $menu = Wx::Menu->new() } my $menu_data = shift; unless (ref $menu_data eq 'ARRAY') { _ref($menu_id, $menu); return $menu; } my $win = Kephra::App::Window::_ref(); my $kind; my $item_id = defined $menu{$menu_id}{item_id} ? $menu{$menu_id}{item_id} : $Kephra::app{GUI}{masterID}++ * 100; $menu{$menu_id}{item_id} = $item_id; for my $item_data (@$menu_data){ if (not $item_data->{type} or $item_data->{type} eq 'separator'){ $menu->AppendSeparator; } elsif ($item_data->{type} eq 'menu'){ my $submenu = ref $item_data->{data} eq 'ARRAY' ? eval_data( $item_data->{id}, $item_data->{data} ) : ready( $item_data->{id} ); $item_data->{help} = '' unless defined $item_data->{help}; my @params = ( $menu, $item_id++, $item_data->{label},$item_data->{help}, &Wx::wxITEM_NORMAL ); push @params, $submenu if is ($submenu); my $menu_item = Wx::MenuItem->new( @params ); if (defined $item_data->{icon}) { my $bmp = Kephra::CommandList::get_cmd_property ( $item_data->{icon}, 'icon' ); $menu_item->SetBitmap( $bmp ) if ref $bmp eq 'Wx::Bitmap' and not Wx::wxMAC(); } #Wx::Event::EVT_MENU_HIGHLIGHT($win, $item_id-1, sub { # Kephra::App::StatusBar::info_msg( $item_data->{help} ) #}); $menu->Append($menu_item); } else { # create normal items if ($item_data->{type} eq 'checkitem'){$kind = &Wx::wxITEM_CHECK} elsif ($item_data->{type} eq 'radioitem'){$kind = &Wx::wxITEM_RADIO} elsif ($item_data->{type} eq 'item') {$kind = &Wx::wxITEM_NORMAL} else { next; } my $menu_item = Wx::MenuItem->new ($menu, $item_id, $item_data->{label}||'', '', $kind); if ($item_data->{type} eq 'item') { if (ref $item_data->{icon} eq 'Wx::Bitmap') { $menu_item->SetBitmap( $item_data->{icon} ) unless Wx::wxMAC(); } else { # insert fake empty icons # $menu_item->SetBitmap($Kephra::temp{icon}{empty}) } } add_onopen_check( $menu_id, 'enable_'.$item_id, sub { $menu_item->Enable( $item_data->{enable}() ); } ) if ref $item_data->{enable} eq 'CODE'; add_onopen_check( $menu_id, 'check_'.$item_id, sub { $menu_item->Check( $item_data->{state}() ) } ) if ref $item_data->{state} eq 'CODE'; Wx::Event::EVT_MENU ($win, $menu_item, $item_data->{call} ); Wx::Event::EVT_MENU_HIGHLIGHT($win, $menu_item, sub { Kephra::App::StatusBar::info_msg( $item_data->{help} ) }) if $item_data->{help} ; $menu->Append( $menu_item ); $item_id++; } 1; # sucess } Kephra::EventTable::add_call('menu.open', 'menu_'.$menu, sub {ready($menu_id)}); _ref($menu_id, $menu); return $menu; } sub destroy { my $menu_ID = shift; my $menu = _ref( $menu_ID ); return unless $menu; $menu->Destroy; Kephra::EventTable::del_own_subscriptions( $menu_ID ); } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Dialog.pm0000644000175000017500000000415111774655572020126 0ustar gregoagregoapackage Kephra::Dialog; our $VERSION = '0.20'; use strict; use warnings; sub _set_icon { my ($d, $cmd_id) = @_; } sub _win { Kephra::App::Window::_ref() } # standard dialogs sub msg_box { Wx::MessageBox( @_[0,1], &Wx::wxOK | &Wx::wxSTAY_ON_TOP, _win() ); } sub info_box { Wx::MessageBox (@_[0,1], &Wx::wxOK | &Wx::wxICON_INFORMATION | &Wx::wxSTAY_ON_TOP, _win()); } sub warning_box { Wx::MessageBox ( @_[0,1], &Wx::wxOK | &Wx::wxICON_WARNING | &Wx::wxSTAY_ON_TOP, _win() ); } sub get_confirm_2 { Wx::MessageBox (@_[0,1], &Wx::wxYES_NO | &Wx::wxICON_QUESTION | &Wx::wxSTAY_ON_TOP, _win()); } sub get_confirm_3 { Wx::MessageBox ( @_[0,1], &Wx::wxYES_NO | &Wx::wxCANCEL | &Wx::wxICON_QUESTION, _win() ); } sub get_file_open { Wx::FileSelector( @_[0,1], '', '', $_[2], &Wx::wxFD_OPEN, _win()); } sub get_files_open { my $dialog = Wx::FileDialog->new( _win(), @_[0,1], '', $_[2], &Wx::wxFD_OPEN | &Wx::wxFD_MULTIPLE, [-1,-1] ); if ($dialog->ShowModal != &Wx::wxID_CANCEL) { my @files = $dialog->GetPaths; return \@files; } } sub get_file_save { Wx::FileSelector( @_[0,1], '', '', $_[2], &Wx::wxFD_SAVE, _win()) } sub get_dir { Wx::DirSelector ( @_[0,1] ,0, [-1,-1], _win()) } sub get_font { Wx::GetFontFromUser ( _win(), $_[0]) } sub get_text { Wx::GetTextFromUser ( $_[0], $_[1], "", _win()) } sub get_number{Wx::GetNumberFromUser( $_[0], '', $_[1],$_[2], 0, 100000, _win())} # own dialogs sub find { require Kephra::Dialog::Search; &Kephra::Dialog::Search::find; } sub replace { require Kephra::Dialog::Search; &Kephra::Dialog::Search::replace; } sub choose_color { require Kephra::Dialog::Color; Kephra::Dialog::Color::choose_color(); } sub config { require Kephra::Dialog::Config; &Kephra::Dialog::Config::main; } sub info { require Kephra::Dialog::Info; &Kephra::Dialog::Info::combined; } sub notify_file_changed { require Kephra::Dialog::Notify; &Kephra::Dialog::Notify::file_changed; } sub notify_file_deleted { require Kephra::Dialog::Notify; &Kephra::Dialog::Notify::file_deleted; } sub save_on_exit { require Kephra::Dialog::Exit; &Kephra::Dialog::Exit::save_on_exit; } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/App.pm0000644000175000017500000001562011774655572017452 0ustar gregoagregoapackage Kephra::App; our $VERSION = '0.12'; use strict; use warnings; our @ISA = 'Wx::App'; # $NAME is a wx application my $obj; sub _ref { $obj = ref $_[0] eq __PACKAGE__ ? $_[0] : $obj } # main layout, main frame sub warn { Kephra::Dialog::warning_box(Kephra::App::Window::_ref(), @_, 'Warning') } sub splashscreen { my $img_file = shift; $img_file = Kephra::Config::filepath( $img_file ); Wx::InitAllImageHandlers(); my $sc = Wx::SplashScreen->new( Wx::Bitmap->new( $img_file, &Wx::wxBITMAP_TYPE_ANY ), &Wx::wxSPLASH_CENTRE_ON_SCREEN | &Wx::wxSPLASH_NO_TIMEOUT, 0, undef, -1, &Wx::wxDefaultPosition, &Wx::wxDefaultSize, &Wx::wxSIMPLE_BORDER | &Wx::wxFRAME_NO_TASKBAR | &Wx::wxSTAY_ON_TOP ) if $img_file and -e $img_file; return $sc; } sub assemble_layout { my $win = Kephra::App::Window::_ref(); my $tg = &Wx::wxTOP | &Wx::wxGROW; Kephra::EventTable::freeze ( qw(app.splitter.right.changed app.splitter.bottom.changed) ); $Kephra::app{splitter}{right} = Wx::SplitterWindow->new ($win, -1, [-1,-1], [-1,-1], &Wx::wxSP_PERMIT_UNSPLIT) unless exists $Kephra::app{splitter}{right}; my $right_splitter = $Kephra::app{splitter}{right}; Wx::Event::EVT_SPLITTER_SASH_POS_CHANGED( $right_splitter, $right_splitter, sub { Kephra::EventTable::trigger( 'app.splitter.right.changed' ); } ); Wx::Event::EVT_SPLITTER_DOUBLECLICKED($right_splitter, $right_splitter, sub { Kephra::App::Panel::Notepad::show(0); }); $right_splitter->SetSashGravity(1); $right_splitter->SetMinimumPaneSize(10); $Kephra::app{panel}{main} = Wx::Panel->new($right_splitter) unless exists $Kephra::app{panel}{main}; my $column_panel = $Kephra::app{panel}{main}; $column_panel->Reparent($right_splitter); # setting up output splitter $Kephra::app{splitter}{bottom} = Wx::SplitterWindow->new ($column_panel, -1, [-1,-1], [-1,-1], &Wx::wxSP_PERMIT_UNSPLIT) unless exists $Kephra::app{splitter}{bottom}; my $bottom_splitter = $Kephra::app{splitter}{bottom}; Wx::Event::EVT_SPLITTER_SASH_POS_CHANGED( $bottom_splitter, $bottom_splitter, sub { Kephra::EventTable::trigger( 'app.splitter.bottom.changed' ); } ); Wx::Event::EVT_SPLITTER_DOUBLECLICKED($bottom_splitter, $bottom_splitter, sub { Kephra::App::Panel::Output::show(0); }); $bottom_splitter->SetSashGravity(1); $bottom_splitter->SetMinimumPaneSize(10); $Kephra::app{panel}{center} = Wx::Panel->new($bottom_splitter) unless exists $Kephra::app{panel}{center}; my $center_panel = $Kephra::app{panel}{center}; $center_panel->Reparent($bottom_splitter); my $tab_bar = Kephra::App::TabBar::_ref(); my $search_bar = Kephra::App::SearchBar::_ref(); my $search_pos = Kephra::App::SearchBar::position(); my $notepad_panel = Kephra::App::Panel::Notepad::_ref(); my $output_panel = Kephra::App::Panel::Output::_ref(); $tab_bar->Reparent($center_panel); $search_bar->Reparent($center_panel); $search_bar->Reparent($column_panel) if $search_pos eq 'bottom'; $notepad_panel->Reparent($right_splitter); $output_panel->Reparent($bottom_splitter); my $center_sizer = Wx::BoxSizer->new(&Wx::wxVERTICAL); $center_sizer->Add( $search_bar, 0, $tg, 0) if $search_pos eq 'above'; $center_sizer->Add( $tab_bar, 1, $tg, 0 ); $center_sizer->Add( $search_bar, 0, $tg, 0 ) if $search_pos eq 'below'; $center_panel->SetSizer($center_sizer); $center_panel->SetAutoLayout(1); my $column_sizer = Wx::BoxSizer->new(&Wx::wxVERTICAL); $column_sizer->Add( $bottom_splitter, 1, $tg, 0); $column_sizer->Add( $search_bar, 0, $tg, 0) if $search_pos eq 'bottom'; $column_panel->SetSizer($column_sizer); $column_panel->SetAutoLayout(1); my $win_sizer = Wx::BoxSizer->new(&Wx::wxVERTICAL); $win_sizer->Add( $right_splitter, 1, $tg, 0 ); $win->SetSizer($win_sizer); $win->SetAutoLayout(1); $column_panel->Layout(); $center_panel->Layout(); #$win->SetBackgroundColour($tab_bar->GetBackgroundColour); Kephra::EventTable::thaw ( qw(app.splitter.right.changed app.splitter.bottom.changed) ); Kephra::App::SearchBar::show(); Kephra::App::Panel::Notepad::show(); Kephra::App::Panel::Output::show(); } sub OnInit { use Benchmark (); my $t0 = new Benchmark if $Kephra::BENCHMARK; my $app = shift; _ref($app); #setup_logging(); Wx::InitAllImageHandlers(); # 2'nd splashscreen can close when app is ready, now called from Kephra.pm my $splashscreen = splashscreen('interface/icon/splash/start_kephra.jpg'); my $frame = Kephra::App::Window::create(); Kephra::Document::Data::create_slot(0); Kephra::App::TabBar::create(); my $ep = Kephra::App::TabBar::add_edit_tab(0); Kephra::Document::Data::set_current_nr(0); Kephra::Document::Data::set_previous_nr(0); Kephra::Document::Data::set_value('buffer',1); Kephra::Document::Data::set_value('modified', 0); Kephra::Document::Data::set_value('loaded', 0); #Kephra::Plugin::load_all(); #$main::logger->debug("init app pntr"); print " init app:", Benchmark::timestr( Benchmark::timediff( new Benchmark, $t0 ) ), "\n" if $Kephra::BENCHMARK; my $t1 = new Benchmark; #$main::logger->debug("glob cfg load"); print " glob cfg load:", Benchmark::timestr( Benchmark::timediff( new Benchmark, $t1 ) ), "\n" if $Kephra::BENCHMARK; my $t2 = new Benchmark; if (Kephra::Config::Global::autoload()) { Kephra::App::EditPanel::apply_settings_here($ep); Kephra::EventTable::freeze_all(); print " configs eval:", Benchmark::timestr( Benchmark::timediff( new Benchmark, $t2 ) ), "\n" if $Kephra::BENCHMARK; my $t3 = new Benchmark; Kephra::File::Session::autoload(); Kephra::EventTable::thaw_all(); Kephra::Edit::Search::load_search_data(); Kephra::Document::add($_) for @ARGV; print " file session:", Benchmark::timestr( Benchmark::timediff( new Benchmark, $t3 ) ), "\n" if $Kephra::BENCHMARK; my $t4 = new Benchmark; print " event table:", Benchmark::timestr( Benchmark::timediff( new Benchmark, $t4 ) ), "\n" if $Kephra::BENCHMARK; Kephra::App::EditPanel::gets_focus(); Kephra::Edit::_let_caret_visible(); $frame->Show(1); $splashscreen->Destroy(); print "app startet:", Benchmark::timestr( Benchmark::timediff( new Benchmark, $t0 ) ), "\n" if $Kephra::BENCHMARK; 1; # everything is good } else { $app->ExitMainLoop(1); } } sub exit { Kephra::EventTable::stop_timer(); if (Kephra::Dialog::save_on_exit() eq 'cancel') { Kephra::EventTable::start_timer(); return; } exit_unsaved(); } sub exit_unsaved { my $t0 = new Benchmark; Kephra::EventTable::stop_timer(); Kephra::File::Session::autosave(); Kephra::File::History::save(); Kephra::Config::Global::autosave(); Kephra::Config::set_xp_style(); # Kephra::App::Window::_ref()->Show(0); Kephra::App::Window::destroy(); # close window Wx::wxTheClipboard->Flush; # set copied text free to the global Clipboard print "shut down in:", Benchmark::timestr( Benchmark::timediff( new Benchmark, $t0 ) ), "\n" if $Kephra::BENCHMARK; } sub raw_exit { Wx::Window::Destroy(shift) } #sub new_instance { system("kephra.exe") } # wxNullAcceleratorTable 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/File.pm0000644000175000017500000003237111774655572017613 0ustar gregoagregoapackage Kephra::File; our $VERSION = '0.46'; use strict; use warnings; sub _dialog_l18n { Kephra::Config::Localisation::strings()->{dialog} } sub _config { Kephra::API::settings()->{file} } sub _dir { _config()->{current}{directory} } # # file events sub savepoint_left { my $doc_nr = shift; $doc_nr = Kephra::Document::Data::current_nr() if not defined $doc_nr or ref $doc_nr; Kephra::Document::Data::inc_value('modified') unless Kephra::Document::Data::get_attribute('modified', $doc_nr); Kephra::Document::Data::set_attribute('modified', 1, $doc_nr); Kephra::App::TabBar::refresh_label($doc_nr) if Kephra::App::TabBar::_config()->{info_symbol}; Kephra::EventTable::trigger('document.savepoint'); } sub savepoint_reached { my $doc_nr = shift; $doc_nr = Kephra::Document::Data::current_nr() if not defined $doc_nr or ref $doc_nr; Kephra::Document::Data::dec_value('modified') if Kephra::Document::Data::get_attribute('modified', $doc_nr); Kephra::Document::Data::set_attribute('modified', 0, $doc_nr); Kephra::App::TabBar::refresh_label($doc_nr); Kephra::EventTable::trigger('document.savepoint'); } sub can_save { Kephra::Document::Data::attr('modified') } sub can_save_all { Kephra::Document::Data::get_value('modified') } sub changed_notify_check { my $current_doc = Kephra::Document::Data::current_nr(); for my $file_nr ( @{ Kephra::Document::Data::all_nr() } ) { my $file = Kephra::Document::Data::get_file_path($file_nr); my $last_check = Kephra::Document::Data::get_attribute ('did_notify', $file_nr); next unless $file; if (not -e $file) { next if defined $last_check and $last_check eq 'ignore'; Kephra::Document::Change::to_number( $file_nr ); Kephra::Dialog::notify_file_deleted( $file_nr ); next; } my $last_change = Kephra::Document::Data::get_attribute('file_changed', $file_nr); my $current_age = Kephra::File::IO::get_age($file); if ( $last_change != $current_age) { next if defined $last_check and ( $last_check eq 'ignore' or $last_check >= $current_age); Kephra::Document::Change::to_number( $file_nr ); Kephra::Document::Data::set_attribute ('did_notify', _remember_save_moment($file_nr), $file_nr); Kephra::Dialog::notify_file_changed( $file_nr, $current_age ); } } Kephra::Document::Change::to_number($current_doc) unless $current_doc == Kephra::Document::Data::current_nr(); } sub _remember_save_moment { my ($doc_nr) = shift || Kephra::Document::Data::current_nr(); my $path = shift || Kephra::Document::Data::get_file_path($doc_nr); return unless defined $path and -e $path; my $age = Kephra::File::IO::get_age($path); Kephra::Document::Data::set_attribute('file_changed', $age, $doc_nr); return $age; } sub check_b4_overwite { my $file = shift; $file = Kephra::Document::Data::get_file_path() unless $file; my $allow = _config()->{save}{overwrite}; if ( -e $file ) { my $frame = Kephra::App::Window::_ref(); my $label = Kephra::Config::Localisation::strings()->{dialog}; if ( $allow eq 'ask' ) { my $answer = Kephra::Dialog::get_confirm_2 ( "$label->{general}{overwrite} $file ?", $label->{file}{overwrite}, -1, -1 ); return 1 if $answer == &Wx::wxYES; return 0 if $answer == &Wx::wxNO; } else { Kephra::Dialog::info_box( $label->{general}{dont_allow}, $label->{file}{overwrite} ) unless $allow; return $allow; } } else { return -1 } } # # drag n drop sub add_dropped { # add all currently dnd-held files my ($ep, $event) = @_; -d $_ ? add_dir($_) : Kephra::Document::add($_) for $event->GetFiles; } sub add_dir{ # add all files of an dnd-held dir my $dir = shift; return until -d $dir; opendir (my $DH, $dir); my @dir_items = readdir($DH); closedir($DH); my $path; my $recursive = _config()->{open}{dir_recursive}; foreach (@dir_items) { $path = "$dir/$_"; if (-d $path) { next if not $recursive or $_ eq '.' or $_ eq '..'; add_dir($path); } else { Kephra::Document::add($path) } } } # # file menu calls sub new { Kephra::Document::new() } sub open { # buttons dont freeze while computing Kephra::App::_ref()->Yield(); # file selector dialog my $files = Kephra::Dialog::get_files_open( _dialog_l18n()->{file}{open}, _dir(), $Kephra::temp{file}{filterstring}{all} ); # opening selected files if (ref $files eq 'ARRAY') { Kephra::Document::add($_) for @$files } } sub open_all_of_dir { my $dir = Kephra::Dialog::get_dir( _dialog_l18n()->{file}{open_dir}, _dir() ); add_dir( $dir ); } sub reload { reload_current(@_) } # alias sub reload_current { my $file_path = Kephra::Document::Data::get_file_path(); my $doc_nr = Kephra::Document::Data::current_nr(); if ($file_path and -e $file_path){ my $ep = Kephra::App::EditPanel::_ref(); Kephra::Document::Data::update_attributes($doc_nr); $ep->BeginUndoAction; $ep->SetText(""); Kephra::File::IO::open_buffer( $doc_nr ); $ep->EndUndoAction; $ep->SetSavePoint; _remember_save_moment(); Kephra::Document::Data::evaluate_attributes(); Kephra::App::EditPanel::Margin::autosize_line_number() if (Kephra::App::EditPanel::Margin::_config()->{linenumber}{autosize} and Kephra::App::EditPanel::Margin::_config()->{linenumber}{width} ); Kephra::Document::Data::evaluate_attributes($doc_nr); } else { } } sub reload_all { Kephra::Document::do_with_all( sub { reload_current() } ) } sub insert { my $file = Kephra::Dialog::get_file_open ( _dialog_l18n()->{file}{insert}, _dir(), $Kephra::temp{file}{filterstring}{all} ); Kephra::File::IO::open_buffer( Kephra::Document::Data::current_nr(), $file); } # sub _save_nr { my $nr = shift; $nr = Kephra::Document::Data::current_nr() unless defined $nr; my $ep = Kephra::Document::Data::_ep( $nr ); my $file = Kephra::Document::Data::get_file_path($nr); return until defined $nr and $ep and -e $file; my $save_config = _config()->{save}; return unless $ep->GetModify == 1 or $save_config->{unchanged}; rename $file, $file . '~' if $save_config->{tilde_backup} == 1; Kephra::File::IO::write_buffer( $nr ); $ep->SetSavePoint; _remember_save_moment($nr); } sub save { save_current(@_) } sub save_current { my ($ctrl, $event) = @_; my $ep = Kephra::App::EditPanel::_ref(); my $file = Kephra::Document::Data::get_file_path(); my $save_config = _config()->{save}; if ( $ep->GetModify == 1 or $save_config->{unchanged} ) { if ( $file and -e $file ) { if (not -w $file ) { my $err_msg = _dialog_l18n()->{error}; Kephra::Dialog::warning_box( $err_msg->{write_protected}."\n".$err_msg->{write_protected2}, $err_msg->{file} ); save_as(); } else { _save_nr(); Kephra::Config::Global::eval_config_file($file) if $save_config->{reload_config} == 1 and Kephra::Document::Data::get_attribute('config_file'); } } else { save_as() } } } sub save_as { my $file = Kephra::Dialog::get_file_save( _dialog_l18n()->{file}{save_as}, _dir(), $Kephra::temp{file}{filterstring}{all} ); if ( $file and check_b4_overwite($file) ) { my $ep = Kephra::App::EditPanel::_ref(); my $oldname = Kephra::Document::Data::get_file_path(); Kephra::Document::Data::inc_value('loaded') unless $oldname; Kephra::Document::Data::update_attributes(); Kephra::Document::Data::set_file_path($file); Kephra::File::IO::write_buffer(); $ep->SetSavePoint(); Kephra::Document::SyntaxMode::set('auto'); Kephra::App::Window::refresh_title(); Kephra::App::TabBar::refresh_current_label(); Kephra::App::StatusBar::refresh_all_cells(); _config()->{current}{directory} = Kephra::Document::Data::get_attribute('directory'); _remember_save_moment( ); Kephra::EventTable::trigger('document.list'); } } sub save_copy_as { my $file = Kephra::Dialog::get_file_save( _dialog_l18n()->{file}{save_copy_as}, _dir(), $Kephra::temp{file}{filterstring}{all} ); print "---",$file,"\n"; Kephra::File::IO::write_buffer(Kephra::Document::Data::current_nr(), $file) if $file and check_b4_overwite($file); } sub rename { my $new_path_name = Kephra::Dialog::get_file_save( _dialog_l18n()->{file}{rename}, _dir(), $Kephra::temp{file}{filterstring}{all} ); if ($new_path_name){ my $old_path_name = Kephra::Document::Data::get_file_path(); rename $old_path_name, $new_path_name if $old_path_name; Kephra::Document::Data::set_file_path($new_path_name); Kephra::Document::SyntaxMode::set('auto'); Kephra::App::Window::refresh_title(); Kephra::App::TabBar::refresh_current_label(); _config()->{current}{directory} = Kephra::Document::Data::get_attribute('directory'); Kephra::EventTable::trigger('document.list'); _remember_save_moment(); } } sub save_all { my $unsaved = can_save_all(); return unless $unsaved; # save surrent if its the only if ($unsaved == 1 and can_save() ) { save_current(); } # else { Kephra::Document::do_with_all( sub { save_current() if shift->{modified}; } ); } } sub save_all_named { my $unsaved = can_save_all(); return unless $unsaved; my $need_save_other; my $cdoc_nr = Kephra::Document::Data::current_nr(); for my $doc_nr ( @{ Kephra::Document::Data::all_nr()} ) { my ($name, $mod) = @{Kephra::Document::Data::attributes(['file_name', 'modified'], $doc_nr) }; $need_save_other = 1 if $doc_nr != $cdoc_nr and $name and $mod; } if ($need_save_other) { Kephra::Document::do_with_all( sub { my $file = shift; save_current() if $file->{modified} and $file->{file_name}; } ); } elsif (can_save() and Kephra::Document::Data::get_file_path()) { save_current(); } } sub print { require Wx::Print; my ( $frame, $event ) = @_; my $ep = Kephra::App::EditPanel::_ref(); my $printer = Wx::Printer->new; my $printout = Wx::Printout->new( "$Kephra::NAME $Kephra::VERSION : " . Kephra::Document::Data::file_name() ); #$ep->FormatRange(doDraw,startPos,endPos,draw,target,renderRect,pageRect); #$printer->Print( $frame, $printout, 1 ); $printout->Destroy; } sub close { close_current() } sub close_current { close_nr( Kephra::Document::Data::current_nr() ) } sub close_nr { my $doc_nr = shift; my $ep = Kephra::Document::Data::_ep($doc_nr); my $config = _config()->{save}; my $save_answer= &Wx::wxNO; # save text if options demand it if ($ep->GetModify == 1 or $config->{unchanged} eq 1) { if ($ep->GetTextLength > 0 or $config->{empty} eq 1) { if ($config->{b4_close} eq 'ask' or $config->{b4_close} eq '2'){ my $l10n = _dialog_l18n()->{file}; $save_answer = Kephra::Dialog::get_confirm_3 ($l10n->{save_current}, $l10n->{close_unsaved} ); } return if $save_answer == &Wx::wxCANCEL; if ($save_answer == &Wx::wxYES or $config->{b4_close} eq '1') { _save_nr($doc_nr) } else{ savepoint_reached($doc_nr) if $ep->GetModify } } } # proceed close_nr_unsaved($doc_nr); } sub close_other { my $doc_nr = Kephra::Document::Data::current_nr(); Kephra::Document::Change::to_number(0); $_ != $doc_nr ? close_current() : Kephra::Document::Change::to_number(1) for @{ Kephra::Document::Data::all_nr() }; } sub close_all { close_current($_) for @{ Kephra::Document::Data::all_nr() } } sub close_unsaved { close_current_unsaved() } sub close_current_unsaved { close_nr_unsaved( Kephra::Document::Data::current_nr()) } sub close_nr_unsaved { my $doc_nr = shift; my $current = Kephra::Document::Data::current_nr(); my $ep = Kephra::Document::Data::_ep( $doc_nr ); my $file = Kephra::Document::Data::get_file_path( $doc_nr ); my $buffer = Kephra::Document::Data::get_value( 'buffer' ); if ($file){ Kephra::App::EditPanel::Fold::store( $doc_nr ); Kephra::Edit::Marker::store( $doc_nr ); } Kephra::EventTable::trigger('document.close'); # empty last document if ( $buffer == 1 ) { Kephra::Document::Data::set_value('loaded', 0); Kephra::Document::reset(0); } # close document elsif ( $buffer > 1 ) { # select to which file nr to jump my $close_last = $doc_nr == Kephra::Document::Data::last_nr(); my $switch = $doc_nr == $current; if ($switch){ $close_last ? Kephra::Document::Change::to_number( $doc_nr - 1 ) : Kephra::Document::Change::to_number( $doc_nr + 1 ); } Kephra::Document::Data::dec_value('buffer'); Kephra::Document::Data::dec_value('loaded') if Kephra::Document::Data::get_file_path( $doc_nr ); Kephra::App::TabBar::delete_tab_by_doc_nr( $doc_nr ); Kephra::Document::Data::delete_slot( $doc_nr ); Kephra::Document::Data::set_current_nr( $doc_nr ) unless $close_last and $switch; } Kephra::App::Window::refresh_title(); Kephra::App::EditPanel::gets_focus(); Kephra::EventTable::trigger('document.list'); } sub close_all_unsaved { close_current_unsaved() for @{ Kephra::Document::Data::all_nr() } } sub close_other_unsaved { my $doc_nr = Kephra::Document::Data::current_nr(); Kephra::Document::Change::to_number(0); $_ != $doc_nr ? close_unsaved() : Kephra::Document::Change::to_number(1) for @{ Kephra::Document::Data::all_nr() }; } 1; =head1 NAME Kephra::File - basic file menu functions =head1 DESCRIPTION file menu calls drag n drop files file save events =cutkephra-0.4.3.34+dfsg.orig/lib/Kephra/File/0000755000175000017500000000000012300715227017223 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/lib/Kephra/File/IO.pm0000644000175000017500000000511111774655572020112 0ustar gregoagregoapackage Kephra::File::IO; our $VERSION = '0.20'; use strict; use warnings; # read a file into a scintilla buffer, is much faster then open_buffer sub open_buffer { my $doc_nr = shift; my $file = shift || Kephra::Document::Data::get_file_path($doc_nr); my $ep = shift || Kephra::Document::Data::_ep($doc_nr); my $err_txt= Kephra::API::localisation->{dialog}{error}; my $input; unless ($file) { Kephra::Dialog::warning_box("file_read " . $err_txt->{no_param}, $err_txt->{general} ); } else { unless ( -r $file ) { Kephra::Dialog::warning_box( $err_txt->{file_read} . " " . $file, $err_txt->{file} ); } else { my $did_open = open my $FH,'<', $file; unless ($did_open){ Kephra::Dialog::warning_box($err_txt->{file_read} . " $file", $err_txt->{file}); return 0; } my $codepage = Kephra::Document::Data::get_attribute('codepage', $doc_nr); if ($codepage eq 'auto'){ binmode $FH; read $FH, my $probe, 20000; if ($probe){ my $enc = Encode::Guess::guess_encoding( $probe, 'latin1' ); seek $FH, 0, 0; $codepage = $enc =~ /utf8/ ? 'utf8' : '8bit'; Kephra::Document::Data::set_attribute('codepage', $codepage, $doc_nr); } else { $codepage = Kephra::File::_config->{defaultsettings}{new}{codepage}; } Kephra::Document::Data::set_attribute('codepage', $codepage, $doc_nr); } binmode $FH, $codepage eq 'utf8' ? ":utf8" : ":raw"; # ":encoding(utf8)" Kephra::EventTable::freeze('document.text.change'); my $content = do { local $/; <$FH> }; $ep->AddText( $content ) if defined $content; Kephra::EventTable::thaw('document.text.change'); return 1; } } return 0; } # wite into file from buffer variable sub write_buffer { my $doc_nr = shift || Kephra::Document::Data::current_nr(); my $file = shift || Kephra::Document::Data::get_file_path($doc_nr); my $ep = shift || Kephra::Document::Data::_ep($doc_nr); my $err_txt = Kephra::API::localisation->{dialog}{error}; # check if there is a name or if file that you overwrite is locked if ( not $file or (-e $file and not -w $file) ) { Kephra::Dialog::warning_box ("file_write " . $err_txt->{'no_param'}, $err_txt->{general} ); } else { my $codepage = Kephra::Document::Data::get_attribute('codepage', $doc_nr); my $did_open = open my $FH, '>', $file; unless ($did_open){ Kephra::Dialog::warning_box($err_txt->{file_write} . " $file", $err_txt->{file} ); return 0; } binmode $FH, $codepage eq 'utf8' ? ":utf8" : ":raw"; # ":encoding(utf8)" print $FH $ep->GetText(); } } sub get_age { my $file = shift; return (stat $file)[9] if -e $file; } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/File/History.pm0000644000175000017500000000501411774655572021246 0ustar gregoagregoapackage Kephra::File::History; our $VERSION = '0.06'; use strict; use warnings; my @session = (); my $menu_id = '&file_history'; my $refresh_needed; my $loaded; # internal Module API sub _config { Kephra::API::settings()->{file}{session}{history} } # external Appwide API sub init { return if scalar @session; my $config = Kephra::File::Session::_config(); return unless defined $config; my $subdir = $config->{directory}; my $file = Kephra::Config::filepath( $subdir, _config()->{file} ); my $config_tree = Kephra::Config::File::load($file); if (ref $config_tree->{document} eq 'ARRAY'){ @session = @{$config_tree->{document}}; } Kephra::EventTable::add_call ( 'document.close', __PACKAGE__, sub { Kephra::File::History::add( Kephra::Document::Data::current_nr() ); }, __PACKAGE__ ); $loaded = 1; } sub had_init {$loaded} sub save { my $subdir = Kephra::File::Session::_config()->{directory}; my $file = Kephra::Config::filepath( $subdir, _config()->{file} ); my $config_tree; @{$config_tree->{document}} = @session; Kephra::Config::File::store( $file, $config_tree); } sub delete_gone { my $length = @session; my $file = Kephra::Document::Data::get_file_path(); @session = grep { $_->{file_path} ne $file } @session; $refresh_needed = 1 if $length != @session; } sub get { delete_gone(); \@session; } sub update { delete_gone(); if ($refresh_needed){ $refresh_needed = 0; return 1; } } sub add { my $doc_nr = Kephra::Document::Data::validate_doc_nr(shift); return if $doc_nr < 0; my $attr = Kephra::Document::Data::_hash($doc_nr); return unless $attr->{'file_name'}; my %saved_attr; $saved_attr{$_} = $attr->{$_} for @{ Kephra::File::Session::_saved_properties() }; unshift @session, \%saved_attr; my $length = _config->{length} || 0; pop @session while @session > $length; $refresh_needed = 1; } sub open { my $hist_nr = shift; return if $hist_nr < 0 or $hist_nr > $#session; my $doc_nr = Kephra::Document::Data::get_current_nr(); my $new_nr = Kephra::Document::restore( splice @session, $hist_nr , 1 ); Kephra::Document::Data::set_current_nr( $doc_nr ); Kephra::Document::Change::to_number( $new_nr ); $refresh_needed = 1; Kephra::EventTable::trigger('document.list'); } sub open_all { my $new_nr; my $doc_nr = Kephra::Document::Data::get_current_nr(); $new_nr = Kephra::Document::restore( $_ ) for @session; Kephra::Document::Data::set_current_nr( $doc_nr ); Kephra::Document::Change::to_number( $new_nr ); @session = (); $refresh_needed = 1; Kephra::EventTable::trigger('document.list'); } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/File/Session.pm0000644000175000017500000001557711774655572021247 0ustar gregoagregoapackage Kephra::File::Session; our $VERSION = '0.17'; use strict; use warnings; # intern API sub _config { Kephra::API::settings()->{file}{session} } sub _dialog_l18n { Kephra::Config::Localisation::strings()->{dialog} } sub _saved_properties {[ qw( syntaxmode EOL codepage readonly tab_size tab_use cursor_pos edit_pos marked_lines folded_lines file_path config_file )]} sub _forget_gone_files { my @true_files = (); my $node = shift; $node = $$node if ref $node eq 'REF' and ref $$node eq 'ARRAY'; if ( ref $node eq 'ARRAY' ) { my @files = @{$node}; for ( 0 .. $#files ) { if ( defined $files[$_]{file_path} and -e $files[$_]{file_path} ) { my %file_properties = %{ $files[$_] }; push( @true_files, \%file_properties ); } } } return \@true_files; } sub _remember_directory { my ( $filename, $dir, @dirs ) = shift; if ( length($filename) > 0 ) { @dirs = split( /\\/, $filename ) if $filename =~ /\\/ ; @dirs = split( /\//, $filename ) if $filename =~ /\// ; $dir .= "$dirs[$_]/" for 0 .. $#dirs - 1; _config()->{dialog_dir} = $dir if $dir; } } sub _add { my $session_data = shift; # session data return unless %$session_data and $session_data->{document} and $session_data->{document}[0]; my @load_files = @{Kephra::Config::Tree::_convert_node_2_AoH ( \$session_data->{document} )}; @load_files = @{ _forget_gone_files( \@load_files ) }; my $start_nr = Kephra::Document::Data::current_nr(); my $prev_doc_nr = Kephra::Document::Data::previous_nr(); my $loaded = Kephra::Document::Data::get_value('loaded'); Kephra::Document::Data::update_attributes($start_nr); $start_nr = $session_data->{current_nr} if $session_data->{current_nr} and not $loaded and Kephra::App::EditPanel::_ref()->GetText eq ''; # open remembered files with all properties Kephra::Document::restore( $_ ) for @load_files; my $buffer = Kephra::Document::Data::get_value('buffer'); # selecting starting doc nr $start_nr = 0 if (not defined $start_nr) or ($start_nr < 0 ); $start_nr = $buffer - 1 if $start_nr >= $buffer; # activate the starting document & some afterwork Kephra::Document::Change::to_number($start_nr); Kephra::Document::Data::set_previous_nr($prev_doc_nr); Kephra::App::Window::refresh_title(); } # # extern API # sub restore { my $file = shift; return unless -e $file; Kephra::File::close_all(); add($file); } sub restore_from { # my $file = Kephra::Dialog::get_file_open( _dialog_l18n()->{file}{open_session}, Kephra::Config::filepath( _config->{directory} ), $Kephra::temp{file}{filterstring}{config} ); restore($file); } sub add { my $file = shift; my $restore = shift; if (-r $file) { my $session_def = Kephra::Config::File::load($file); if (ref $session_def eq 'HASH'){ _add($session_def); } else { Kephra::Dialog::warning_box($file, _dialog_l18n()->{error}{config_parse}); } } else { Kephra::Dialog::warning_box($file, _dialog_l18n()->{error}{file_read}); } } sub add_from { my $file = Kephra::Dialog::get_file_open( _dialog_l18n()->{file}{add_session}, Kephra::Config::filepath( _config->{directory} ), $Kephra::temp{file}{filterstring}{config} ); add($file); } sub save { my $file = shift; return unless $file; Kephra::Config::Global::update(); my $doc2vis = \&Kephra::App::TabBar::_doc2vis_pos; my $config = _config(); my %temp_config = %{ Kephra::Config::File::load($file) } if -r $file; $temp_config{current_nr} = $doc2vis->(Kephra::Document::Data::current_nr()); $temp_config{document} = []; my @doc_list = @{ Kephra::Document::Data::_attributes() }; for my $nr (0 .. $#doc_list) { my $vis_pos = $doc2vis->($nr); $temp_config{document}[$vis_pos]{$_} = $doc_list[$nr]{$_} for @{ _saved_properties() }; } @{ $temp_config{document} } = @{ _forget_gone_files( \$temp_config{document} ) }; Kephra::Config::File::store( $file, \%temp_config ); } sub save_as { my $file_name = Kephra::Dialog::get_file_save( _dialog_l18n()->{file}{save_session}, Kephra::Config::filepath( _config->{directory} ), $Kephra::temp{file}{filterstring}{config} ); if ( length($file_name) > 0 ) { save( $file_name, "files" ); _remember_directory($file_name); } } # default session handling sub do_autosave { # answers if autosave is turned on by config settings my $config = _config()->{auto}{save}; return 1 if defined $config and $config and not $config eq 'not'; return 0; } sub autoload { # restore session that was opened while last app shut down if ( do_autosave() ) { my $config = _config(); my $session_file = Kephra::Config::filepath ( $config->{directory}, $config->{auto}{file} ); restore($session_file); } else { Kephra::Document::reset() } } sub autosave { my $config = _config(); my $file = Kephra::Config::filepath($config->{directory}, $config->{auto}{file}); save( $file ) if do_autosave(); } # backup session handling sub load_backup { my $config = _config(); restore( Kephra::Config::filepath( $config->{directory}, $config->{backup} ) ); } sub save_backup { my $config = _config(); save( Kephra::Config::filepath( $config->{directory}, $config->{backup} ) ); } # other session formats sub import_scite { my $err_msg = _dialog_l18n()->{error}; my $file = Kephra::Dialog::get_file_open ( _dialog_l18n()->{file}{open_session}, $Kephra::temp{path}{config}, $Kephra::temp{file}{filterstring}{scite} ); if ( -r $file ) { if ( open my $FH, '<', $file ) { my @load_files; my ( $start_file_nr, $file_nr ); while (<$FH>) { m/ (.+)/; if ( -e $3 ) { $start_file_nr = $file_nr if $1; $load_files[$file_nr]{cursor_pos} = $2; $load_files[$file_nr++]{file_path} = $3; } } if (@load_files) { &Kephra::File::close_all; for (@load_files) { Kephra::Document::add( ${$_}{file_path} ); Kephra::Edit::_goto_pos( ${$_}{cursor_pos} ); } Kephra::Document::Change::to_number($start_file_nr); $Kephra::document{previous_nr} = $start_file_nr; } else { Kephra::Dialog::warning_box($file, $err_msg->{config_parse}); } } else { Kephra::Dialog::warning_box ($err_msg->{file_read}." $file", $err_msg->{file}); } } } sub export_scite { my $win = Kephra::App::Window::_ref(); my $file = Kephra::Dialog::get_file_save( _dialog_l18n()->{file}{save_session}, $Kephra::temp{path}{config}, $Kephra::temp{file}{filterstring}{scite} ); if ( length($file) > 0 ) { if ( open my $FH, '>', $file ) { my $current = Kephra::Document::Data::current_nr(); my $output; for ( @{ Kephra::Document::Data::all_nr() } ) { my %file_attr = %{ Kephra::Document::Data::_hash($_) }; if ( -e $file_attr{file_path} ) { $output .= "{error}; Kephra::Dialog::warning_box ($err_msg->{file_write}." $file", $err_msg->{file} ); } } } 1; kephra-0.4.3.34+dfsg.orig/lib/Kephra/Log.pm0000644000175000017500000000416711573643454017450 0ustar gregoagregoapackage Kephra::Log; $VERSION = '0.01'; use strict; use warnings; sub setup_logging { eval { require Log::Dispatch; require Log::Dispatch::File; }; if ($@) { _setup_fake_logger(); } else { _setup_real_logger(); } $main::logger->info("Starting"); return; } sub _setup_fake_logger { package Kephra::FakeLogger; $main::logger = bless {}, __PACKAGE__; no strict 'refs'; foreach my $l ( qw( debug info notice warning err error crit critical alert emerg emergency ) ) { *{$l} = sub {}; } return; } sub _setup_real_logger { mkdir $Kephra::temp{path}{logger}; # TODO: setup pseudo logger in case the directory does not exist or # otherwise cannot start the logger, report error $main::logger = Log::Dispatch->new; require POSIX; my $ts = POSIX::strftime("%Y%m%d", localtime); print File::Spec->catfile($Kephra::temp{path}{logger}, "$ts.log"); $main::logger->add( Log::Dispatch::File->new( name => 'file1', min_level => ($ENV{KEPHRA_LOGGIN} || 'debug'), filename => File::Spec->catfile($Kephra::temp{path}{logger}, "$ts.log"), mode => 'append', callbacks => \&_logger, )); $SIG{__WARN__} = sub { $main::logger->warning($_[0]) }; return; } sub _logger { my %data = @_; # TODO maybe we should use regular timestamp here and turn on the hires timestamp # only if KEPHRA_TIME or similar env variable is set require Time::HiRes; return sprintf("%s - %s - %s - %s\n", Time::HiRes::time(), $$, $data{level}, $data{message}); } sub msg { message(@_) } sub message { #Wx::LogMessage( "Hello from MyTimer::Notify!" ); # Wx::Log::SetActiveTarget( delete $this->{OLDLOG} ); #$this->{OLDLOG} = #Wx::Log::SetActiveTarget( Wx::LogTextCtrl->new( $this->{TEXT} ) ); # #Wx::LogTraceMask( 'test', "You can't see this!" ); #Wx::Log::AddTraceMask( 'test' ); #Wx::LogTraceMask( "Wx::LogTraceMask" ); #Wx::Log::SetActiveTarget( $this->{PANEL}->{OLDLOG} ); } sub warn { Kephra::App::StatusBar::info_msg(@_) } 1;kephra-0.4.3.34+dfsg.orig/Makefile.PL0000644000175000017500000000174012300715326016340 0ustar gregoagregoause warnings; use strict; use inc::Module::Install; use 5.006; #eval {}; #BEGIN {}; name 'Kephra'; license 'gpl_2'; author 'Herbert Breunung'; homepage 'http://kephra.sourceforge.net/'; bugtracker 'http://sourceforge.net/tracker/?group_id=169747&atid=851590'; all_from 'lib/Kephra.pm'; requires 'Cwd'; requires 'Encode::Guess'; requires 'File::UserConfig'; requires 'Config::General' => 2.40; requires 'YAML::Tiny' => 0.31; requires 'Text::Wrap'; requires 'POSIX'; requires 'Wx' => 0.94; requires 'Wx::Perl::ProcessStream' => 0.25; build_requires 'Test::More' => 0.47; build_requires 'Test::Script' => 0.01; build_requires 'Test::NoWarnings'; build_requires 'Test::Exception'; no_index 'directory' => qw{ t xt share inc }; install_share 'share'; install_script 'bin/kephra'; WriteAll; kephra-0.4.3.34+dfsg.orig/META.yml0000644000175000017500000000221612300715361015635 0ustar gregoagregoa--- # http://module-build.sourceforge.net/META-spec.html name: Kephra version: 0.4.3.34 abstract: crossplatform GUI-Texteditor along Perl alike Paradigms distribution_type: module author: Herbert Breunung license: gpl_2 build_requires: Wx: 0.74 Test::More: 0.47 Test::Script: 0 Test::NoWarnings: 0 Test::Exception: 0 Test::CheckManifest: 0.9 Test::Pod: 1.22 ExtUtils::MakeMaker: 6.42 configure_requires: ExtUtils::MakeMaker: 6.42 generated_by: 'Module::Install' no_index: directory: - inc - share - t requires: perl: 5.6.0 Cwd: 0 Encode: 0 Encode::Guess: 0 File::Find: 0 File::Spec::Functions: 0 File::UserConfig: 0 Config::General: 0 YAML::Tiny: 0 Wx: 0.74 Wx::Perl::ProcessStream: 0 resources: bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Kephra homepage: http://kephra.sourceforge.net repository: http://sourceforge.net/scm/?type=svn&group_id=169747 license: http://www.gnu.org/licenses/gpl-2.0.txt meta-spec: version: 1.4 url: http://module-build.sourceforge.net/META-spec-v1.4.html kephra-0.4.3.34+dfsg.orig/inc/0000755000175000017500000000000012300715027015133 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/inc/Module/0000755000175000017500000000000012300715027016360 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/inc/Module/Install/0000755000175000017500000000000012300715027017766 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/inc/Module/Install/Makefile.pm0000644000175000017500000003510511556012755022057 0ustar gregoagregoapackage Module::Install::Makefile; use strict 'vars'; use ExtUtils::MakeMaker (); use Module::Install::Base (); use Fcntl qw/:flock :seek/; use vars qw{$VERSION @ISA $ISCORE}; BEGIN { $VERSION = '1.01'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } sub Makefile { $_[0] } my %seen = (); sub prompt { shift; # Infinite loop protection my @c = caller(); if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) { die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])"; } # In automated testing or non-interactive session, always use defaults if ( ($ENV{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENV{PERL_MM_USE_DEFAULT} ) { local $ENV{PERL_MM_USE_DEFAULT} = 1; goto &ExtUtils::MakeMaker::prompt; } else { goto &ExtUtils::MakeMaker::prompt; } } # Store a cleaned up version of the MakeMaker version, # since we need to behave differently in a variety of # ways based on the MM version. my $makemaker = eval $ExtUtils::MakeMaker::VERSION; # If we are passed a param, do a "newer than" comparison. # Otherwise, just return the MakeMaker version. sub makemaker { ( @_ < 2 or $makemaker >= eval($_[1]) ) ? $makemaker : 0 } # Ripped from ExtUtils::MakeMaker 6.56, and slightly modified # as we only need to know here whether the attribute is an array # or a hash or something else (which may or may not be appendable). my %makemaker_argtype = ( C => 'ARRAY', CONFIG => 'ARRAY', # CONFIGURE => 'CODE', # ignore DIR => 'ARRAY', DL_FUNCS => 'HASH', DL_VARS => 'ARRAY', EXCLUDE_EXT => 'ARRAY', EXE_FILES => 'ARRAY', FUNCLIST => 'ARRAY', H => 'ARRAY', IMPORTS => 'HASH', INCLUDE_EXT => 'ARRAY', LIBS => 'ARRAY', # ignore '' MAN1PODS => 'HASH', MAN3PODS => 'HASH', META_ADD => 'HASH', META_MERGE => 'HASH', PL_FILES => 'HASH', PM => 'HASH', PMLIBDIRS => 'ARRAY', PMLIBPARENTDIRS => 'ARRAY', PREREQ_PM => 'HASH', CONFIGURE_REQUIRES => 'HASH', SKIP => 'ARRAY', TYPEMAPS => 'ARRAY', XS => 'HASH', # VERSION => ['version',''], # ignore # _KEEP_AFTER_FLUSH => '', clean => 'HASH', depend => 'HASH', dist => 'HASH', dynamic_lib=> 'HASH', linkext => 'HASH', macro => 'HASH', postamble => 'HASH', realclean => 'HASH', test => 'HASH', tool_autosplit => 'HASH', # special cases where you can use makemaker_append CCFLAGS => 'APPENDABLE', DEFINE => 'APPENDABLE', INC => 'APPENDABLE', LDDLFLAGS => 'APPENDABLE', LDFROM => 'APPENDABLE', ); sub makemaker_args { my ($self, %new_args) = @_; my $args = ( $self->{makemaker_args} ||= {} ); foreach my $key (keys %new_args) { if ($makemaker_argtype{$key}) { if ($makemaker_argtype{$key} eq 'ARRAY') { $args->{$key} = [] unless defined $args->{$key}; unless (ref $args->{$key} eq 'ARRAY') { $args->{$key} = [$args->{$key}] } push @{$args->{$key}}, ref $new_args{$key} eq 'ARRAY' ? @{$new_args{$key}} : $new_args{$key}; } elsif ($makemaker_argtype{$key} eq 'HASH') { $args->{$key} = {} unless defined $args->{$key}; foreach my $skey (keys %{ $new_args{$key} }) { $args->{$key}{$skey} = $new_args{$key}{$skey}; } } elsif ($makemaker_argtype{$key} eq 'APPENDABLE') { $self->makemaker_append($key => $new_args{$key}); } } else { if (defined $args->{$key}) { warn qq{MakeMaker attribute "$key" is overriden; use "makemaker_append" to append values\n}; } $args->{$key} = $new_args{$key}; } } return $args; } # For mm args that take multiple space-seperated args, # append an argument to the current list. sub makemaker_append { my $self = shift; my $name = shift; my $args = $self->makemaker_args; $args->{$name} = defined $args->{$name} ? join( ' ', $args->{$name}, @_ ) : join( ' ', @_ ); } sub build_subdirs { my $self = shift; my $subdirs = $self->makemaker_args->{DIR} ||= []; for my $subdir (@_) { push @$subdirs, $subdir; } } sub clean_files { my $self = shift; my $clean = $self->makemaker_args->{clean} ||= {}; %$clean = ( %$clean, FILES => join ' ', grep { length $_ } ($clean->{FILES} || (), @_), ); } sub realclean_files { my $self = shift; my $realclean = $self->makemaker_args->{realclean} ||= {}; %$realclean = ( %$realclean, FILES => join ' ', grep { length $_ } ($realclean->{FILES} || (), @_), ); } sub libs { my $self = shift; my $libs = ref $_[0] ? shift : [ shift ]; $self->makemaker_args( LIBS => $libs ); } sub inc { my $self = shift; $self->makemaker_args( INC => shift ); } sub _wanted_t { } sub tests_recursive { my $self = shift; my $dir = shift || 't'; unless ( -d $dir ) { die "tests_recursive dir '$dir' does not exist"; } my %tests = map { $_ => 1 } split / /, ($self->tests || ''); require File::Find; File::Find::find( sub { /\.t$/ and -f $_ and $tests{"$File::Find::dir/*.t"} = 1 }, $dir ); $self->tests( join ' ', sort keys %tests ); } sub write { my $self = shift; die "&Makefile->write() takes no arguments\n" if @_; # Check the current Perl version my $perl_version = $self->perl_version; if ( $perl_version ) { eval "use $perl_version; 1" or die "ERROR: perl: Version $] is installed, " . "but we need version >= $perl_version"; } # Make sure we have a new enough MakeMaker require ExtUtils::MakeMaker; if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) { # MakeMaker can complain about module versions that include # an underscore, even though its own version may contain one! # Hence the funny regexp to get rid of it. See RT #35800 # for details. my $v = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/; $self->build_requires( 'ExtUtils::MakeMaker' => $v ); $self->configure_requires( 'ExtUtils::MakeMaker' => $v ); } else { # Allow legacy-compatibility with 5.005 by depending on the # most recent EU:MM that supported 5.005. $self->build_requires( 'ExtUtils::MakeMaker' => 6.42 ); $self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 ); } # Generate the MakeMaker params my $args = $self->makemaker_args; $args->{DISTNAME} = $self->name; $args->{NAME} = $self->module_name || $self->name; $args->{NAME} =~ s/-/::/g; $args->{VERSION} = $self->version or die <<'EOT'; ERROR: Can't determine distribution version. Please specify it explicitly via 'version' in Makefile.PL, or set a valid $VERSION in a module, and provide its file path via 'version_from' (or 'all_from' if you prefer) in Makefile.PL. EOT $DB::single = 1; if ( $self->tests ) { my @tests = split ' ', $self->tests; my %seen; $args->{test} = { TESTS => (join ' ', grep {!$seen{$_}++} @tests), }; } elsif ( $Module::Install::ExtraTests::use_extratests ) { # Module::Install::ExtraTests doesn't set $self->tests and does its own tests via harness. # So, just ignore our xt tests here. } elsif ( -d 'xt' and ($Module::Install::AUTHOR or $ENV{RELEASE_TESTING}) ) { $args->{test} = { TESTS => join( ' ', map { "$_/*.t" } grep { -d $_ } qw{ t xt } ), }; } if ( $] >= 5.005 ) { $args->{ABSTRACT} = $self->abstract; $args->{AUTHOR} = join ', ', @{$self->author || []}; } if ( $self->makemaker(6.10) ) { $args->{NO_META} = 1; #$args->{NO_MYMETA} = 1; } if ( $self->makemaker(6.17) and $self->sign ) { $args->{SIGN} = 1; } unless ( $self->is_admin ) { delete $args->{SIGN}; } if ( $self->makemaker(6.31) and $self->license ) { $args->{LICENSE} = $self->license; } my $prereq = ($args->{PREREQ_PM} ||= {}); %$prereq = ( %$prereq, map { @$_ } # flatten [module => version] map { @$_ } grep $_, ($self->requires) ); # Remove any reference to perl, PREREQ_PM doesn't support it delete $args->{PREREQ_PM}->{perl}; # Merge both kinds of requires into BUILD_REQUIRES my $build_prereq = ($args->{BUILD_REQUIRES} ||= {}); %$build_prereq = ( %$build_prereq, map { @$_ } # flatten [module => version] map { @$_ } grep $_, ($self->configure_requires, $self->build_requires) ); # Remove any reference to perl, BUILD_REQUIRES doesn't support it delete $args->{BUILD_REQUIRES}->{perl}; # Delete bundled dists from prereq_pm, add it to Makefile DIR my $subdirs = ($args->{DIR} || []); if ($self->bundles) { my %processed; foreach my $bundle (@{ $self->bundles }) { my ($mod_name, $dist_dir) = @$bundle; delete $prereq->{$mod_name}; $dist_dir = File::Basename::basename($dist_dir); # dir for building this module if (not exists $processed{$dist_dir}) { if (-d $dist_dir) { # List as sub-directory to be processed by make push @$subdirs, $dist_dir; } # Else do nothing: the module is already present on the system $processed{$dist_dir} = undef; } } } unless ( $self->makemaker('6.55_03') ) { %$prereq = (%$prereq,%$build_prereq); delete $args->{BUILD_REQUIRES}; } if ( my $perl_version = $self->perl_version ) { eval "use $perl_version; 1" or die "ERROR: perl: Version $] is installed, " . "but we need version >= $perl_version"; if ( $self->makemaker(6.48) ) { $args->{MIN_PERL_VERSION} = $perl_version; } } if ($self->installdirs) { warn qq{old INSTALLDIRS (probably set by makemaker_args) is overriden by installdirs\n} if $args->{INSTALLDIRS}; $args->{INSTALLDIRS} = $self->installdirs; } my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_} ) } keys %$args; my $user_preop = delete $args{dist}->{PREOP}; if ( my $preop = $self->admin->preop($user_preop) ) { foreach my $key ( keys %$preop ) { $args{dist}->{$key} = $preop->{$key}; } } my $mm = ExtUtils::MakeMaker::WriteMakefile(%args); $self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile'); } sub fix_up_makefile { my $self = shift; my $makefile_name = shift; my $top_class = ref($self->_top) || ''; my $top_version = $self->_top->VERSION || ''; my $preamble = $self->preamble ? "# Preamble by $top_class $top_version\n" . $self->preamble : ''; my $postamble = "# Postamble by $top_class $top_version\n" . ($self->postamble || ''); local *MAKEFILE; open MAKEFILE, "+< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!"; eval { flock MAKEFILE, LOCK_EX }; my $makefile = do { local $/; }; $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /; $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g; $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g; $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m; $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m; # Module::Install will never be used to build the Core Perl # Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks # PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist $makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m; #$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m; # Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well. $makefile =~ s/(\"?)-I\$\(PERL_LIB\)\1//g; # XXX - This is currently unused; not sure if it breaks other MM-users # $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg; seek MAKEFILE, 0, SEEK_SET; truncate MAKEFILE, 0; print MAKEFILE "$preamble$makefile$postamble" or die $!; close MAKEFILE or die $!; 1; } sub preamble { my ($self, $text) = @_; $self->{preamble} = $text . $self->{preamble} if defined $text; $self->{preamble}; } sub postamble { my ($self, $text) = @_; $self->{postamble} ||= $self->admin->postamble; $self->{postamble} .= $text if defined $text; $self->{postamble} } 1; __END__ =pod =head1 NAME Module::Install::MakeMaker - Extension Rules for ExtUtils::MakeMaker =head1 SYNOPSIS In your F: use inc::Module::Install; WriteMakefile(); =head1 DESCRIPTION This module is a wrapper around B. It exports two functions: C (an alias for C) and C. The C function will pass on keyword/value pair functions to C. The required parameters C and C (or C) are not necessary if it can find them unambiguously in your code. =head1 CONFIGURATION OPTIONS This module also adds some Configuration parameters of its own: =head2 NAME The NAME parameter is required by B. If you have a single module in your distribution, or if the module name indicated by the current directory exists under F, this module will use the guessed package name as the default. If this module can't find a default for C it will ask you to specify it manually. =head2 VERSION B requires either the C or C parameter. If this module can guess the package's C, it will attempt to parse the C from it. If this module can't find a default for C it will ask you to specify it manually. =head1 MAKE TARGETS B provides you with many useful C targets. A C B is the word you specify after C, like C for C. Some of the more useful targets are: =over 4 =item * all This is the default target. When you type C it is the same as entering C. This target builds all of your code and stages it in the C directory. =item * test Run your distribution's test suite. =item * install Copy the contents of the C directory into the appropriate directories in your Perl installation. =item * dist Create a distribution tarball, ready for uploading to CPAN or sharing with a friend. =item * clean distclean purge Remove the files created by C and C. =item * help Same as typing C. =back This module modifies the behaviour of some of these targets, depending on your requirements, and also adds the following targets to your Makefile: =over 4 =item * cpurge Just like purge, except that it also deletes the files originally added by this module itself. =item * chelp Short cut for typing C. =item * distsign Short cut for typing C, for B users to sign the distribution before release. =back =head1 SEE ALSO L, L, L =head1 AUTHORS Adam Kennedy Eadamk@cpan.orgE Audrey Tang Eautrijus@autrijus.orgE Brian Ingerson EINGY@cpan.orgE =head1 COPYRIGHT Some parts copyright 2008 - 2011 Adam Kennedy. Copyright 2002, 2003, 2004 Audrey Tang and Brian Ingerson. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut kephra-0.4.3.34+dfsg.orig/inc/Module/Install/TestBase.pm0000644000175000017500000000260411546274265022057 0ustar gregoagregoapackage Module::Install::TestBase; use strict; use warnings; use Module::Install::Base; use vars qw($VERSION @ISA); BEGIN { $VERSION = '0.60'; @ISA = 'Module::Install::Base'; } sub use_test_base { my $self = shift; $self->include('Test::Base'); $self->include('Test::Base::Filter'); $self->include('Spiffy'); $self->include('Test::More'); $self->include('Test::Builder'); $self->include('Test::Builder::Module'); $self->requires('Filter::Util::Call'); } 1; =encoding utf8 =head1 NAME Module::Install::TestBase - Module::Install Support for Test::Base =head1 SYNOPSIS use inc::Module::Install; name 'Foo'; all_from 'lib/Foo.pm'; use_test_base; WriteAll; =head1 DESCRIPTION This module adds the C directive to Module::Install. Now you can get full Test-Base support for you module with no external dependency on Test::Base. Just add this line to your Makefile.PL: use_test_base; That's it. Really. Now Test::Base is bundled into your module, so that it is no longer any burden on the person installing your module. =head1 AUTHOR Ingy döt Net =head1 COPYRIGHT Copyright (c) 2006, 2008, 2011. Ingy döt Net. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L =cut kephra-0.4.3.34+dfsg.orig/inc/Module/Install/Share.pm0000644000175000017500000000774611556012755021416 0ustar gregoagregoapackage Module::Install::Share; use strict; use Module::Install::Base (); use File::Find (); use ExtUtils::Manifest (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { $VERSION = '1.01'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } sub install_share { my $self = shift; my $dir = @_ ? pop : 'share'; my $type = @_ ? shift : 'dist'; unless ( defined $type and $type eq 'module' or $type eq 'dist' ) { die "Illegal or invalid share dir type '$type'"; } unless ( defined $dir and -d $dir ) { require Carp; Carp::croak("Illegal or missing directory install_share param: '$dir'"); } # Split by type my $S = ($^O eq 'MSWin32') ? "\\" : "\/"; my $root; if ( $type eq 'dist' ) { die "Too many parameters to install_share" if @_; # Set up the install $root = "\$(INST_LIB)${S}auto${S}share${S}dist${S}\$(DISTNAME)"; } else { my $module = Module::Install::_CLASS($_[0]); unless ( defined $module ) { die "Missing or invalid module name '$_[0]'"; } $module =~ s/::/-/g; $root = "\$(INST_LIB)${S}auto${S}share${S}module${S}$module"; } my $manifest = -r 'MANIFEST' ? ExtUtils::Manifest::maniread() : undef; my $skip_checker = $ExtUtils::Manifest::VERSION >= 1.54 ? ExtUtils::Manifest::maniskip() : ExtUtils::Manifest::_maniskip(); my $postamble = ''; my $perm_dir = eval($ExtUtils::MakeMaker::VERSION) >= 6.52 ? '$(PERM_DIR)' : 755; File::Find::find({ no_chdir => 1, wanted => sub { my $path = File::Spec->abs2rel($_, $dir); if (-d $_) { return if $skip_checker->($File::Find::name); $postamble .=<<"END"; \t\$(NOECHO) \$(MKPATH) "$root${S}$path" \t\$(NOECHO) \$(CHMOD) $perm_dir "$root${S}$path" END } else { return if ref $manifest && !exists $manifest->{$File::Find::name}; return if $skip_checker->($File::Find::name); $postamble .=<<"END"; \t\$(NOECHO) \$(CP) "$dir${S}$path" "$root${S}$path" END } }, }, $dir); # Set up the install $self->postamble(<<"END_MAKEFILE"); config :: $postamble END_MAKEFILE # The above appears to behave incorrectly when used with old versions # of ExtUtils::Install (known-bad on RHEL 3, with 5.8.0) # So when we need to install a share directory, make sure we add a # dependency on a moderately new version of ExtUtils::MakeMaker. $self->build_requires( 'ExtUtils::MakeMaker' => '6.11' ); # 99% of the time we don't want to index a shared dir $self->no_index( directory => $dir ); } 1; __END__ =pod =head1 NAME Module::Install::Share - Install non-code files for use during run-time =head1 SYNOPSIS # Put everything inside ./share/ into the distribution 'auto' path install_share 'share'; # Same thing as above using the default directory name install_share; =head1 DESCRIPTION As well as Perl modules and Perl binary applications, some distributions need to install read-only data files to a location on the file system for use at run-time. XML Schemas, L data files, and L databases are examples of the sort of things distributions might typically need to have available after installation. C is a L extension that provides commands to allow these files to be installed to the applicable location on disk. To locate the files after installation so they can be used inside your module, see this extension's companion module L. =head1 TO DO Currently C installs not only the files you want, but if called by the author will also copy F<.svn> and other source-control directories, and other junk. Enhance this to copy only files under F that are in the F, or possibly those not in F. =head1 AUTHORS Audrey Tang Eautrijus@autrijus.orgE Adam Kennedy Eadamk@cpan.orgE =head1 SEE ALSO L, L =head1 COPYRIGHT Copyright 2006 Audrey Tang, Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L =cut kephra-0.4.3.34+dfsg.orig/inc/Module/Install/Scripts.pm0000644000175000017500000000100111556012755021755 0ustar gregoagregoapackage Module::Install::Scripts; use strict 'vars'; use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { $VERSION = '1.01'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } sub install_script { my $self = shift; my $args = $self->makemaker_args; my $exe = $args->{EXE_FILES} ||= []; foreach ( @_ ) { if ( -f $_ ) { push @$exe, $_; } elsif ( -d 'script' and -f "script/$_" ) { push @$exe, "script/$_"; } else { die("Cannot find script '$_'"); } } } 1; kephra-0.4.3.34+dfsg.orig/inc/Module/Install/Fetch.pm0000644000175000017500000000461711556012755021377 0ustar gregoagregoapackage Module::Install::Fetch; use strict; use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { $VERSION = '1.01'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } sub get_file { my ($self, %args) = @_; my ($scheme, $host, $path, $file) = $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return; if ( $scheme eq 'http' and ! eval { require LWP::Simple; 1 } ) { $args{url} = $args{ftp_url} or (warn("LWP support unavailable!\n"), return); ($scheme, $host, $path, $file) = $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return; } $|++; print "Fetching '$file' from $host... "; unless (eval { require Socket; Socket::inet_aton($host) }) { warn "'$host' resolve failed!\n"; return; } return unless $scheme eq 'ftp' or $scheme eq 'http'; require Cwd; my $dir = Cwd::getcwd(); chdir $args{local_dir} or return if exists $args{local_dir}; if (eval { require LWP::Simple; 1 }) { LWP::Simple::mirror($args{url}, $file); } elsif (eval { require Net::FTP; 1 }) { eval { # use Net::FTP to get past firewall my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600); $ftp->login("anonymous", 'anonymous@example.com'); $ftp->cwd($path); $ftp->binary; $ftp->get($file) or (warn("$!\n"), return); $ftp->quit; } } elsif (my $ftp = $self->can_run('ftp')) { eval { # no Net::FTP, fallback to ftp.exe require FileHandle; my $fh = FileHandle->new; local $SIG{CHLD} = 'IGNORE'; unless ($fh->open("|$ftp -n")) { warn "Couldn't open ftp: $!\n"; chdir $dir; return; } my @dialog = split(/\n/, <<"END_FTP"); open $host user anonymous anonymous\@example.com cd $path binary get $file $file quit END_FTP foreach (@dialog) { $fh->print("$_\n") } $fh->close; } } else { warn "No working 'ftp' program available!\n"; chdir $dir; return; } unless (-f $file) { warn "Fetching failed: $@\n"; chdir $dir; return; } return if exists $args{size} and -s $file != $args{size}; system($args{run}) if exists $args{run}; unlink($file) if $args{remove}; print(((!exists $args{check_for} or -e $args{check_for}) ? "done!" : "failed! ($!)"), "\n"); chdir $dir; return !$?; } 1; kephra-0.4.3.34+dfsg.orig/inc/Module/Install/WriteAll.pm0000644000175000017500000000236611556012755022070 0ustar gregoagregoapackage Module::Install::WriteAll; use strict; use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { $VERSION = '1.01'; @ISA = qw{Module::Install::Base}; $ISCORE = 1; } sub WriteAll { my $self = shift; my %args = ( meta => 1, sign => 0, inline => 0, check_nmake => 1, @_, ); $self->sign(1) if $args{sign}; $self->admin->WriteAll(%args) if $self->is_admin; $self->check_nmake if $args{check_nmake}; unless ( $self->makemaker_args->{PL_FILES} ) { # XXX: This still may be a bit over-defensive... unless ($self->makemaker(6.25)) { $self->makemaker_args( PL_FILES => {} ) if -f 'Build.PL'; } } # Until ExtUtils::MakeMaker support MYMETA.yml, make sure # we clean it up properly ourself. $self->realclean_files('MYMETA.yml'); if ( $args{inline} ) { $self->Inline->write; } else { $self->Makefile->write; } # The Makefile write process adds a couple of dependencies, # so write the META.yml files after the Makefile. if ( $args{meta} ) { $self->Meta->write; } # Experimental support for MYMETA if ( $ENV{X_MYMETA} ) { if ( $ENV{X_MYMETA} eq 'JSON' ) { $self->Meta->write_mymeta_json; } else { $self->Meta->write_mymeta_yaml; } } return 1; } 1; kephra-0.4.3.34+dfsg.orig/inc/Module/Install/MakeMaker.pm0000644000175000017500000000234611556012755022200 0ustar gregoagregoapackage Module::Install::MakeMaker; use strict; use ExtUtils::MakeMaker (); use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { $VERSION = '1.01'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } my $makefile = undef; sub WriteMakefile { my ($self, %args) = @_; $makefile = $self->load('Makefile'); # mapping between MakeMaker and META.yml keys $args{MODULE_NAME} = $args{NAME}; unless ( $args{NAME} = $args{DISTNAME} or ! $args{MODULE_NAME} ) { $args{NAME} = $args{MODULE_NAME}; $args{NAME} =~ s/::/-/g; } foreach my $key ( qw{name module_name version version_from abstract author installdirs} ) { my $value = delete($args{uc($key)}) or next; $self->$key($value); } if (my $prereq = delete($args{PREREQ_PM})) { while (my($k,$v) = each %$prereq) { $self->requires($k,$v); } } if (my $prereq = delete($args{BUILD_REQUIRES})) { while (my($k,$v) = each %$prereq) { $self->build_requires($k,$v); } } # put the remaining args to makemaker_args $self->makemaker_args(%args); } END { if ( $makefile ) { $makefile->write; $makefile->Meta->write; } } 1; kephra-0.4.3.34+dfsg.orig/inc/Module/Install/Base.pm0000644000175000017500000000477711556012755021227 0ustar gregoagregoapackage Module::Install::Base; use strict 'vars'; use vars qw{$VERSION}; BEGIN { $VERSION = '1.01'; } # Suspend handler for "redefined" warnings BEGIN { my $w = $SIG{__WARN__}; $SIG{__WARN__} = sub { $w }; } =pod =head1 NAME Module::Install::Base - Base class for Module::Install extensions =head1 SYNOPSIS In a B extension: use Module::Install::Base (); @ISA = qw(Module::Install::Base); =head1 DESCRIPTION This module provide essential methods for all B extensions, in particular the common constructor C and method dispatcher C. =head1 METHODS =over 4 =item new(%args) Constructor -- need to preserve at least _top =cut sub new { my $class = shift; unless ( defined &{"${class}::call"} ) { *{"${class}::call"} = sub { shift->_top->call(@_) }; } unless ( defined &{"${class}::load"} ) { *{"${class}::load"} = sub { shift->_top->load(@_) }; } bless { @_ }, $class; } =pod =item AUTOLOAD The main dispatcher - copy extensions if missing =cut sub AUTOLOAD { local $@; my $func = eval { shift->_top->autoload } or return; goto &$func; } =pod =item _top() Returns the top-level B object. =cut sub _top { $_[0]->{_top}; } =pod =item admin() Returns the C<_top> object's associated B object on the first run (i.e. when there was no F when the program started); on subsequent (user-side) runs, returns a fake admin object with an empty C method that does nothing at all. =cut sub admin { $_[0]->_top->{admin} or Module::Install::Base::FakeAdmin->new; } =pod =item is_admin() Tells whether this is the first run of the installer (on author's side). That is when there was no F at program start. True if that's the case. False, otherwise. =cut sub is_admin { ! $_[0]->admin->isa('Module::Install::Base::FakeAdmin'); } sub DESTROY {} package Module::Install::Base::FakeAdmin; use vars qw{$VERSION}; BEGIN { $VERSION = $Module::Install::Base::VERSION; } my $fake; sub new { $fake ||= bless(\@_, $_[0]); } sub AUTOLOAD {} sub DESTROY {} # Restore warning handler BEGIN { $SIG{__WARN__} = $SIG{__WARN__}->(); } 1; =pod =back =head1 SEE ALSO L =head1 AUTHORS Audrey Tang Eautrijus@autrijus.orgE =head1 COPYRIGHT Copyright 2003, 2004 by Audrey Tang Eautrijus@autrijus.orgE. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L =cut kephra-0.4.3.34+dfsg.orig/inc/Module/Install/Metadata.pm0000644000175000017500000004311311556012755022060 0ustar gregoagregoapackage Module::Install::Metadata; use strict 'vars'; use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { $VERSION = '1.01'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } my @boolean_keys = qw{ sign }; my @scalar_keys = qw{ name module_name abstract version distribution_type tests installdirs }; my @tuple_keys = qw{ configure_requires build_requires requires recommends bundles resources }; my @resource_keys = qw{ homepage bugtracker repository }; my @array_keys = qw{ keywords author }; *authors = \&author; sub Meta { shift } sub Meta_BooleanKeys { @boolean_keys } sub Meta_ScalarKeys { @scalar_keys } sub Meta_TupleKeys { @tuple_keys } sub Meta_ResourceKeys { @resource_keys } sub Meta_ArrayKeys { @array_keys } foreach my $key ( @boolean_keys ) { *$key = sub { my $self = shift; if ( defined wantarray and not @_ ) { return $self->{values}->{$key}; } $self->{values}->{$key} = ( @_ ? $_[0] : 1 ); return $self; }; } foreach my $key ( @scalar_keys ) { *$key = sub { my $self = shift; return $self->{values}->{$key} if defined wantarray and !@_; $self->{values}->{$key} = shift; return $self; }; } foreach my $key ( @array_keys ) { *$key = sub { my $self = shift; return $self->{values}->{$key} if defined wantarray and !@_; $self->{values}->{$key} ||= []; push @{$self->{values}->{$key}}, @_; return $self; }; } foreach my $key ( @resource_keys ) { *$key = sub { my $self = shift; unless ( @_ ) { return () unless $self->{values}->{resources}; return map { $_->[1] } grep { $_->[0] eq $key } @{ $self->{values}->{resources} }; } return $self->{values}->{resources}->{$key} unless @_; my $uri = shift or die( "Did not provide a value to $key()" ); $self->resources( $key => $uri ); return 1; }; } foreach my $key ( grep { $_ ne "resources" } @tuple_keys) { *$key = sub { my $self = shift; return $self->{values}->{$key} unless @_; my @added; while ( @_ ) { my $module = shift or last; my $version = shift || 0; push @added, [ $module, $version ]; } push @{ $self->{values}->{$key} }, @added; return map {@$_} @added; }; } # Resource handling my %lc_resource = map { $_ => 1 } qw{ homepage license bugtracker repository }; sub resources { my $self = shift; while ( @_ ) { my $name = shift or last; my $value = shift or next; if ( $name eq lc $name and ! $lc_resource{$name} ) { die("Unsupported reserved lowercase resource '$name'"); } $self->{values}->{resources} ||= []; push @{ $self->{values}->{resources} }, [ $name, $value ]; } $self->{values}->{resources}; } # Aliases for build_requires that will have alternative # meanings in some future version of META.yml. sub test_requires { shift->build_requires(@_) } sub install_requires { shift->build_requires(@_) } # Aliases for installdirs options sub install_as_core { $_[0]->installdirs('perl') } sub install_as_cpan { $_[0]->installdirs('site') } sub install_as_site { $_[0]->installdirs('site') } sub install_as_vendor { $_[0]->installdirs('vendor') } sub dynamic_config { my $self = shift; unless ( @_ ) { warn "You MUST provide an explicit true/false value to dynamic_config\n"; return $self; } $self->{values}->{dynamic_config} = $_[0] ? 1 : 0; return 1; } sub perl_version { my $self = shift; return $self->{values}->{perl_version} unless @_; my $version = shift or die( "Did not provide a value to perl_version()" ); # Normalize the version $version = $self->_perl_version($version); # We don't support the reall old versions unless ( $version >= 5.005 ) { die "Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker)\n"; } $self->{values}->{perl_version} = $version; } sub all_from { my ( $self, $file ) = @_; unless ( defined($file) ) { my $name = $self->name or die( "all_from called with no args without setting name() first" ); $file = join('/', 'lib', split(/-/, $name)) . '.pm'; $file =~ s{.*/}{} unless -e $file; unless ( -e $file ) { die("all_from cannot find $file from $name"); } } unless ( -f $file ) { die("The path '$file' does not exist, or is not a file"); } $self->{values}{all_from} = $file; # Some methods pull from POD instead of code. # If there is a matching .pod, use that instead my $pod = $file; $pod =~ s/\.pm$/.pod/i; $pod = $file unless -e $pod; # Pull the different values $self->name_from($file) unless $self->name; $self->version_from($file) unless $self->version; $self->perl_version_from($file) unless $self->perl_version; $self->author_from($pod) unless @{$self->author || []}; $self->license_from($pod) unless $self->license; $self->abstract_from($pod) unless $self->abstract; return 1; } sub provides { my $self = shift; my $provides = ( $self->{values}->{provides} ||= {} ); %$provides = (%$provides, @_) if @_; return $provides; } sub auto_provides { my $self = shift; return $self unless $self->is_admin; unless (-e 'MANIFEST') { warn "Cannot deduce auto_provides without a MANIFEST, skipping\n"; return $self; } # Avoid spurious warnings as we are not checking manifest here. local $SIG{__WARN__} = sub {1}; require ExtUtils::Manifest; local *ExtUtils::Manifest::manicheck = sub { return }; require Module::Build; my $build = Module::Build->new( dist_name => $self->name, dist_version => $self->version, license => $self->license, ); $self->provides( %{ $build->find_dist_packages || {} } ); } sub feature { my $self = shift; my $name = shift; my $features = ( $self->{values}->{features} ||= [] ); my $mods; if ( @_ == 1 and ref( $_[0] ) ) { # The user used ->feature like ->features by passing in the second # argument as a reference. Accomodate for that. $mods = $_[0]; } else { $mods = \@_; } my $count = 0; push @$features, ( $name => [ map { ref($_) ? ( ref($_) eq 'HASH' ) ? %$_ : @$_ : $_ } @$mods ] ); return @$features; } sub features { my $self = shift; while ( my ( $name, $mods ) = splice( @_, 0, 2 ) ) { $self->feature( $name, @$mods ); } return $self->{values}->{features} ? @{ $self->{values}->{features} } : (); } sub no_index { my $self = shift; my $type = shift; push @{ $self->{values}->{no_index}->{$type} }, @_ if $type; return $self->{values}->{no_index}; } sub read { my $self = shift; $self->include_deps( 'YAML::Tiny', 0 ); require YAML::Tiny; my $data = YAML::Tiny::LoadFile('META.yml'); # Call methods explicitly in case user has already set some values. while ( my ( $key, $value ) = each %$data ) { next unless $self->can($key); if ( ref $value eq 'HASH' ) { while ( my ( $module, $version ) = each %$value ) { $self->can($key)->($self, $module => $version ); } } else { $self->can($key)->($self, $value); } } return $self; } sub write { my $self = shift; return $self unless $self->is_admin; $self->admin->write_meta; return $self; } sub version_from { require ExtUtils::MM_Unix; my ( $self, $file ) = @_; $self->version( ExtUtils::MM_Unix->parse_version($file) ); # for version integrity check $self->makemaker_args( VERSION_FROM => $file ); } sub abstract_from { require ExtUtils::MM_Unix; my ( $self, $file ) = @_; $self->abstract( bless( { DISTNAME => $self->name }, 'ExtUtils::MM_Unix' )->parse_abstract($file) ); } # Add both distribution and module name sub name_from { my ($self, $file) = @_; if ( Module::Install::_read($file) =~ m/ ^ \s* package \s* ([\w:]+) \s* ; /ixms ) { my ($name, $module_name) = ($1, $1); $name =~ s{::}{-}g; $self->name($name); unless ( $self->module_name ) { $self->module_name($module_name); } } else { die("Cannot determine name from $file\n"); } } sub _extract_perl_version { if ( $_[0] =~ m/ ^\s* (?:use|require) \s* v? ([\d_\.]+) \s* ; /ixms ) { my $perl_version = $1; $perl_version =~ s{_}{}g; return $perl_version; } else { return; } } sub perl_version_from { my $self = shift; my $perl_version=_extract_perl_version(Module::Install::_read($_[0])); if ($perl_version) { $self->perl_version($perl_version); } else { warn "Cannot determine perl version info from $_[0]\n"; return; } } sub author_from { my $self = shift; my $content = Module::Install::_read($_[0]); if ($content =~ m/ =head \d \s+ (?:authors?)\b \s* ([^\n]*) | =head \d \s+ (?:licen[cs]e|licensing|copyright|legal)\b \s* .*? copyright .*? \d\d\d[\d.]+ \s* (?:\bby\b)? \s* ([^\n]*) /ixms) { my $author = $1 || $2; # XXX: ugly but should work anyway... if (eval "require Pod::Escapes; 1") { # Pod::Escapes has a mapping table. # It's in core of perl >= 5.9.3, and should be installed # as one of the Pod::Simple's prereqs, which is a prereq # of Pod::Text 3.x (see also below). $author =~ s{ E<( (\d+) | ([A-Za-z]+) )> } { defined $2 ? chr($2) : defined $Pod::Escapes::Name2character_number{$1} ? chr($Pod::Escapes::Name2character_number{$1}) : do { warn "Unknown escape: E<$1>"; "E<$1>"; }; }gex; } elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) { # Pod::Text < 3.0 has yet another mapping table, # though the table name of 2.x and 1.x are different. # (1.x is in core of Perl < 5.6, 2.x is in core of # Perl < 5.9.3) my $mapping = ($Pod::Text::VERSION < 2) ? \%Pod::Text::HTML_Escapes : \%Pod::Text::ESCAPES; $author =~ s{ E<( (\d+) | ([A-Za-z]+) )> } { defined $2 ? chr($2) : defined $mapping->{$1} ? $mapping->{$1} : do { warn "Unknown escape: E<$1>"; "E<$1>"; }; }gex; } else { $author =~ s{E}{<}g; $author =~ s{E}{>}g; } $self->author($author); } else { warn "Cannot determine author info from $_[0]\n"; } } #Stolen from M::B my %license_urls = ( perl => 'http://dev.perl.org/licenses/', apache => 'http://apache.org/licenses/LICENSE-2.0', apache_1_1 => 'http://apache.org/licenses/LICENSE-1.1', artistic => 'http://opensource.org/licenses/artistic-license.php', artistic_2 => 'http://opensource.org/licenses/artistic-license-2.0.php', lgpl => 'http://opensource.org/licenses/lgpl-license.php', lgpl2 => 'http://opensource.org/licenses/lgpl-2.1.php', lgpl3 => 'http://opensource.org/licenses/lgpl-3.0.html', bsd => 'http://opensource.org/licenses/bsd-license.php', gpl => 'http://opensource.org/licenses/gpl-license.php', gpl2 => 'http://opensource.org/licenses/gpl-2.0.php', gpl3 => 'http://opensource.org/licenses/gpl-3.0.html', mit => 'http://opensource.org/licenses/mit-license.php', mozilla => 'http://opensource.org/licenses/mozilla1.1.php', open_source => undef, unrestricted => undef, restrictive => undef, unknown => undef, ); sub license { my $self = shift; return $self->{values}->{license} unless @_; my $license = shift or die( 'Did not provide a value to license()' ); $license = __extract_license($license) || lc $license; $self->{values}->{license} = $license; # Automatically fill in license URLs if ( $license_urls{$license} ) { $self->resources( license => $license_urls{$license} ); } return 1; } sub _extract_license { my $pod = shift; my $matched; return __extract_license( ($matched) = $pod =~ m/ (=head \d \s+ L(?i:ICEN[CS]E|ICENSING)\b.*?) (=head \d.*|=cut.*|)\z /xms ) || __extract_license( ($matched) = $pod =~ m/ (=head \d \s+ (?:C(?i:OPYRIGHTS?)|L(?i:EGAL))\b.*?) (=head \d.*|=cut.*|)\z /xms ); } sub __extract_license { my $license_text = shift or return; my @phrases = ( '(?:under )?the same (?:terms|license) as (?:perl|the perl (?:\d )?programming language)' => 'perl', 1, '(?:under )?the terms of (?:perl|the perl programming language) itself' => 'perl', 1, 'Artistic and GPL' => 'perl', 1, 'GNU general public license' => 'gpl', 1, 'GNU public license' => 'gpl', 1, 'GNU lesser general public license' => 'lgpl', 1, 'GNU lesser public license' => 'lgpl', 1, 'GNU library general public license' => 'lgpl', 1, 'GNU library public license' => 'lgpl', 1, 'GNU Free Documentation license' => 'unrestricted', 1, 'GNU Affero General Public License' => 'open_source', 1, '(?:Free)?BSD license' => 'bsd', 1, 'Artistic license 2\.0' => 'artistic_2', 1, 'Artistic license' => 'artistic', 1, 'Apache (?:Software )?license' => 'apache', 1, 'GPL' => 'gpl', 1, 'LGPL' => 'lgpl', 1, 'BSD' => 'bsd', 1, 'Artistic' => 'artistic', 1, 'MIT' => 'mit', 1, 'Mozilla Public License' => 'mozilla', 1, 'Q Public License' => 'open_source', 1, 'OpenSSL License' => 'unrestricted', 1, 'SSLeay License' => 'unrestricted', 1, 'zlib License' => 'open_source', 1, 'proprietary' => 'proprietary', 0, ); while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) { $pattern =~ s#\s+#\\s+#gs; if ( $license_text =~ /\b$pattern\b/i ) { return $license; } } return ''; } sub license_from { my $self = shift; if (my $license=_extract_license(Module::Install::_read($_[0]))) { $self->license($license); } else { warn "Cannot determine license info from $_[0]\n"; return 'unknown'; } } sub _extract_bugtracker { my @links = $_[0] =~ m#L<( https?\Q://rt.cpan.org/\E[^>]+| https?\Q://github.com/\E[\w_]+/[\w_]+/issues| https?\Q://code.google.com/p/\E[\w_\-]+/issues/list )>#gx; my %links; @links{@links}=(); @links=keys %links; return @links; } sub bugtracker_from { my $self = shift; my $content = Module::Install::_read($_[0]); my @links = _extract_bugtracker($content); unless ( @links ) { warn "Cannot determine bugtracker info from $_[0]\n"; return 0; } if ( @links > 1 ) { warn "Found more than one bugtracker link in $_[0]\n"; return 0; } # Set the bugtracker bugtracker( $links[0] ); return 1; } sub requires_from { my $self = shift; my $content = Module::Install::_readperl($_[0]); my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg; while ( @requires ) { my $module = shift @requires; my $version = shift @requires; $self->requires( $module => $version ); } } sub test_requires_from { my $self = shift; my $content = Module::Install::_readperl($_[0]); my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg; while ( @requires ) { my $module = shift @requires; my $version = shift @requires; $self->test_requires( $module => $version ); } } # Convert triple-part versions (eg, 5.6.1 or 5.8.9) to # numbers (eg, 5.006001 or 5.008009). # Also, convert double-part versions (eg, 5.8) sub _perl_version { my $v = $_[-1]; $v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e; $v =~ s/^([1-9])\.([1-9]\d?\d?)\.(0|[1-9]\d?\d?)$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e; $v =~ s/(\.\d\d\d)000$/$1/; $v =~ s/_.+$//; if ( ref($v) ) { # Numify $v = $v + 0; } return $v; } sub add_metadata { my $self = shift; my %hash = @_; for my $key (keys %hash) { warn "add_metadata: $key is not prefixed with 'x_'.\n" . "Use appopriate function to add non-private metadata.\n" unless $key =~ /^x_/; $self->{values}->{$key} = $hash{$key}; } } ###################################################################### # MYMETA Support sub WriteMyMeta { die "WriteMyMeta has been deprecated"; } sub write_mymeta_yaml { my $self = shift; # We need YAML::Tiny to write the MYMETA.yml file unless ( eval { require YAML::Tiny; 1; } ) { return 1; } # Generate the data my $meta = $self->_write_mymeta_data or return 1; # Save as the MYMETA.yml file print "Writing MYMETA.yml\n"; YAML::Tiny::DumpFile('MYMETA.yml', $meta); } sub write_mymeta_json { my $self = shift; # We need JSON to write the MYMETA.json file unless ( eval { require JSON; 1; } ) { return 1; } # Generate the data my $meta = $self->_write_mymeta_data or return 1; # Save as the MYMETA.yml file print "Writing MYMETA.json\n"; Module::Install::_write( 'MYMETA.json', JSON->new->pretty(1)->canonical->encode($meta), ); } sub _write_mymeta_data { my $self = shift; # If there's no existing META.yml there is nothing we can do return undef unless -f 'META.yml'; # We need Parse::CPAN::Meta to load the file unless ( eval { require Parse::CPAN::Meta; 1; } ) { return undef; } # Merge the perl version into the dependencies my $val = $self->Meta->{values}; my $perl = delete $val->{perl_version}; if ( $perl ) { $val->{requires} ||= []; my $requires = $val->{requires}; # Canonize to three-dot version after Perl 5.6 if ( $perl >= 5.006 ) { $perl =~ s{^(\d+)\.(\d\d\d)(\d*)}{join('.', $1, int($2||0), int($3||0))}e } unshift @$requires, [ perl => $perl ]; } # Load the advisory META.yml file my @yaml = Parse::CPAN::Meta::LoadFile('META.yml'); my $meta = $yaml[0]; # Overwrite the non-configure dependency hashs delete $meta->{requires}; delete $meta->{build_requires}; delete $meta->{recommends}; if ( exists $val->{requires} ) { $meta->{requires} = { map { @$_ } @{ $val->{requires} } }; } if ( exists $val->{build_requires} ) { $meta->{build_requires} = { map { @$_ } @{ $val->{build_requires} } }; } return $meta; } 1; kephra-0.4.3.34+dfsg.orig/inc/Module/Install/Win32.pm0000644000175000017500000000337311556012755021246 0ustar gregoagregoapackage Module::Install::Win32; use strict; use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { $VERSION = '1.01'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } # determine if the user needs nmake, and download it if needed sub check_nmake { my $self = shift; $self->load('can_run'); $self->load('get_file'); require Config; return unless ( $^O eq 'MSWin32' and $Config::Config{make} and $Config::Config{make} =~ /^nmake\b/i and ! $self->can_run('nmake') ); print "The required 'nmake' executable not found, fetching it...\n"; require File::Basename; my $rv = $self->get_file( url => 'http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe', ftp_url => 'ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe', local_dir => File::Basename::dirname($^X), size => 51928, run => 'Nmake15.exe /o > nul', check_for => 'Nmake.exe', remove => 1, ); die <<'END_MESSAGE' unless $rv; ------------------------------------------------------------------------------- Since you are using Microsoft Windows, you will need the 'nmake' utility before installation. It's available at: http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe or ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe Please download the file manually, save it to a directory in %PATH% (e.g. C:\WINDOWS\COMMAND\), then launch the MS-DOS command line shell, "cd" to that directory, and run "Nmake15.exe" from there; that will create the 'nmake.exe' file needed by this module. You may then resume the installation process described in README. ------------------------------------------------------------------------------- END_MESSAGE } 1; kephra-0.4.3.34+dfsg.orig/inc/Module/Install/Can.pm0000644000175000017500000000735611556012755021052 0ustar gregoagregoapackage Module::Install::Can; use strict; use Config (); use File::Spec (); use ExtUtils::MakeMaker (); use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { $VERSION = '1.01'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } # check if we can load some module ### Upgrade this to not have to load the module if possible sub can_use { my ($self, $mod, $ver) = @_; $mod =~ s{::|\\}{/}g; $mod .= '.pm' unless $mod =~ /\.pm$/i; my $pkg = $mod; $pkg =~ s{/}{::}g; $pkg =~ s{\.pm$}{}i; local $@; eval { require $mod; $pkg->VERSION($ver || 0); 1 }; } # check if we can run some command sub can_run { my ($self, $cmd) = @_; my $_cmd = $cmd; return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd)); for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') { next if $dir eq ''; my $abs = File::Spec->catfile($dir, $_[1]); return $abs if (-x $abs or $abs = MM->maybe_command($abs)); } return; } # can we locate a (the) C compiler sub can_cc { my $self = shift; my @chunks = split(/ /, $Config::Config{cc}) or return; # $Config{cc} may contain args; try to find out the program part while (@chunks) { return $self->can_run("@chunks") || (pop(@chunks), next); } return; } # Fix Cygwin bug on maybe_command(); if ( $^O eq 'cygwin' ) { require ExtUtils::MM_Cygwin; require ExtUtils::MM_Win32; if ( ! defined(&ExtUtils::MM_Cygwin::maybe_command) ) { *ExtUtils::MM_Cygwin::maybe_command = sub { my ($self, $file) = @_; if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) { ExtUtils::MM_Win32->maybe_command($file); } else { ExtUtils::MM_Unix->maybe_command($file); } } } } 1; __END__ =pod =head1 NAME Module::Install::Can - Utility functions for capability detection =head1 DESCRIPTION C contains a number of functions for authors to use when creating customised smarter installers. The functions simplify standard tests so that you can express your dependencies and conditions much more simply, and make your installer much easier to maintain. =head1 COMMANDS =head2 can_use can_use('Module::Name'); can_use('Module::Name', 1.23); The C function tests the ability to load a specific named module. Currently it will also actually load the module in the process, although this may change in the future. Takes an optional second param of a version number. The currently installed version of the module will be tested to make sure it is equal to or greater than the specified version. Returns true if the module can be loaded, or false (in both scalar or list context) if not. =head2 can_run can_run('cvs'); The C function tests the ability to run a named command or program on the local system. Returns true if so, or false (both in scalar and list context) if not. =head2 can_cc can_cc(); The C function test the ability to locate a C compiler on the local system. Returns true if the C compiler can be found, or false (both in scalar and list context) if not. =head1 TO DO Currently, the use of a C command in a single problem domain (for example C) results in the inclusion of additional functionality from different problem domains (for example C). This module should ultimately be broken up, and the individual functions redestributed to different domain-specific extensions. =head1 AUTHORS Audrey Tang Eautrijus@autrijus.orgE Adam Kennedy Eadamk@cpan.orgE =head1 SEE ALSO L, L =head1 COPYRIGHT Copyright 2006 Audrey Tang, Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L =cut kephra-0.4.3.34+dfsg.orig/inc/Module/Install.pm0000644000175000017500000003012511556012755020337 0ustar gregoagregoapackage Module::Install; # For any maintainers: # The load order for Module::Install is a bit magic. # It goes something like this... # # IF ( host has Module::Install installed, creating author mode ) { # 1. Makefile.PL calls "use inc::Module::Install" # 2. $INC{inc/Module/Install.pm} set to installed version of inc::Module::Install # 3. The installed version of inc::Module::Install loads # 4. inc::Module::Install calls "require Module::Install" # 5. The ./inc/ version of Module::Install loads # } ELSE { # 1. Makefile.PL calls "use inc::Module::Install" # 2. $INC{inc/Module/Install.pm} set to ./inc/ version of Module::Install # 3. The ./inc/ version of Module::Install loads # } use 5.005; use strict 'vars'; use Cwd (); use File::Find (); use File::Path (); use vars qw{$VERSION $MAIN}; BEGIN { # All Module::Install core packages now require synchronised versions. # This will be used to ensure we don't accidentally load old or # different versions of modules. # This is not enforced yet, but will be some time in the next few # releases once we can make sure it won't clash with custom # Module::Install extensions. $VERSION = '1.01'; # Storage for the pseudo-singleton $MAIN = undef; *inc::Module::Install::VERSION = *VERSION; @inc::Module::Install::ISA = __PACKAGE__; } sub import { my $class = shift; my $self = $class->new(@_); my $who = $self->_caller; #------------------------------------------------------------- # all of the following checks should be included in import(), # to allow "eval 'require Module::Install; 1' to test # installation of Module::Install. (RT #51267) #------------------------------------------------------------- # Whether or not inc::Module::Install is actually loaded, the # $INC{inc/Module/Install.pm} is what will still get set as long as # the caller loaded module this in the documented manner. # If not set, the caller may NOT have loaded the bundled version, and thus # they may not have a MI version that works with the Makefile.PL. This would # result in false errors or unexpected behaviour. And we don't want that. my $file = join( '/', 'inc', split /::/, __PACKAGE__ ) . '.pm'; unless ( $INC{$file} ) { die <<"END_DIE" } Please invoke ${\__PACKAGE__} with: use inc::${\__PACKAGE__}; not: use ${\__PACKAGE__}; END_DIE # This reportedly fixes a rare Win32 UTC file time issue, but # as this is a non-cross-platform XS module not in the core, # we shouldn't really depend on it. See RT #24194 for detail. # (Also, this module only supports Perl 5.6 and above). eval "use Win32::UTCFileTime" if $^O eq 'MSWin32' && $] >= 5.006; # If the script that is loading Module::Install is from the future, # then make will detect this and cause it to re-run over and over # again. This is bad. Rather than taking action to touch it (which # is unreliable on some platforms and requires write permissions) # for now we should catch this and refuse to run. if ( -f $0 ) { my $s = (stat($0))[9]; # If the modification time is only slightly in the future, # sleep briefly to remove the problem. my $a = $s - time; if ( $a > 0 and $a < 5 ) { sleep 5 } # Too far in the future, throw an error. my $t = time; if ( $s > $t ) { die <<"END_DIE" } Your installer $0 has a modification time in the future ($s > $t). This is known to create infinite loops in make. Please correct this, then run $0 again. END_DIE } # Build.PL was formerly supported, but no longer is due to excessive # difficulty in implementing every single feature twice. if ( $0 =~ /Build.PL$/i ) { die <<"END_DIE" } Module::Install no longer supports Build.PL. It was impossible to maintain duel backends, and has been deprecated. Please remove all Build.PL files and only use the Makefile.PL installer. END_DIE #------------------------------------------------------------- # To save some more typing in Module::Install installers, every... # use inc::Module::Install # ...also acts as an implicit use strict. $^H |= strict::bits(qw(refs subs vars)); #------------------------------------------------------------- unless ( -f $self->{file} ) { foreach my $key (keys %INC) { delete $INC{$key} if $key =~ /Module\/Install/; } local $^W; require "$self->{path}/$self->{dispatch}.pm"; File::Path::mkpath("$self->{prefix}/$self->{author}"); $self->{admin} = "$self->{name}::$self->{dispatch}"->new( _top => $self ); $self->{admin}->init; @_ = ($class, _self => $self); goto &{"$self->{name}::import"}; } local $^W; *{"${who}::AUTOLOAD"} = $self->autoload; $self->preload; # Unregister loader and worker packages so subdirs can use them again delete $INC{'inc/Module/Install.pm'}; delete $INC{'Module/Install.pm'}; # Save to the singleton $MAIN = $self; return 1; } sub autoload { my $self = shift; my $who = $self->_caller; my $cwd = Cwd::cwd(); my $sym = "${who}::AUTOLOAD"; $sym->{$cwd} = sub { my $pwd = Cwd::cwd(); if ( my $code = $sym->{$pwd} ) { # Delegate back to parent dirs goto &$code unless $cwd eq $pwd; } unless ($$sym =~ s/([^:]+)$//) { # XXX: it looks like we can't retrieve the missing function # via $$sym (usually $main::AUTOLOAD) in this case. # I'm still wondering if we should slurp Makefile.PL to # get some context or not ... my ($package, $file, $line) = caller; die <<"EOT"; Unknown function is found at $file line $line. Execution of $file aborted due to runtime errors. If you're a contributor to a project, you may need to install some Module::Install extensions from CPAN (or other repository). If you're a user of a module, please contact the author. EOT } my $method = $1; if ( uc($method) eq $method ) { # Do nothing return; } elsif ( $method =~ /^_/ and $self->can($method) ) { # Dispatch to the root M:I class return $self->$method(@_); } # Dispatch to the appropriate plugin unshift @_, ( $self, $1 ); goto &{$self->can('call')}; }; } sub preload { my $self = shift; unless ( $self->{extensions} ) { $self->load_extensions( "$self->{prefix}/$self->{path}", $self ); } my @exts = @{$self->{extensions}}; unless ( @exts ) { @exts = $self->{admin}->load_all_extensions; } my %seen; foreach my $obj ( @exts ) { while (my ($method, $glob) = each %{ref($obj) . '::'}) { next unless $obj->can($method); next if $method =~ /^_/; next if $method eq uc($method); $seen{$method}++; } } my $who = $self->_caller; foreach my $name ( sort keys %seen ) { local $^W; *{"${who}::$name"} = sub { ${"${who}::AUTOLOAD"} = "${who}::$name"; goto &{"${who}::AUTOLOAD"}; }; } } sub new { my ($class, %args) = @_; delete $INC{'FindBin.pm'}; { # to suppress the redefine warning local $SIG{__WARN__} = sub {}; require FindBin; } # ignore the prefix on extension modules built from top level. my $base_path = Cwd::abs_path($FindBin::Bin); unless ( Cwd::abs_path(Cwd::cwd()) eq $base_path ) { delete $args{prefix}; } return $args{_self} if $args{_self}; $args{dispatch} ||= 'Admin'; $args{prefix} ||= 'inc'; $args{author} ||= ($^O eq 'VMS' ? '_author' : '.author'); $args{bundle} ||= 'inc/BUNDLES'; $args{base} ||= $base_path; $class =~ s/^\Q$args{prefix}\E:://; $args{name} ||= $class; $args{version} ||= $class->VERSION; unless ( $args{path} ) { $args{path} = $args{name}; $args{path} =~ s!::!/!g; } $args{file} ||= "$args{base}/$args{prefix}/$args{path}.pm"; $args{wrote} = 0; bless( \%args, $class ); } sub call { my ($self, $method) = @_; my $obj = $self->load($method) or return; splice(@_, 0, 2, $obj); goto &{$obj->can($method)}; } sub load { my ($self, $method) = @_; $self->load_extensions( "$self->{prefix}/$self->{path}", $self ) unless $self->{extensions}; foreach my $obj (@{$self->{extensions}}) { return $obj if $obj->can($method); } my $admin = $self->{admin} or die <<"END_DIE"; The '$method' method does not exist in the '$self->{prefix}' path! Please remove the '$self->{prefix}' directory and run $0 again to load it. END_DIE my $obj = $admin->load($method, 1); push @{$self->{extensions}}, $obj; $obj; } sub load_extensions { my ($self, $path, $top) = @_; my $should_reload = 0; unless ( grep { ! ref $_ and lc $_ eq lc $self->{prefix} } @INC ) { unshift @INC, $self->{prefix}; $should_reload = 1; } foreach my $rv ( $self->find_extensions($path) ) { my ($file, $pkg) = @{$rv}; next if $self->{pathnames}{$pkg}; local $@; my $new = eval { local $^W; require $file; $pkg->can('new') }; unless ( $new ) { warn $@ if $@; next; } $self->{pathnames}{$pkg} = $should_reload ? delete $INC{$file} : $INC{$file}; push @{$self->{extensions}}, &{$new}($pkg, _top => $top ); } $self->{extensions} ||= []; } sub find_extensions { my ($self, $path) = @_; my @found; File::Find::find( sub { my $file = $File::Find::name; return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is; my $subpath = $1; return if lc($subpath) eq lc($self->{dispatch}); $file = "$self->{path}/$subpath.pm"; my $pkg = "$self->{name}::$subpath"; $pkg =~ s!/!::!g; # If we have a mixed-case package name, assume case has been preserved # correctly. Otherwise, root through the file to locate the case-preserved # version of the package name. if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) { my $content = Module::Install::_read($subpath . '.pm'); my $in_pod = 0; foreach ( split //, $content ) { $in_pod = 1 if /^=\w/; $in_pod = 0 if /^=cut/; next if ($in_pod || /^=cut/); # skip pod text next if /^\s*#/; # and comments if ( m/^\s*package\s+($pkg)\s*;/i ) { $pkg = $1; last; } } } push @found, [ $file, $pkg ]; }, $path ) if -d $path; @found; } ##################################################################### # Common Utility Functions sub _caller { my $depth = 0; my $call = caller($depth); while ( $call eq __PACKAGE__ ) { $depth++; $call = caller($depth); } return $call; } # Done in evals to avoid confusing Perl::MinimumVersion eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@; sub _read { local *FH; open( FH, '<', $_[0] ) or die "open($_[0]): $!"; my $string = do { local $/; }; close FH or die "close($_[0]): $!"; return $string; } END_NEW sub _read { local *FH; open( FH, "< $_[0]" ) or die "open($_[0]): $!"; my $string = do { local $/; }; close FH or die "close($_[0]): $!"; return $string; } END_OLD sub _readperl { my $string = Module::Install::_read($_[0]); $string =~ s/(?:\015{1,2}\012|\015|\012)/\n/sg; $string =~ s/(\n)\n*__(?:DATA|END)__\b.*\z/$1/s; $string =~ s/\n\n=\w+.+?\n\n=cut\b.+?\n+/\n\n/sg; return $string; } sub _readpod { my $string = Module::Install::_read($_[0]); $string =~ s/(?:\015{1,2}\012|\015|\012)/\n/sg; return $string if $_[0] =~ /\.pod\z/; $string =~ s/(^|\n=cut\b.+?\n+)[^=\s].+?\n(\n=\w+|\z)/$1$2/sg; $string =~ s/\n*=pod\b[^\n]*\n+/\n\n/sg; $string =~ s/\n*=cut\b[^\n]*\n+/\n\n/sg; $string =~ s/^\n+//s; return $string; } # Done in evals to avoid confusing Perl::MinimumVersion eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@; sub _write { local *FH; open( FH, '>', $_[0] ) or die "open($_[0]): $!"; foreach ( 1 .. $#_ ) { print FH $_[$_] or die "print($_[0]): $!"; } close FH or die "close($_[0]): $!"; } END_NEW sub _write { local *FH; open( FH, "> $_[0]" ) or die "open($_[0]): $!"; foreach ( 1 .. $#_ ) { print FH $_[$_] or die "print($_[0]): $!"; } close FH or die "close($_[0]): $!"; } END_OLD # _version is for processing module versions (eg, 1.03_05) not # Perl versions (eg, 5.8.1). sub _version ($) { my $s = shift || 0; my $d =()= $s =~ /(\.)/g; if ( $d >= 2 ) { # Normalise multipart versions $s =~ s/(\.)(\d{1,3})/sprintf("$1%03d",$2)/eg; } $s =~ s/^(\d+)\.?//; my $l = $1 || 0; my @v = map { $_ . '0' x (3 - length $_) } $s =~ /(\d{1,3})\D?/g; $l = $l . '.' . join '', @v if @v; return $l + 0; } sub _cmp ($$) { _version($_[0]) <=> _version($_[1]); } # Cloned from Params::Util::_CLASS sub _CLASS ($) { ( defined $_[0] and ! ref $_[0] and $_[0] =~ m/^[^\W\d]\w*(?:::\w+)*\z/s ) ? $_[0] : undef; } 1; # Copyright 2008 - 2011 Adam Kennedy. kephra-0.4.3.34+dfsg.orig/share/0000755000175000017500000000000012300715027015464 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/share/config/0000755000175000017500000000000012300715027016731 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/share/config/macro/0000755000175000017500000000000012300715027020032 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/share/config/macro/test.macro0000644000175000017500000000000011573645306022037 0ustar gregoagregoakephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/0000755000175000017500000000000012300715027022476 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/baan.pm0000644000175000017500000000165411573645307023761 0ustar gregoagregoapackage syntaxhighlighter::baan; $VERSION = '0.01'; use Wx qw(wxSTC_LEX_BAAN); sub load { $_[0]->SetLexer( wxSTC_LEX_BAAN ); $_[0]->SetKeyWords(0,''); $_[0]->StyleSetSpec( 0,"fore:#808080"); # White space $_[0]->StyleSetSpec( 1,"fore:#aaaaaa"); # Comment $_[0]->StyleSetSpec( 2,"fore:#aaaaaa,back:#E0C0E0");# Doc comment $_[0]->StyleSetSpec( 3,"fore:#007f7f"); # Number $_[0]->StyleSetSpec( 4,"fore:#000077,bold"); # Keyword $_[0]->StyleSetSpec( 5,"fore:#ee7b00,back:#fff8f8");# Double quoted string $_[0]->StyleSetSpec( 6,"fore:#800080"); # Preprocessor $_[0]->StyleSetSpec( 7,"fore:#B06000"); # Operators $_[0]->StyleSetSpec( 8,"fore:#000077"); # Identifiers $_[0]->StyleSetSpec( 9,"fore:#000000,back:#E0C0E0,eolfilled");# End of line where string is not closed $_[0]->StyleSetSpec(10,"fore:#B00040"); # Operator: * ? < > | $_[0]->StyleSetSpec(32,"fore:#000000"); # Default } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/ada.pm0000644000175000017500000000274011573645307023602 0ustar gregoagregoapackage syntaxhighlighter::ada; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_ADA wxSTC_H_TAG); $_[0]->SetLexer( wxSTC_LEX_ADA ); $_[0]->SetKeyWords(0,'abort abstract accept access aliased all array at begin body \ case constant declare delay delta digits do else elsif end entry exception exit for \ function generic goto if in is limited loop new null of others out package pragma \ private procedure protected raise range record renames requeue return reverse \ select separate subtype tagged task terminate then type until use when while with \ abs and mod not or rem xor'); # Keywords for operators in the last line # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec( 0,"fore:#000000"); # Default $_[0]->StyleSetSpec( 1,"fore:#447744,bold"); # Keyword $_[0]->StyleSetSpec( 2,"fore:#3350ff"); # Identifiers $_[0]->StyleSetSpec( 3,"fore:#007f7f"); # Number $_[0]->StyleSetSpec( 4,"fore:#7f2020"); # Operators (delimiters) $_[0]->StyleSetSpec( 5,"fore:#208820"); # Character $_[0]->StyleSetSpec( 6,"fore:#882020,eolfilled"); # End of line where character is not closed $_[0]->StyleSetSpec( 7,"fore:#207474"); # String $_[0]->StyleSetSpec( 8,"fore:#209999,eolfilled"); # End of line where string is not closed $_[0]->StyleSetSpec( 9,"fore:#7F0000"); # Label $_[0]->StyleSetSpec(10,"fore:#aaaaaa"); # Comment $_[0]->StyleSetSpec(11,"fore:#FF0000"); # Illegal token } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/idl.pm0000644000175000017500000000637111573645307023631 0ustar gregoagregoapackage syntaxhighlighter::idl; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_CPP wxSTC_H_TAG); my $idl_keywords = 'aggregatable allocate appobject arrays async async_uuid \ auto_handle bindable boolean broadcast byte byte_count \ call_as callback char coclass code comm_status \ const context_handle context_handle_noserialize \ context_handle_serialize control cpp_quote custom \ decode default defaultbind defaultcollelem \ defaultvalue defaultvtable dispinterface displaybind dllname \ double dual enable_allocate encode endpoint entry enum error_status_t \ explicit_handle fault_status first_is float \ handle_t heap helpcontext helpfile helpstring \ helpstringcontext helpstringdll hidden hyper \ id idempotent ignore iid_as iid_is immediatebind implicit_handle \ import importlib in include in_line int __int64 __int3264 interface \ last_is lcid length_is library licensed local long \ max_is maybe message methods midl_pragma \ midl_user_allocate midl_user_free min_is module ms_union \ ncacn_at_dsp ncacn_dnet_nsp ncacn_http ncacn_ip_tcp \ ncacn_nb_ipx ncacn_nb_nb ncacn_nb_tcp ncacn_np \ ncacn_spx ncacn_vns_spp ncadg_ip_udp ncadg_ipx ncadg_mq \ ncalrpc nocode nonbrowsable noncreatable nonextensible notify \ object odl oleautomation optimize optional out out_of_line \ pipe pointer_default pragma properties propget propput propputref \ ptr public range readonly ref represent_as requestedit restricted retval \ shape short signed size_is small source strict_context_handle \ string struct switch switch_is switch_type \ transmit_as typedef uidefault union unique unsigned user_marshal usesgetlasterror uuid \ v1_enum vararg version void wchar_t wire_marshal'; $_[0]->SetLexer(wxSTC_LEX_CPP); # Set Lexers to use $_[0]->SetKeyWords(0,$idl_keywords); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); $_[0]->StyleSetSpec(0,"fore:#202020"); # White space $_[0]->StyleSetSpec(1,"fore:#bbbbbb"); # Comment $_[0]->StyleSetSpec(2,"fore:#cccccc)"); # Line Comment $_[0]->StyleSetSpec(3,"fore:#004000"); # Doc comment $_[0]->StyleSetSpec(4,"fore:#007f7f"); # Number $_[0]->StyleSetSpec(5,"fore:#7788bb,bold"); # Keywords $_[0]->StyleSetSpec(6,"fore:#555555,back:#ddeecc"); # Doublequoted string $_[0]->StyleSetSpec(7,"fore:#555555,back:#eeeebb"); # Single quoted string $_[0]->StyleSetSpec(8,"fore:#55ffff"); # UUIDs (only in IDL) $_[0]->StyleSetSpec(9,"fore:#228833"); # Preprocessor $_[0]->StyleSetSpec(10,"fore:#bb7799,bold"); # Operators $_[0]->StyleSetSpec(11,"fore:#778899"); # Identifiers (functions, etc.) $_[0]->StyleSetSpec(12,"fore:#228822"); # End of line where string is not closed $_[0]->StyleSetSpec(13,"fore:#339933"); # Verbatim strings for C# $_[0]->StyleSetSpec(14,"fore:#44aa44"); # Regular expressions for JavaScript $_[0]->StyleSetSpec(15,"fore:#55bb55"); # Doc Comment Line $_[0]->StyleSetSpec(17,"fore:#000000,back:#A0FFA0"); # Comment keyword $_[0]->StyleSetSpec(18,"fore:#000000,back:#F0E080"); # Comment keyword error # Braces are only matched in operator style braces.cpp.style=10 $_[0]->StyleSetSpec(32,"fore:#000000"); # Default } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/xml.pm0000644000175000017500000000456011573645307023657 0ustar gregoagregoapackage syntaxhighlighter::xml; $VERSION = '0.02'; sub load{ use Wx qw(wxSTC_LEX_XML wxSTC_H_TAG); $_[0]->SetLexer( wxSTC_LEX_XML ); # Set Lexers to use $_[0]->SetKeyWords(1,""); # Add new keyword. $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec(0,"fore:#995544,bold"); # Text $_[0]->StyleSetSpec(1,"fore:#222288"); # Tags $_[0]->StyleSetSpec(2,"fore:#222288,back:#FFFFFF"); # Unknown TagsFFE0E0 $_[0]->StyleSetSpec(3,"fore:#008800"); # Attributes $_[0]->StyleSetSpec(4,"fore:#004040,back:#FFFFFF"); # Unknown Attributes#FFE0E0 $_[0]->StyleSetSpec(5,"fore:#007f7f,bold"); # Numbers $_[0]->StyleSetSpec(6,"fore:#dd5544"); # Double quoted strings $_[0]->StyleSetSpec(7,"fore:#dd5544"); # Single quoted string $_[0]->StyleSetSpec(8,"fore:#bbbb44"); # Other inside tag $_[0]->StyleSetSpec(9,"fore:#bbbbbb"); # Comment $_[0]->StyleSetSpec(10,"fore:#004000,bold"); # Entities $_[0]->StyleSetSpec(11,"fore:#000000,bold"); # XML style tag ends '/>' $_[0]->StyleSetSpec(12,"fore:#228822"); # XML identifier start 'StyleSetSpec(13,"fore:#339933"); # XML identifier end '?>' $_[0]->StyleSetSpec(14,"fore:#44aa44"); # SCRIPT $_[0]->StyleSetSpec(15,"fore:#55bb55"); $_[0]->StyleSetSpec(17,"fore:#000000,back:#A0FFA0"); # CDATA $_[0]->StyleSetSpec(18,"fore:#000000,back:#F0E080"); # Question $_[0]->StyleSetSpec(19,"fore:#FFFF00,back:#8080A0"); # Unquoted Value $_[0]->StyleSetSpec(20,"fore:#FFFF00,back:#A08080"); $_[0]->StyleSetSpec(21,"fore:#600000,back:#FFF0D8"); $_[0]->StyleSetSpec(22,"fore:#000000,back:#DDD0DD"); $_[0]->StyleSetSpec(23,"fore:#7F007F,back:#DDD0DD,notbold"); $_[0]->StyleSetSpec(24,"fore:#7F007F,back:#DDD0DD,bold"); $_[0]->StyleSetSpec(25,"fore:#7F007F,back:#DDD0DD,italics"); $_[0]->StyleSetSpec(26,"fore:#7F007F,notbold"); $_[0]->StyleSetSpec(27,"fore:#000000"); $_[0]->StyleSetSpec(28,"fore:#000000"); $_[0]->StyleSetSpec(29,"fore:#000000"); $_[0]->StyleSetSpec(30,"fore:#000000"); $_[0]->StyleSetSpec(31,"fore:#000000"); # No brace matching in XML } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/context.pm0000644000175000017500000001755311573645307024551 0ustar gregoagregoapackage syntaxhighlighter::context; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_TEX wxSTC_H_TAG); my $tex_primitives = 'above abovedisplayshortskip abovedisplayskip abovewithdelims accent adjdemerits advance afterassignment aftergroup atop atopwithdelims badness baselineskip batchmode begingroup belowdisplayshortskip belowdisplayskip binoppenalty botmark box boxmaxdepth brokenpenalty catcode char chardef cleaders closein closeout clubpenalty copy count countdef cr crcr csname day deadcycles def defaulthyphenchar defaultskewchar delcode delimiter delimiterfactor delimeters delimitershortfall delimeters dimen dimendef discretionary displayindent displaylimits displaystyle displaywidowpenalty displaywidth divide doublehyphendemerits dp dump edef else emergencystretch end endcsname endgroup endinput endlinechar eqno errhelp errmessage errorcontextlines errorstopmode escapechar everycr everydisplay everyhbox everyjob everymath everypar everyvbox exhyphenpenalty expandafter fam fi finalhyphendemerits firstmark floatingpenalty font fontdimen fontname futurelet gdef global group globaldefs halign hangafter hangindent hbadness hbox hfil horizontal hfill horizontal hfilneg hfuzz hoffset holdinginserts hrule hsize hskip hss horizontal ht hyphenation hyphenchar hyphenpenalty hyphen if ifcase ifcat ifdim ifeof iffalse ifhbox ifhmode ifinner ifmmode ifnum ifodd iftrue ifvbox ifvmode ifvoid ifx ignorespaces immediate indent input inputlineno input insert insertpenalties interlinepenalty jobname kern language lastbox lastkern lastpenalty lastskip lccode leaders left lefthyphenmin leftskip leqno let limits linepenalty line lineskip lineskiplimit long looseness lower lowercase mag mark mathaccent mathbin mathchar mathchardef mathchoice mathclose mathcode mathinner mathop mathopen mathord mathpunct mathrel mathsurround maxdeadcycles maxdepth meaning medmuskip message mkern month moveleft moveright mskip multiply muskip muskipdef newlinechar noalign noboundary noexpand noindent nolimits nonscript scriptscript nonstopmode nulldelimiterspace nullfont number omit openin openout or outer output outputpenalty over overfullrule overline overwithdelims pagedepth pagefilllstretch pagefillstretch pagefilstretch pagegoal pageshrink pagestretch pagetotal par parfillskip parindent parshape parskip patterns pausing penalty postdisplaypenalty predisplaypenalty predisplaysize pretolerance prevdepth prevgraf radical raise read relax relpenalty right righthyphenmin rightskip romannumeral scriptfont scriptscriptfont scriptscriptstyle scriptspace scriptstyle scrollmode setbox setlanguage sfcode shipout show showbox showboxbreadth showboxdepth showlists showthe skewchar skip skipdef spacefactor spaceskip span special splitbotmark splitfirstmark splitmaxdepth splittopskip string tabskip textfont textstyle the thickmuskip thinmuskip time toks toksdef tolerance topmark topskip tracingcommands tracinglostchars tracingmacros tracingonline tracingoutput tracingpages tracingparagraphs tracingrestores tracingstats uccode uchyph underline unhbox unhcopy unkern unpenalty unskip unvbox unvcopy uppercase vadjust valign vbadness vbox vcenter vfil vfill vfilneg vfuzz voffset vrule vsize vskip vsplit vss vtop wd widowpenalty write xdef xleaders xspaceskip year'; my $etex_primitives = 'beginL beginR botmarks clubpenalties currentgrouplevel currentgrouptype currentifbranch currentiflevel currentiftype detokenize dimexpr displaywidowpenalties endL endR eTeXrevision eTeXversion everyeof firstmarks fontchardp fontcharht fontcharic fontcharwd glueexpr glueshrink glueshrinkorder gluestretch gluestretchorder gluetomu ifcsname ifdefined iffontchar interactionmode interactionmode interlinepenalties lastlinefit lastnodetype marks topmarks middle muexpr mutoglue numexpr pagediscards parshapedimen parshapeindent parshapelength predisplaydirection savinghyphcodes savingvdiscards scantokens showgroups showifs showtokens splitdiscards splitfirstmarks TeXXeTstate tracingassigns tracinggroups tracingifs tracingnesting tracingscantokens unexpanded unless widowpenalties'; my $pdftex_primitives = 'pdfadjustspacing pdfannot pdfavoidoverfull pdfcatalog pdfcompresslevel pdfdecimaldigits pdfdest pdfdestmargin pdfendlink pdfendthread pdffontattr pdffontexpand pdffontname pdffontobjnum pdffontsize pdfhorigin pdfimageresolution pdfincludechars pdfinfo pdflastannot pdflastdemerits pdflastobj pdflastvbreakpenalty pdflastxform pdflastximage pdflastximagepages pdflastxpos pdflastypos pdflinesnapx pdflinesnapy pdflinkmargin pdfliteral pdfmapfile pdfmaxpenalty pdfminpenalty pdfmovechars pdfnames pdfobj pdfoptionpdfminorversion pdfoutline pdfoutput pdfpageattr pdfpageheight pdfpageresources pdfpagesattr pdfpagewidth pdfpkresolution pdfprotrudechars pdfrefobj pdfrefxform pdfrefximage pdfsavepos pdfsnaprefpoint pdfsnapx pdfsnapy pdfstartlink pdfstartthread pdftexrevision pdftexversion pdfthread pdfthreadmargin pdfuniqueresname pdfvorigin pdfxform pdfximage'; my $omega_primitives = 'odelimiter omathaccent omathchar oradical omathchardef omathcode odelcode leftghost rightghost charwd charht chardp charit localleftbox localrightbox localinterlinepenalty localbrokenpenalty pagedir bodydir pardir textdir mathdir boxdir nextfakemath pagewidth pageheight pagerightoffset pagebottomoffset nullocp nullocplist ocp externalocp ocplist pushocplist popocplist clearocplists ocptracelevel addbeforeocplist addafterocplist removebeforeocplist removeafterocplist OmegaVersion InputTranslation OutputTranslation DefaultInputTranslation DefaultOutputTranslation noInputTranslation noOutputTranslation InputMode OutputMode DefaultInputMode DefaultOutputMode noInputMode noOutputMode noDefaultInputMode noDefaultOutputMode'; # only the macros that make sense: my $partial_tex_macros = 'TeX bgroup egroup endgraf space empty null newcount newdimen newskip newmuskip newbox newtoks newhelp newread newwrite newfam newlanguage newinsert newif maxdimen magstephalf magstep frenchspacing nonfrenchspacing normalbaselines obeylines obeyspaces raggedright ttraggedright thinspace negthinspace enspace enskip quad qquad smallskip medskip bigskip removelastskip topglue vglue hglue break nobreak allowbreak filbreak goodbreak smallbreak medbreak bigbreak line leftline rightline centerline rlap llap underbar strutbox strut cases matrix pmatrix bordermatrix eqalign displaylines eqalignno leqalignno pageno folio tracingall showhyphens fmtname fmtversion hphantom vphantom phantom smash'; my $partial_etex_macros = 'eTeX newmarks grouptype interactionmode nodetype iftype tracingall loggingall tracingnone'; $_[0]->SetLexer(wxSTC_LEX_TEX); # Set Lexers to use $_[0]->SetKeyWords(0,$tex_primitives.$partial_tex_macros); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); $_[0]->StyleSetSpec(0,"fore:#202020"); # Default $_[0]->StyleSetSpec(1,"fore:#007f7f"); # Special $_[0]->StyleSetSpec(2,"fore:#7f0000)"); # Group $_[0]->StyleSetSpec(3,"fore:#7f7f00"); # Symbol $_[0]->StyleSetSpec(4,"fore:#007f00"); # Command $_[0]->StyleSetSpec(5,"fore:#000000"); # Text $_[0]->StyleSetSpec(34,"fore:#00007f"); # Identifiers $_[0]->StyleSetSpec(35,"fore:#7f007f"); # Identifiers } 1;kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/pascal.pm0000644000175000017500000000356411573645307024325 0ustar gregoagregoapackage syntaxhighlighter::pascal; $VERSION = '0.01'; sub load { use Wx qw(wxSTC_LEX_PASCAL wxSTC_H_TAG); $_[0]->SetLexer( wxSTC_LEX_PASCAL ); # Set Lexers to use $_[0]->SetKeyWords(0,'and array asm begin case cdecl class const constructor default \ destructor div do downto else end end. except exit exports external far file \ finalization finally for function goto if implementation in index inherited \ initialization inline interface label library message mod near nil not \ object of on or out overload override packed pascal private procedure program \ property protected public published raise read record register repeat resourcestring \ safecall set shl shr stdcall stored string then threadvar to try type unit \ until uses var virtual while with write xor'); # Add new keyword. # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec(0,"fore:#000000"); # White space $_[0]->StyleSetSpec(1,"fore:#aaaaaa)"); # Comment $_[0]->StyleSetSpec(2,"fore:#ff0000"); # Line Comment $_[0]->StyleSetSpec(3,"fore:#004000"); # Doc Comment $_[0]->StyleSetSpec(4,"fore:#007f7f"); # Number $_[0]->StyleSetSpec(5,"fore:#000077,bold"); # Keywords $_[0]->StyleSetSpec(6,"fore:#ee7b00,back:#fff8f8,italics");# Doublequoted string $_[0]->StyleSetSpec(7,"fore:#f36600,back:#f8fff8,italics");# Single quoted string $_[0]->StyleSetSpec(8,"fore:#007F7F"); # Symbols $_[0]->StyleSetSpec(9,"fore:#7F7F00"); # Preprocessor $_[0]->StyleSetSpec(10,"fore:#aa9900,bold"); # Operators $_[0]->StyleSetSpec(14,"fore:#ffffff,back:#000000"); # Inline Asm $_[0]->StyleSetSpec(32,"fore:#800000"); # Default/Identifiers $_[0]->StyleSetSpec(34,"fore:#0000FF"); # Brace highlight $_[0]->StyleSetSpec(35,"fore:#FF0000"); # Brace incomplete highlight } 1;kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/property.pm0000644000175000017500000000123011573645307024732 0ustar gregoagregoapackage syntaxhighlighter::property; $VERSION = '0.01'; use Wx qw(wxSTC_LEX_PROPERTIES); sub load { $_[0]->SetLexer( wxSTC_LEX_PROPERTIES ); $_[0]->SetKeyWords(0,''); $_[0]->StyleSetSpec( 0,"fore:#000000"); # Default $_[0]->StyleSetSpec( 1,"fore:#aaaaaa"); # Comment $_[0]->StyleSetSpec( 2,"fore:#0000ff"); # Section $_[0]->StyleSetSpec( 3,"fore:#ff0000"); # Assignment operator $_[0]->StyleSetSpec( 4,"fore:#007700"); # Default value (@) $_[0]->StyleSetSpec( 5,"fore:#007b7b"); # Key $_[0]->StyleSetSpec(34,"fore:#0000ff,notbold");# Matched Operators $_[0]->StyleSetSpec(35,"fore:#ff0000,notbold");# Matched Operators } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/err.pm0000644000175000017500000000342711573645307023650 0ustar gregoagregoapackage syntaxhighlighter::err; $VERSION = '0.01'; use Wx qw(wxSTC_LEX_ERRORLIST); sub load{ $_[0]->SetLexer( wxSTC_LEX_ERRORLIST ); $_[0]->SetKeyWords(0,''); $_[0]->StyleSetSpec( 0,"fore:#000000"); # Default $_[0]->StyleSetSpec( 1,"fore:#ff0000"); # python Error $_[0]->StyleSetSpec( 2,"fore:#800080"); # gcc Error $_[0]->StyleSetSpec( 3,"fore:#808000"); # Microsoft Error $_[0]->StyleSetSpec( 4,"fore:#0000ff"); # command or return status $_[0]->StyleSetSpec( 5,"fore:#b06000"); # Borland error and warning messages $_[0]->StyleSetSpec( 6,"fore:#ff0000"); # perl error and warning messages $_[0]->StyleSetSpec( 7,"fore:#ff0000"); # .NET tracebacks $_[0]->StyleSetSpec( 8,"back:#ff0000"); # Lua error and warning messages $_[0]->StyleSetSpec( 9,"fore:#ff00ff"); # ctags $_[0]->StyleSetSpec(10,"fore:#007f00"); # diff changed ! $_[0]->StyleSetSpec(11,"fore:#00007f"); # diff addition + $_[0]->StyleSetSpec(12,"fore:#007F7F"); # diff deletion - $_[0]->StyleSetSpec(13,"fore:#7f0000"); # diff message --- $_[0]->StyleSetSpec(14,"fore:#ff0000"); # PHP error $_[0]->StyleSetSpec(15,"fore:#ff0000"); # Essential Lahey Fortran 90 error $_[0]->StyleSetSpec(16,"fore:#ff0000"); # Intel Fortran Compiler error $_[0]->StyleSetSpec(17,"fore:#ff0000"); # Intel Fortran Compiler v8.0 error/warning $_[0]->StyleSetSpec(18,"fore:#ff0000"); # Absoft Pro Fortran 90/95 v8.2 error or warning $_[0]->StyleSetSpec(19,"fore:#ff0000"); # HTML Tidy $_[0]->StyleSetSpec(20,"fore:#ff0000"); # Java runtime stack trace $_[0]->StyleSetSpec(21,"fore:#000000"); # Text matched with find in files and message part of GCC errors $_[0]->StyleSetSpec(32,"fore:#B06000,small"); # $_[0]->StyleSetSpec(33,"fore:#000000,small"); # Ensures that spacing is not affected by line number styles } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/ps.pm0000644000175000017500000001466611573645307023511 0ustar gregoagregoapackage syntaxhighlighter::ps; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_PS wxSTC_H_TAG); # Postscript level 1 operators my $ps_keywords = 'FontDirectory StandardEncoding UserObjects abs add aload anchorsearch and arc arcn arcto array ashow astore atan awidthshow begin bind bitshift bytesavailable cachestatus ceiling charpath clear cleardictstack cleartomark clip clippath closefile closepath concat concatmatrix copy copypage cos count countdictstack countexecstack counttomark currentcmykcolor currentcolorspace currentdash currentdict currentfile currentflat currentfont currentgray currenthsbcolor currentlinecap currentlinejoin currentlinewidth currentmatrix currentmiterlimit currentpagedevice currentpoint currentrgbcolor currentscreen currenttransfer cvi cvlit cvn cvr cvrs cvs cvx def defaultmatrix definefont dict dictstack div dtransform dup echo end eoclip eofill eq erasepage errordict exch exec execstack executeonly executive exit exp false file fill findfont flattenpath floor flush flushfile for forall ge get getinterval grestore grestoreall gsave gt idetmatrix idiv idtransform if ifelse image imagemask index initclip initgraphics initmatrix inustroke invertmatrix itransform known kshow le length lineto ln load log loop lt makefont mark matrix maxlength mod moveto mul ne neg newpath noaccess nor not null nulldevice or pathbbox pathforall pop print prompt pstack put putinterval quit rand rcheck rcurveto read readhexstring readline readonly readstring rectstroke repeat resetfile restore reversepath rlineto rmoveto roll rotate round rrand run save scale scalefont search setblackgeneration setcachedevice setcachelimit setcharwidth setcolorscreen setcolortransfer setdash setflat setfont setgray sethsbcolor setlinecap setlinejoin setlinewidth setmatrix setmiterlimit setpagedevice setrgbcolor setscreen settransfer setvmthreshold show showpage sin sqrt srand stack start status statusdict stop stopped store string stringwidth stroke strokepath sub systemdict token token transform translate true truncate type ueofill undefineresource userdict usertime version vmstatus wcheck where widthshow write writehexstring writestring xcheck xor'; # Postscript level 2 operators my $ps_keywords2 = 'GlobalFontDirectory ISOLatin1Encoding SharedFontDirectory UserObject arct colorimage cshow currentblackgeneration currentcacheparams currentcmykcolor currentcolor currentcolorrendering currentcolorscreen currentcolorspace currentcolortransfer currentdevparams currentglobal currentgstate currenthalftone currentobjectformat currentoverprint currentpacking currentpagedevice currentshared currentstrokeadjust currentsystemparams currentundercolorremoval currentuserparams defineresource defineuserobject deletefile execform execuserobject filenameforall fileposition filter findencoding findresource gcheck globaldict glyphshow gstate ineofill infill instroke inueofill inufill inustroke languagelevel makepattern packedarray printobject product realtime rectclip rectfill rectstroke renamefile resourceforall resourcestatus revision rootfont scheck selectfont serialnumber setbbox setblackgeneration setcachedevice2 setcacheparams setcmykcolor setcolor setcolorrendering setcolorscreen setcolorspace setcolortranfer setdevparams setfileposition setglobal setgstate sethalftone setobjectformat setoverprint setpacking setpagedevice setpattern setshared setstrokeadjust setsystemparams setucacheparams setundercolorremoval setuserparams setvmthreshold shareddict startjob uappend ucache ucachestatus ueofill ufill undef undefinefont undefineresource undefineuserobject upath ustroke ustrokepath vmreclaim writeobject xshow xyshow yshow'; # Postscript level 3 operators my $ps_keywords3 = 'cliprestore clipsave composefont currentsmoothness findcolorrendering setsmoothness shfill'; # RIP-specific operators (Ghostscript) my $ps_keywords4 = '.begintransparencygroup .begintransparencymask .bytestring .charboxpath .currentaccuratecurves .currentblendmode .currentcurvejoin .currentdashadapt .currentdotlength .currentfilladjust2 .currentlimitclamp .currentopacityalpha .currentoverprintmode .currentrasterop .currentshapealpha .currentsourcetransparent .currenttextknockout .currenttexturetransparent .dashpath .dicttomark .discardtransparencygroup .discardtransparencymask .endtransparencygroup .endtransparencymask .execn .filename .filename .fileposition .forceput .forceundef .forgetsave .getbitsrect .getdevice .inittransparencymask .knownget .locksafe .makeoperator .namestring .oserrno .oserrorstring .peekstring .rectappend .runandhide .setaccuratecurves .setblendmode .setcurvejoin .setdashadapt .setdebug .setdefaultmatrix .setdotlength .setfilladjust2 .setlimitclamp .setmaxlength .setopacityalpha .setoverprintmode .setrasterop .setsafe .setshapealpha .setsourcetransparent .settextknockout .settexturetransparent .stringbreak .stringmatch .tempfile .type1decrypt .type1encrypt .type1execchar .unread arccos arcsin copydevice copyscanlines currentdevice finddevice findlibfile findprotodevice flushpage getdeviceprops getenv makeimagedevice makewordimagedevice max min putdeviceprops setdevice'; $_[0]->SetLexer(wxSTC_LEX_PS); # Set Lexers to use $_[0]->SetKeyWords(0,$ps_keywords1); $_[0]->SetKeyWords(1,$ps_keywords2); $_[0]->SetKeyWords(2,$ps_keywords3); $_[0]->SetKeyWords(3,$ps_keywords4); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec( 0,"fore:#000000"); # Default $_[0]->StyleSetSpec( 1,"fore:#bbbbbb"); # Comment $_[0]->StyleSetSpec( 2,"fore:#aaaaaa,back:#EEffEE"); # DSC comment $_[0]->StyleSetSpec( 3,"fore:#999999,back:#EEffEE"); # DSC comment value $_[0]->StyleSetSpec( 4,"fore:#007f7f"); # Number $_[0]->StyleSetSpec( 5,"fore:#00007f"); # Name $_[0]->StyleSetSpec( 6,"fore:#CC3300,bold"); # Keyword $_[0]->StyleSetSpec( 7,"fore:#ff9900"); # Literal $_[0]->StyleSetSpec( 8,"fore:#ffbb00"); # Immediately evaluated literal $_[0]->StyleSetSpec( 9,"fore:#7f007f"); # Array parenthesis $_[0]->StyleSetSpec(10,"fore:#9fcc9f"); # Dictionary parenthesis $_[0]->StyleSetSpec(11,"fore:#007f00"); # Procedure parenthesis $_[0]->StyleSetSpec(12,"fore:#000000"); # Text $_[0]->StyleSetSpec(13,"fore:#000000,back:#EEEEEE"); # Hex string $_[0]->StyleSetSpec(14,"fore:#000000,back:#dddddd"); # Base85 string $_[0]->StyleSetSpec(15,"fore:#ff0000"); # Bad string character } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/eiffel.pm0000644000175000017500000000257711573645307024317 0ustar gregoagregoapackage syntaxhighlighter::eiffel; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_EIFFEL wxSTC_H_TAG); $_[0]->SetLexer( wxSTC_LEX_EIFFEL ); # Set Lexers to use $_[0]->SetKeyWords(0,'alias all and any as bit boolean \ check class character clone create creation current \ debug deferred div do double \ else elseif end ensure equal expanded export external \ false feature forget from frozen general \ if implies indexing infix inherit inspect integer invariant is \ language like local loop mod name nochange none not \ obsolete old once or platform pointer prefix precursor \ real redefine rename require rescue result retry \ select separate string strip then true undefine unique until \ variant void when xor'); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec( 0,"fore:#000000"); # Default $_[0]->StyleSetSpec( 1,"fore:#447744"); # Line Comment $_[0]->StyleSetSpec( 2,"fore:#007f7f"); # Number $_[0]->StyleSetSpec( 3,"fore:#000077,bold"); # Keyword $_[0]->StyleSetSpec( 4,"fore:#208820"); # String $_[0]->StyleSetSpec( 5,"fore:#20bb20"); # Character $_[0]->StyleSetSpec( 6,"fore:#882020"); # Operators $_[0]->StyleSetSpec( 7,"fore:#777720"); # Identifier $_[0]->StyleSetSpec( 8,"fore:#209920,eolfilled"); # End of line where string is not closed } 1;kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/as.pm0000644000175000017500000000374311573645307023464 0ustar gregoagregoapackage syntaxhighlighter::as; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_CPP wxSTC_H_TAG); my $cs_keywords = 'add and break case class continue default delete \ dynamic else eq extends false for function ge get gt if implements import in \ instanceof interface intrinsic le lt ne new not null on or private public \ return set static switch super this true typeof undefined var void while with'; $_[0]->SetLexer(wxSTC_LEX_CPP); # Set Lexers to use $_[0]->SetKeyWords(0,$cs_keywords); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); $_[0]->StyleSetSpec(0,"fore:#202020"); # White space $_[0]->StyleSetSpec(1,"fore:#bbbbbb"); # Comment $_[0]->StyleSetSpec(2,"fore:#cccccc)"); # Line Comment $_[0]->StyleSetSpec(3,"fore:#004000"); # Doc comment $_[0]->StyleSetSpec(4,"fore:#007f7f"); # Number $_[0]->StyleSetSpec(5,"fore:#7788bb,bold"); # Keywords $_[0]->StyleSetSpec(6,"fore:#555555,back:#ddeecc"); # Doublequoted string $_[0]->StyleSetSpec(7,"fore:#555555,back:#eeeebb"); # Single quoted string $_[0]->StyleSetSpec(8,"fore:#55ffff"); # UUIDs (only in IDL) $_[0]->StyleSetSpec(9,"fore:#228833"); # Preprocessor $_[0]->StyleSetSpec(10,"fore:#bb7799,bold"); # Operators $_[0]->StyleSetSpec(11,"fore:#778899"); # Identifiers (functions, etc.) $_[0]->StyleSetSpec(12,"fore:#228822"); # End of line where string is not closed $_[0]->StyleSetSpec(13,"fore:#339933"); # Verbatim strings for C# $_[0]->StyleSetSpec(14,"fore:#44aa44"); # Regular expressions for JavaScript $_[0]->StyleSetSpec(15,"fore:#55bb55"); # Doc Comment Line $_[0]->StyleSetSpec(17,"fore:#000000,back:#A0FFA0"); # Comment keyword $_[0]->StyleSetSpec(18,"fore:#000000,back:#F0E080"); # Comment keyword error # Braces are only matched in operator style braces.cpp.style=10 $_[0]->StyleSetSpec(32,"fore:#000000"); # Default } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/tex.pm0000644000175000017500000001754711573645307023670 0ustar gregoagregoapackage syntaxhighlighter::tex; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_TEX wxSTC_H_TAG); my $tex_primitives = 'above abovedisplayshortskip abovedisplayskip abovewithdelims accent adjdemerits advance afterassignment aftergroup atop atopwithdelims badness baselineskip batchmode begingroup belowdisplayshortskip belowdisplayskip binoppenalty botmark box boxmaxdepth brokenpenalty catcode char chardef cleaders closein closeout clubpenalty copy count countdef cr crcr csname day deadcycles def defaulthyphenchar defaultskewchar delcode delimiter delimiterfactor delimeters delimitershortfall delimeters dimen dimendef discretionary displayindent displaylimits displaystyle displaywidowpenalty displaywidth divide doublehyphendemerits dp dump edef else emergencystretch end endcsname endgroup endinput endlinechar eqno errhelp errmessage errorcontextlines errorstopmode escapechar everycr everydisplay everyhbox everyjob everymath everypar everyvbox exhyphenpenalty expandafter fam fi finalhyphendemerits firstmark floatingpenalty font fontdimen fontname futurelet gdef global group globaldefs halign hangafter hangindent hbadness hbox hfil horizontal hfill horizontal hfilneg hfuzz hoffset holdinginserts hrule hsize hskip hss horizontal ht hyphenation hyphenchar hyphenpenalty hyphen if ifcase ifcat ifdim ifeof iffalse ifhbox ifhmode ifinner ifmmode ifnum ifodd iftrue ifvbox ifvmode ifvoid ifx ignorespaces immediate indent input inputlineno input insert insertpenalties interlinepenalty jobname kern language lastbox lastkern lastpenalty lastskip lccode leaders left lefthyphenmin leftskip leqno let limits linepenalty line lineskip lineskiplimit long looseness lower lowercase mag mark mathaccent mathbin mathchar mathchardef mathchoice mathclose mathcode mathinner mathop mathopen mathord mathpunct mathrel mathsurround maxdeadcycles maxdepth meaning medmuskip message mkern month moveleft moveright mskip multiply muskip muskipdef newlinechar noalign noboundary noexpand noindent nolimits nonscript scriptscript nonstopmode nulldelimiterspace nullfont number omit openin openout or outer output outputpenalty over overfullrule overline overwithdelims pagedepth pagefilllstretch pagefillstretch pagefilstretch pagegoal pageshrink pagestretch pagetotal par parfillskip parindent parshape parskip patterns pausing penalty postdisplaypenalty predisplaypenalty predisplaysize pretolerance prevdepth prevgraf radical raise read relax relpenalty right righthyphenmin rightskip romannumeral scriptfont scriptscriptfont scriptscriptstyle scriptspace scriptstyle scrollmode setbox setlanguage sfcode shipout show showbox showboxbreadth showboxdepth showlists showthe skewchar skip skipdef spacefactor spaceskip span special splitbotmark splitfirstmark splitmaxdepth splittopskip string tabskip textfont textstyle the thickmuskip thinmuskip time toks toksdef tolerance topmark topskip tracingcommands tracinglostchars tracingmacros tracingonline tracingoutput tracingpages tracingparagraphs tracingrestores tracingstats uccode uchyph underline unhbox unhcopy unkern unpenalty unskip unvbox unvcopy uppercase vadjust valign vbadness vbox vcenter vfil vfill vfilneg vfuzz voffset vrule vsize vskip vsplit vss vtop wd widowpenalty write xdef xleaders xspaceskip year'; my $etex_primitives = 'beginL beginR botmarks clubpenalties currentgrouplevel currentgrouptype currentifbranch currentiflevel currentiftype detokenize dimexpr displaywidowpenalties endL endR eTeXrevision eTeXversion everyeof firstmarks fontchardp fontcharht fontcharic fontcharwd glueexpr glueshrink glueshrinkorder gluestretch gluestretchorder gluetomu ifcsname ifdefined iffontchar interactionmode interactionmode interlinepenalties lastlinefit lastnodetype marks topmarks middle muexpr mutoglue numexpr pagediscards parshapedimen parshapeindent parshapelength predisplaydirection savinghyphcodes savingvdiscards scantokens showgroups showifs showtokens splitdiscards splitfirstmarks TeXXeTstate tracingassigns tracinggroups tracingifs tracingnesting tracingscantokens unexpanded unless widowpenalties'; my $pdftex_primitives = 'pdfadjustspacing pdfannot pdfavoidoverfull pdfcatalog pdfcompresslevel pdfdecimaldigits pdfdest pdfdestmargin pdfendlink pdfendthread pdffontattr pdffontexpand pdffontname pdffontobjnum pdffontsize pdfhorigin pdfimageresolution pdfincludechars pdfinfo pdflastannot pdflastdemerits pdflastobj pdflastvbreakpenalty pdflastxform pdflastximage pdflastximagepages pdflastxpos pdflastypos pdflinesnapx pdflinesnapy pdflinkmargin pdfliteral pdfmapfile pdfmaxpenalty pdfminpenalty pdfmovechars pdfnames pdfobj pdfoptionpdfminorversion pdfoutline pdfoutput pdfpageattr pdfpageheight pdfpageresources pdfpagesattr pdfpagewidth pdfpkresolution pdfprotrudechars pdfrefobj pdfrefxform pdfrefximage pdfsavepos pdfsnaprefpoint pdfsnapx pdfsnapy pdfstartlink pdfstartthread pdftexrevision pdftexversion pdfthread pdfthreadmargin pdfuniqueresname pdfvorigin pdfxform pdfximage'; my $omega_primitives = 'odelimiter omathaccent omathchar oradical omathchardef omathcode odelcode leftghost rightghost charwd charht chardp charit localleftbox localrightbox localinterlinepenalty localbrokenpenalty pagedir bodydir pardir textdir mathdir boxdir nextfakemath pagewidth pageheight pagerightoffset pagebottomoffset nullocp nullocplist ocp externalocp ocplist pushocplist popocplist clearocplists ocptracelevel addbeforeocplist addafterocplist removebeforeocplist removeafterocplist OmegaVersion InputTranslation OutputTranslation DefaultInputTranslation DefaultOutputTranslation noInputTranslation noOutputTranslation InputMode OutputMode DefaultInputMode DefaultOutputMode noInputMode noOutputMode noDefaultInputMode noDefaultOutputMode'; # only the macros that make sense: my $partial_tex_macros = 'TeX bgroup egroup endgraf space empty null newcount newdimen newskip newmuskip newbox newtoks newhelp newread newwrite newfam newlanguage newinsert newif maxdimen magstephalf magstep frenchspacing nonfrenchspacing normalbaselines obeylines obeyspaces raggedright ttraggedright thinspace negthinspace enspace enskip quad qquad smallskip medskip bigskip removelastskip topglue vglue hglue break nobreak allowbreak filbreak goodbreak smallbreak medbreak bigbreak line leftline rightline centerline rlap llap underbar strutbox strut cases matrix pmatrix bordermatrix eqalign displaylines eqalignno leqalignno pageno folio tracingall showhyphens fmtname fmtversion hphantom vphantom phantom smash'; my $partial_etex_macros = 'eTeX newmarks grouptype interactionmode nodetype iftype tracingall loggingall tracingnone'; $_[0]->SetLexer(wxSTC_LEX_TEX); # Set Lexers to use $_[0]->SetKeyWords(0,$tex_primitives.$partial_tex_macros); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); $_[0]->StyleSetSpec(0,"fore:#202020"); # Default $_[0]->StyleSetSpec(1,"fore:#007f7f"); # Special $_[0]->StyleSetSpec(2,"fore:#7f0000)"); # Group $_[0]->StyleSetSpec(3,"fore:#7f7f00"); # Symbol $_[0]->StyleSetSpec(4,"fore:#007f00"); # Command $_[0]->StyleSetSpec(5,"fore:#000000"); # Text $_[0]->StyleSetSpec(34,"fore:#00007f"); # Identifiers $_[0]->StyleSetSpec(35,"fore:#7f007f"); # Identifiers } 1;kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/ruby.pm0000644000175000017500000000336711573645307024044 0ustar gregoagregoapackage syntaxhighlighter::ruby; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_RUBY wxSTC_H_TAG); $_[0]->SetLexer( wxSTC_LEX_RUBY ); # Set Lexers to use $_[0]->SetKeyWords(0,'__FILE__ and def end in or self unless __LINE__ begin \ defined? ensure module redo super until BEGIN break do false next rescue \ then when END case else for nil require retry true while alias class elsif if \ not return undef yield'); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec( 0,"fore:#000000"); # whitespace (SCE_CONF_DEFAULT) $_[0]->StyleSetSpec( 1,"fore:#555555"); # Comment (SCE_CONF_COMMENT) $_[0]->StyleSetSpec( 2,"fore:#3350ff"); # Number (SCE_CONF_NUMBER) $_[0]->StyleSetSpec( 3,"fore:#888820"); # String $_[0]->StyleSetSpec( 4,"fore:#202020"); # Single quoted string $_[0]->StyleSetSpec( 5,"fore:#208820,bold"); # Keyword $_[0]->StyleSetSpec( 6,"fore:#882020"); # Triple quotes $_[0]->StyleSetSpec( 7,"fore:#202020"); # Triple double quotes $_[0]->StyleSetSpec( 8,"fore:#209999"); # Class name definition $_[0]->StyleSetSpec( 9,"fore:#202020"); # Function or method name definition $_[0]->StyleSetSpec(10,"fore:#000000"); # Operators $_[0]->StyleSetSpec(11,"fore:#000055"); # Identifiers $_[0]->StyleSetSpec(12,"fore:#7f7f7f"); # Comment-blocks $_[0]->StyleSetSpec(13,"fore:#000000,back:#E0C0E0,eolfilled"); # End of line where string is not closed $_[0]->StyleSetSpec(34,"fore:#0000ff"); # Matched Operators $_[0]->StyleSetSpec(35,"fore:#ff0000"); # Matched Operators } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/fortran.pm0000644000175000017500000001236611573645307024535 0ustar gregoagregoapackage syntaxhighlighter::fortran; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_FORTRAN wxSTC_H_TAG); $_[0]->SetLexer(wxSTC_LEX_FORTRAN); # Set Lexers to use keywords and io specifiers $_[0]->SetKeyWords(0, 'keywords and input/output specifiers keywordclass.fortran=access action advance allocatable allocate apostrophe assign assignment associate asynchronous backspace bind blank blockdata call case character class close common complex contains continue cycle data deallocate decimal delim default dimension direct do dowhile double doubleprecision else elseif elsewhere encoding end endassociate endblockdata enddo endfile endforall endfunction endif endinterface endmodule endprogram endselect endsubroutine endtype endwhere entry eor equivalence err errmsg exist exit external file flush fmt forall form format formatted function go goto id if implicit in include inout integer inquire intent interface intrinsic iomsg iolength iostat kind len logical module name named namelist nextrec nml none nullify number only open opened operator optional out pad parameter pass pause pending pointer pos position precision print private program protected public quote read readwrite real rec recl recursive result return rewind save select selectcase selecttype sequential sign size stat status stop stream subroutine target then to type unformatted unit use value volatile wait where while write'); #keywords2 is for highlighting intrinsic and extended functions $_[0]->SetKeyWords(1, 'abs achar acos acosd adjustl adjustr aimag aimax0 aimin0 aint ajmax0 ajmin0 akmax0 akmin0 all allocated alog alog10 amax0 amax1 amin0 amin1 amod anint any asin asind associated atan atan2 atan2d atand bitest bitl bitlr bitrl bjtest bit_size bktest break btest cabs ccos cdabs cdcos cdexp cdlog cdsin cdsqrt ceiling cexp char clog cmplx conjg cos cosd cosh count cpu_time cshift csin csqrt dabs dacos dacosd dasin dasind datan datan2 datan2d datand date date_and_time dble dcmplx dconjg dcos dcosd dcosh dcotan ddim dexp dfloat dflotk dfloti dflotj digits dim dimag dint dlog dlog10 dmax1 dmin1 dmod dnint dot_product dprod dreal dsign dsin dsind dsinh dsqrt dtan dtand dtanh eoshift epsilon errsns exp exponent float floati floatj floatk floor fraction free huge iabs iachar iand ibclr ibits ibset ichar idate idim idint idnint ieor ifix iiabs iiand iibclr iibits iibset iidim iidint iidnnt iieor iifix iint iior iiqint iiqnnt iishft \ iishftc iisign ilen imax0 imax1 imin0 imin1 imod index inint inot int int1 int2 int4 int8 iqint iqnint ior ishft ishftc isign isnan izext jiand jibclr jibits jibset jidim jidint jidnnt jieor jifix jint jior jiqint jiqnnt jishft jishftc jisign jmax0 jmax1 jmin0 jmin1 jmod jnint jnot jzext kiabs kiand kibclr kibits kibset kidim kidint kidnnt kieor kifix kind kint kior kishft kishftc kisign kmax0 kmax1 kmin0 kmin1 kmod knint knot kzext lbound leadz len len_trim lenlge lge lgt lle llt log log10 logical lshift malloc matmul max max0 max1 maxexponent maxloc maxval merge min min0 min1 minexponent minloc minval mod modulo mvbits nearest nint not nworkers number_of_processors pack popcnt poppar precision present product radix random random_number random_seed range real repeat reshape rrspacing rshift scale scan secnds selected_int_kind selected_real_kind set_exponent shape sign sin sind sinh size sizeof sngl snglq spacing spread sqrt sum system_clock tan tand tanh tiny transfer transpose trim ubound unpack verify'); #keywords3 are nonstardard, extended and user defined functions $_[0]->SetKeyWords(2, 'cdabs cdcos cdexp cdlog cdsin cdsqrt cotan cotand dcmplx dconjg dcotan dcotand decode dimag dll_export dll_import doublecomplex dreal dvchk encode find flen flush getarg getcharqq getcl getdat getenv gettim hfix ibchng identifier imag int1 int2 int4 intc intrup invalop iostat_msg isha ishc ishl jfix lacfar locking locnear map nargs nbreak ndperr ndpexc offset ovefl peekcharqq precfill prompt qabs qacos qacosd qasin qasind qatan qatand qatan2 qcmplx qconjg qcos qcosd qcosh qdim qexp qext qextd qfloat qimag qlog qlog10 qmax1 qmin1 qmod qreal qsign qsin qsind qsinh qsqrt qtan qtand qtanh ran rand randu rewrite segment setdat settim system timer undfl unlock union val virtual volatile zabs zcos zexp zlog zsin zsqrt'); #$_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); $_[0]->StyleSetSpec(0,"fore:#202020"); # default $_[0]->StyleSetSpec(1,"fore:#bbbbbb"); # Comment $_[0]->StyleSetSpec(2,"fore:#007f7f"); # Number $_[0]->StyleSetSpec(3,"fore:#004000"); # Single quoted string $_[0]->StyleSetSpec(4,"fore:#007f7f"); # Doublequoted string $_[0]->StyleSetSpec(5,"fore:#000000,back:#E0C0E0,eolfilled"); # End of line where string is not closed $_[0]->StyleSetSpec(6,"fore:#ff5555,bold"); # Operators $_[0]->StyleSetSpec(7,"fore:#55aa55,italic"); # Identifiers $_[0]->StyleSetSpec(8,"fore:#3344bb"); # Keywords $_[0]->StyleSetSpec(9,"fore:#228833"); # Keywords2 $_[0]->StyleSetSpec(10,"fore:#bb7799"); # Keywords3 $_[0]->StyleSetSpec(11,"fore:#778899"); # Preprocessor $_[0]->StyleSetSpec(12,"fore:#228822"); # Operators in .NAME. format $_[0]->StyleSetSpec(13,"fore:#339933"); # Labels $_[0]->StyleSetSpec(14,"fore:#44aa44"); # Continuation } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/lua.pm0000644000175000017500000001044111573645307023633 0ustar gregoagregoapackage syntaxhighlighter::lua; $VERSION = '0.01'; sub load { use Wx qw(wxSTC_LEX_LUA wxSTC_H_TAG); my $lua_keywords = 'and break do else elseif end false for function if \ in local nil not or repeat return then true until while'; # Basic Functions my $lua_keywords2 = '_VERSION assert collectgarbage dofile error gcinfo loadfile loadstring \ print tonumber tostring type unpack'; #### Lua 4.0 Basic Functions my $lua4_keywords2 = '_ALERT _ERRORMESSAGE _INPUT _PROMPT _OUTPUT \ _STDERR _STDIN _STDOUT call dostring foreach foreachi getn globals newtype \ rawget rawset require sort tinsert tremove'; # String Manipulation & Mathematical Functions my $lua4_keywords3 = 'abs acos asin atan atan2 ceil cos deg exp \ floor format frexp gsub ldexp log log10 max min mod rad random randomseed \ sin sqrt strbyte strchar strfind strlen strlower strrep strsub strupper tan'; # Input and Output Facilities & System Facilities my $lua4_keywords4 = 'openfile closefile readfrom writeto appendto \ remove rename flush seek tmpfile tmpname read write \ clock date difftime execute exit getenv setlocale time'; #### Lua 5.0 Basic Functions my $lua5_keywords2 = '_G getfenv getmetatable ipairs loadlib next pairs pcall \ rawegal rawget rawset require setfenv setmetatable xpcall \ string table math coroutine io os debug'; # I put the library names here, so when highlighted standalone, they are probably variable name from Lua 4.0 times. # String Manipulation, Table Manipulation, Mathematical Functions (string & table & math) my $lua5_keywords3 = 'string.byte string.char string.dump string.find string.len \ string.lower string.rep string.sub string.upper string.format string.gfind string.gsub \ table.concat table.foreach table.foreachi table.getn table.sort table.insert table.remove table.setn \ math.abs math.acos math.asin math.atan math.atan2 math.ceil math.cos math.deg math.exp \ math.floor math.frexp math.ldexp math.log math.log10 math.max math.min math.mod \ math.pi math.rad math.random math.randomseed math.sin math.sqrt math.tan'; # Coroutine Manipulation, Input and Output Facilities, System Facilities (coroutine & io & os) my $lua5_keywords4 = 'coroutine.create coroutine.resume coroutine.status \ coroutine.wrap coroutine.yield \ io.close io.flush io.input io.lines io.open io.output io.read io.tmpfile io.type io.write \ io.stdin io.stdout io.stderr \ os.clock os.date os.difftime os.execute os.exit os.getenv os.remove os.rename \ os.setlocale os.time os.tmpname'; # I keep keywords5, 6, 7 & 8 for other libraries $_[0]->SetLexer(wxSTC_LEX_LUA); # Set Lexers to use $_[0]->SetKeyWords(0,$lua_keywords); $_[0]->SetKeyWords(1,$lua_keywords2.$lua4_keywords2.$lua5_keywords2); $_[0]->SetKeyWords(2,$lua4_keywords3.$lua5_keywords3); $_[0]->SetKeyWords(3,$lua4_keywords4.$lua5_keywords4); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); $_[0]->StyleSetSpec(0,"fore:#202020"); # White space $_[0]->StyleSetSpec(1,"fore:#bbbbbb"); # Block comment (Lua 5.0) $_[0]->StyleSetSpec(2,"fore:#cccccc)"); # Line Comment $_[0]->StyleSetSpec(3,"fore:#ddffdd"); # Doc comment $_[0]->StyleSetSpec(4,"fore:#007f7f"); # Number $_[0]->StyleSetSpec(5,"fore:#7788bb,bold"); # Keywords $_[0]->StyleSetSpec(6,"fore:#555555,back:#ddeecc"); # String $_[0]->StyleSetSpec(7,"fore:#555555,back:#eeeebb"); # Character $_[0]->StyleSetSpec(8,"fore:#55ffff"); # Literal string $_[0]->StyleSetSpec(9,"fore:#228833"); # Preprocessor $_[0]->StyleSetSpec(10,"fore:#bb7799,bold"); # Operators $_[0]->StyleSetSpec(11,"fore:#778899"); # Identifiers (everything else...) $_[0]->StyleSetSpec(12,"fore:#228822"); # End of line where string is not closed $_[0]->StyleSetSpec(13,"fore:#339933"); # Other keywords (bozo test colors :-) $_[0]->StyleSetSpec(14,"fore:#44aa44"); # keywords3 $_[0]->StyleSetSpec(15,"fore:#55bb55"); # keywords4 $_[0]->StyleSetSpec(16,"fore:#66cc66"); # keywords5 $_[0]->StyleSetSpec(17,"fore:#66cc66"); # keywords6 $_[0]->StyleSetSpec(18,"fore:#77dd77"); # keywords7 $_[0]->StyleSetSpec(19,"fore:#88ee88"); # keywords8 $_[0]->StyleSetSpec(32,"fore:#000000"); # Default } 1;kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/nsis.pm0000644000175000017500000001152311573645307024030 0ustar gregoagregoapackage syntaxhighlighter::nsis; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_NSIS wxSTC_H_TAG); # Functions: my $nsis_keywords = 'What Abort AddSize AllowRootDirInstall AutoCloseWindow BGGradient BrandingText BringToFront CRCCheck Call CallInstDLL Caption ClearErrors CompletedText ComponentText CopyFiles CreateDirectory CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirShow DirText DisabledBitmap EnabledBitmap EnumRegKey EnumRegValue Exch Exec ExecShell ExecWait ExpandEnvStrings File FileClose FileErrorText FileOpen FileRead FileReadByte FileSeek FileWrite FileWriteByte FindClose FindFirst FindNext FindWindow Function FunctionEnd GetCurrentAddress GetDLLVersionLocal GetDllVersion GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetLabelAddress GetTempFileName Goto HideWindow Icon IfErrors IfFileExists IfRebootFlag InstProgressFlags InstType InstallButtonText InstallColors InstallDir InstallDirRegKey IntCmp IntCmpU IntFmt IntOp IsWindow LicenseData LicenseText MessageBox MiscButtonText Name OutFile Pop Push Quit RMDir ReadEnvStr ReadINIStr ReadRegDword ReadRegStr Reboot RegDLL Rename Return SearchPath Section SectionDivider SectionEnd SectionIn SendMessage SetAutoClose SetCompress SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrors SetFileAttributes SetOutPath SetOverwrite SetRebootFlag ShowInstDetails ShowUninstDetails SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCpy StrLen SubCaption UnRegDLL UninstallButtonText UninstallCaption UninstallEXEName UninstallIcon UninstallSubCaption UninstallText WindowIcon WriteINIStr WriteRegBin WriteRegDword WriteRegExpandStr WriteRegStr WriteUninstaller SectionGetFlags SectionSetFlags SectionSetText SectionGetText LogText LogSet CreateFont SetShellVarContext SetStaticBkColor SetBrandingImage PluginDir SubSectionEnd SubSection CheckBitmap ChangeUI SetFont AddBrandingImage XPStyle Var LangString !define !undef !ifdef !ifndef !endif !else !macro !echo !warning !error !verbose !macroend !insertmacro !system !include !cd !packhdr'; # Variables: my $nsis_keywords2 = '$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $R0 $R1 $R2 $R3 $R4 $R5 $R6 $R7 $R8 $R9 $CMDLINE $DESKTOP $EXEDIR $HWNDPARENT $INSTDIR $OUTDIR $PROGRAMFILES ${NSISDIR} $\n $\r $QUICKLAUNCH $SMPROGRAMS $SMSTARTUP $STARTMENU $SYSDIR $TEMP $WINDIR'; # Lables: my $nsis_keywords3 = 'ARCHIVE FILE_ATTRIBUTE_ARCHIVE FILE_ATTRIBUTE_HIDDEN FILE_ATTRIBUTE_NORMAL FILE_ATTRIBUTE_OFFLINE FILE_ATTRIBUTE_READONLY FILE_ATTRIBUTE_SYSTEM FILE_ATTRIBUTE_TEMPORARY HIDDEN HKCC HKCR HKCU HKDD HKEY_CLASSES_ROOT HKEY_CURRENT_CONFIG HKEY_CURRENT_USER HKEY_DYN_DATA HKEY_LOCAL_MACHINE HKEY_PERFORMANCE_DATA HKEY_USERS HKLM HKPD HKU IDABORT IDCANCEL IDIGNORE IDNO IDOK IDRETRY IDYES MB_ABORTRETRYIGNORE MB_DEFBUTTON1 MB_DEFBUTTON2 MB_DEFBUTTON3 MB_DEFBUTTON4 MB_ICONEXCLAMATION MB_ICONINFORMATION MB_ICONQUESTION MB_ICONSTOP MB_OK MB_OKCANCEL MB_RETRYCANCEL MB_RIGHT MB_SETFOREGROUND MB_TOPMOST MB_YESNO MB_YESNOCANCEL NORMAL OFFLINE READONLY SW_SHOWMAXIMIZED SW_SHOWMINIMIZED SW_SHOWNORMAL SYSTEM TEMPORARY auto colored false force hide ifnewer nevershow normal off on show silent silentlog smooth true try'; #User defined: my $nsis_keywords4 = 'MyFunction MySomethingElse'; $_[0]->SetLexer(wxSTC_LEX_NSIS); # Set Lexers to use $_[0]->SetKeyWords(0,$nsis_keywords1); $_[0]->SetKeyWords(1,$nsis_keywords2); $_[0]->SetKeyWords(2,$nsis_keywords3); $_[0]->SetKeyWords(3,$nsis_keywords4); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec( 0,"fore:#000000"); # Whitespace (SCE_NSIS_DEFAULT) $_[0]->StyleSetSpec( 1,"fore:#bbbbbb"); # Comment (SCE_NSIS_COMMENT) $_[0]->StyleSetSpec( 2,"fore:#999999,back:#EEEEEE"); # String double quote (SCE_NSIS_STRINGDQ) $_[0]->StyleSetSpec( 3,"fore:#999999,back:#EEEEEE"); # String left quote (SCE_NSIS_STRINGLQ) $_[0]->StyleSetSpec( 4,"fore:#999999,back:#EEEEEE"); # String right quote (SCE_NSIS_STRINGRQ) $_[0]->StyleSetSpec( 5,"fore:#00007f,bold"); # Function (SCE_NSIS_FUNCTION) $_[0]->StyleSetSpec( 6,"fore:#CC3300"); # Variable (SCE_NSIS_VARIABLE) $_[0]->StyleSetSpec( 7,"fore:#ff9900"); # Label (SCE_NSIS_LABEL) $_[0]->StyleSetSpec( 8,"fore:#000000"); # User Defined (SCE_NSIS_USERDEFINED) $_[0]->StyleSetSpec( 9,"fore:#7f007f"); # Section (SCE_NSIS_SECTIONDEF) $_[0]->StyleSetSpec(10,"fore:#9fcc9f"); # Sub section (SCE_NSIS_SUBSECTIONDEF) $_[0]->StyleSetSpec(11,"fore:#007f00,bold"); # If def (SCE_NSIS_IFDEFINEDEF) $_[0]->StyleSetSpec(12,"fore:#009f00,bold"); # Macro def (SCE_NSIS_MACRODEF) $_[0]->StyleSetSpec(13,"fore:#CC3300,back:#EEEEEE"); # Variable within string (SCE_NSIS_STRINGVAR) $_[0]->StyleSetSpec(14,"fore:#007f7f"); # Numbers (SCE_NSIS_NUMBER) } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/perl.pm0000644000175000017500000001174011573645307024017 0ustar gregoagregoapackage syntaxhighlighter::perl; $VERSION = '0.05'; sub load { $_[0]->SetLexer( &Wx::wxSTC_LEX_PERL ); # Set Lexers to use $_[0]->SetKeyWords(0, 'NULL __FILE__ __LINE__ __PACKAGE__ __DATA__ __END__ __WARN__ __DIE__ AUTOLOAD BEGIN CHECK CORE DESTROY END EQ GE GT INIT LE LT NE UNITCHECK abs accept alarm and atan2 bind binmode bless break caller chdir chmod chomp chop chown chr chroot close closedir cmp connect continue cos crypt dbmclose dbmopen default defined delete die do dump each else elsif endgrent endhostent endnetent endprotoent endpwent endservent eof eq eval exec exists exit exp fcntl fileno flock for foreach fork format formline ge getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getppid getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname getsockopt given glob gmtime goto grep gt hex if index int ioctl join keys kill last lc lcfirst le length link listen local localtime lock log lstat lt m map mkdir msgctl msgget msgrcv msgsnd my ne next no not oct open opendir or ord our pack package pipe pop pos print printf prototype push q qq qr quotemeta qu qw qx rand read readdir readline readlink readpipe recv redo ref rename require reset return reverse rewinddir rindex rmdir s say scalar seek seekdir select semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat state study sub substr symlink syscall sysopen sysread sysseek system syswrite tell telldir tie tied time times tr truncate uc ucfirst umask undef unless unlink unpack unshift untie until use utime values vec wait waitpid wantarray warn when while write x xor y'); # Add new keyword. # $_[0]->StyleSetSpec( &Wx::wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec(1,"fore:#ff0000"); # Error $_[0]->StyleSetSpec(2,"fore:#aaaaaa"); # Comment $_[0]->StyleSetSpec(3,"fore:#004000,back:#E0FFE0,$(font.text),eolfilled"); # POD: = at beginning of line $_[0]->StyleSetSpec(4,"fore:#007f7f"); # Number $_[0]->StyleSetSpec(5,"fore:#000077,bold"); # Keywords $_[0]->StyleSetSpec(6,"fore:#ee7b00,back:#fff8f8"); # Doublequoted string $_[0]->StyleSetSpec(7,"fore:#f36600,back:#fffcff"); # Single quoted string $_[0]->StyleSetSpec(8,"fore:#555555"); # Symbols / Punctuation. Currently not used by LexPerl. $_[0]->StyleSetSpec(9,""); # Preprocessor. Currently not used by LexPerl. $_[0]->StyleSetSpec(10,"fore:#002200"); # Operators $_[0]->StyleSetSpec(11,"fore:#3355bb"); # Identifiers (functions, etc.) $_[0]->StyleSetSpec(12,"fore:#228822"); # Scalars: $var $_[0]->StyleSetSpec(13,"fore:#339933"); # Array: @var $_[0]->StyleSetSpec(14,"fore:#44aa44"); # Hash: %var $_[0]->StyleSetSpec(15,"fore:#55bb55"); # Symbol table: *var $_[0]->StyleSetSpec(17,"fore:#000000,back:#A0FFA0"); # Regex: /re/ or m{re} $_[0]->StyleSetSpec(18,"fore:#000000,back:#F0E080"); # Substitution: s/re/ore/ $_[0]->StyleSetSpec(19,"fore:#000000,back:#8080A0"); # Long Quote (qq, qr, qw, qx) -- obsolete: replaced by qq, qx, qr, qw $_[0]->StyleSetSpec(20,"fore:#ff7700,back:#f9f9d7"); # Back Ticks $_[0]->StyleSetSpec(21,"fore:#600000,back:#FFF0D8,eolfilled"); # Data Section: __DATA__ or __END__ at beginning of line $_[0]->StyleSetSpec(22,"fore:#000000,back:#DDD0DD"); # Here-doc (delimiter) $_[0]->StyleSetSpec(23,"fore:#7F007F,back:#DDD0DD,eolfilled,notbold"); # Here-doc (single quoted, q) $_[0]->StyleSetSpec(24,"fore:#7F007F,back:#DDD0DD,eolfilled,bold"); # Here-doc (double quoted, qq) $_[0]->StyleSetSpec(25,"fore:#7F007F,back:#DDD0DD,eolfilled,italics"); # Here-doc (back ticks, qx) $_[0]->StyleSetSpec(26,"fore:#7F007F,$(font.monospace),notbold"); # Single quoted string, generic $_[0]->StyleSetSpec(27,"fore:#ee7b00,back:#fff8f8"); # qq = Double quoted string $_[0]->StyleSetSpec(28,"fore:#ff7700,back:#f9f9d7"); # qx = Back ticks $_[0]->StyleSetSpec(29,"fore:#000000,back:#A0FFA0"); # qr = Regex $_[0]->StyleSetSpec(30,"fore:#f36600,back:#fff8f8"); # qw = Array } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/html.pm0000644000175000017500000002130011573645307024012 0ustar gregoagregoapackage syntaxhighlighter::html; $VERSION = '0.3'; sub load{ use Wx qw(wxSTC_LEX_HTML wxSTC_H_TAG); $_[0]->SetLexer( wxSTC_LEX_HTML ); # Set Lexers to HTML my $html_elements = 'a abbr acronym address applet area b base basefont bdo big blockquote body br button caption center cite code col colgroup dd del dfn dir div dl dt em fieldset font form frame frameset h1 h2 h3 h4 h5 h6 head hr html i iframe img input ins isindex kbd label legend li link map menu meta noframes noscript object ol optgroup option p param pre q s samp script select small span strike strong style sub sup table tbody td textarea tfoot th thead title tr tt u ul var xml xmlns'; my $html_attributes = 'abbr accept-charset accept accesskey action align alink alt archive axis background bgcolor border cellpadding cellspacing char charoff charset checked cite class classid clear codebase codetype color cols colspan compact content coords data datafld dataformatas datapagesize datasrc datetime declare defer dir disabled enctype event face for frame frameborder headers height href hreflang hspace http-equiv id ismap label lang language leftmargin link longdesc marginwidth marginheight maxlength media method multiple name nohref noresize noshade nowrap object onblur onchange onclick ondblclick onfocus onkeydown onkeypress onkeyup onload onmousedown onmousemove onmouseover onmouseout onmouseup onreset onselect onsubmit onunload profile prompt readonly rel rev rows rowspan rules scheme scope selected shape size span src standby start style summary tabindex target text title topmargin type usemap valign value valuetype version vlink vspace width text password checkbox radio submit reset file hidden image'; $_[0]->SetKeyWords(1,$html_elements.$html_attributes."public !doctype"); # Add new keyword. #$_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec(0,"fore:#000000"); # Text $_[0]->StyleSetSpec(1,"fore:#2222A0,bold"); # Tags $_[0]->StyleSetSpec(2,"fore:#ff0117"); # Unknown Tags $_[0]->StyleSetSpec(3,"fore:#007700"); # Attributes $_[0]->StyleSetSpec(4,"fore:#ff00B0"); # Unknown Attributes $_[0]->StyleSetSpec(5,"fore:#3399BB"); # Numbers $_[0]->StyleSetSpec(6,"fore:#ee7b00,back:#fff8f8"); # Doublequoted string $_[0]->StyleSetSpec(7,"fore:#f36600,back:#fffcff"); # Single quoted string #$_[0]->StyleSetSpec(6,"fore:#2222A0,back:#eeeeff"); # Double quoted strings #$_[0]->StyleSetSpec(7,"fore:#2222A0,back:#eeeeff"); # Single quoted string $_[0]->StyleSetSpec(8,"fore:#ffbb55"); # Other inside tag $_[0]->StyleSetSpec(9,"fore:#bbbbbb"); # Comment $_[0]->StyleSetSpec(10,"fore:#cccc55,italic"); # Entities $_[0]->StyleSetSpec(11,"fore:#000000"); # XML style tag ends '/>' $_[0]->StyleSetSpec(12,"fore:#228822"); # XML identifier start 'StyleSetSpec(13,"fore:#339933"); # XML identifier end '?>' $_[0]->StyleSetSpec(14,"fore:#ffaa44"); # SCRIPT $_[0]->StyleSetSpec(15,"fore:#55bb55"); # ASP <% ... %> $_[0]->StyleSetSpec(16,"fore:#55bb55"); # ASP <% ... %> $_[0]->StyleSetSpec(17,"fore:#000000"); # CDATA $_[0]->StyleSetSpec(18,"fore:#000000"); # PHP $_[0]->StyleSetSpec(19,"fore:#2222A0"); # Unquoted values $_[0]->StyleSetSpec(21,"fore:#7F007F"); # SGML tags $_[0]->StyleSetSpec(22,"fore:#800117"); # SGML command $_[0]->StyleSetSpec(23,"fore:#800117"); # SGML 1st param $_[0]->StyleSetSpec(24,"fore:#800117"); # SGML double string $_[0]->StyleSetSpec(25,"fore:#800117"); # SGML single string $_[0]->StyleSetSpec(26,"fore:#7F007F,bold"); # SGML error $_[0]->StyleSetSpec(27,"fore:#000000"); # SGML special (#xxxx type) $_[0]->StyleSetSpec(28,"fore:#000000"); # SGML entity $_[0]->StyleSetSpec(29,"fore:#000000"); # SGML comment $_[0]->StyleSetSpec(31,"fore:#000000"); # SGML block $_[0]->StyleSetSpec(34,"fore:#000000"); # Matched Operators $_[0]->StyleSetSpec(35,"fore:#000000"); # Matched Operators # Embedded Javascript $_[0]->StyleSetSpec(40,"fore:#0000ff"); # JS Start - allows eol filled background to not start on same line as SCRIPT tag $_[0]->StyleSetSpec(41,"fore:#0000ff"); $_[0]->StyleSetSpec(42,"fore:#0000ff"); $_[0]->StyleSetSpec(43,"fore:#0000ff"); $_[0]->StyleSetSpec(44,"fore:#0000ff"); $_[0]->StyleSetSpec(45,"fore:#0000ff"); $_[0]->StyleSetSpec(46,"fore:#0000ff"); $_[0]->StyleSetSpec(47,"fore:#0000ff"); $_[0]->StyleSetSpec(48,"fore:#0000ff"); $_[0]->StyleSetSpec(49,"fore:#0000ff"); $_[0]->StyleSetSpec(50,"fore:#0000ff"); $_[0]->StyleSetSpec(51,"fore:#0000ff"); $_[0]->StyleSetSpec(52,"fore:#0000ff"); # ASP Javascript $_[0]->StyleSetSpec(55,"fore:#000000"); # JS Start - allows eol filled background to not start on same line as SCRIPT tag $_[0]->StyleSetSpec(56,"fore:#000000"); $_[0]->StyleSetSpec(57,"fore:#000000"); $_[0]->StyleSetSpec(58,"fore:#000000"); $_[0]->StyleSetSpec(59,"fore:#000000"); $_[0]->StyleSetSpec(60,"fore:#000000"); $_[0]->StyleSetSpec(61,"fore:#000000"); $_[0]->StyleSetSpec(62,"fore:#000000"); $_[0]->StyleSetSpec(63,"fore:#000000"); $_[0]->StyleSetSpec(64,"fore:#000000"); $_[0]->StyleSetSpec(65,"fore:#000000"); $_[0]->StyleSetSpec(66,"fore:#000000"); $_[0]->StyleSetSpec(67,"fore:#000000"); # JavaScript RegEx $_[0]->StyleSetSpec(68,"fore:#000000"); $_[0]->StyleSetSpec(69,"fore:#000000"); $_[0]->StyleSetSpec(70,"fore:#000000"); $_[0]->StyleSetSpec(71,"fore:#000000"); $_[0]->StyleSetSpec(72,"fore:#000000"); $_[0]->StyleSetSpec(73,"fore:#000000"); $_[0]->StyleSetSpec(74,"fore:#000000"); $_[0]->StyleSetSpec(75,"fore:#000000"); $_[0]->StyleSetSpec(76,"fore:#000000"); $_[0]->StyleSetSpec(77,"fore:#000000"); $_[0]->StyleSetSpec(78,"fore:#000000"); $_[0]->StyleSetSpec(79,"fore:#000000"); $_[0]->StyleSetSpec(80,"fore:#000000"); $_[0]->StyleSetSpec(81,"fore:#000000"); $_[0]->StyleSetSpec(82,"fore:#000000"); $_[0]->StyleSetSpec(83,"fore:#000000"); $_[0]->StyleSetSpec(84,"fore:#000000"); $_[0]->StyleSetSpec(85,"fore:#000000"); $_[0]->StyleSetSpec(86,"fore:#000000"); $_[0]->StyleSetSpec(87,"fore:#000000"); $_[0]->StyleSetSpec(88,"fore:#000000"); $_[0]->StyleSetSpec(89,"fore:#000000"); $_[0]->StyleSetSpec(90,"fore:#000000"); $_[0]->StyleSetSpec(91,"fore:#000000"); $_[0]->StyleSetSpec(92,"fore:#000000"); $_[0]->StyleSetSpec(93,"fore:#000000"); $_[0]->StyleSetSpec(94,"fore:#000000"); $_[0]->StyleSetSpec(95,"fore:#000000"); $_[0]->StyleSetSpec(96,"fore:#000000"); $_[0]->StyleSetSpec(97,"fore:#000000"); $_[0]->StyleSetSpec(98,"fore:#000000"); $_[0]->StyleSetSpec(99,"fore:#000000"); $_[0]->StyleSetSpec(100,"fore:#000000"); $_[0]->StyleSetSpec(101,"fore:#000000"); $_[0]->StyleSetSpec(102,"fore:#000000"); $_[0]->StyleSetSpec(103,"fore:#000000"); $_[0]->StyleSetSpec(104,"fore:#000000"); $_[0]->StyleSetSpec(105,"fore:#000000"); $_[0]->StyleSetSpec(106,"fore:#000000"); $_[0]->StyleSetSpec(107,"fore:#000000"); $_[0]->StyleSetSpec(108,"fore:#000000"); $_[0]->StyleSetSpec(109,"fore:#000000"); $_[0]->StyleSetSpec(110,"fore:#000000"); $_[0]->StyleSetSpec(111,"fore:#000000"); $_[0]->StyleSetSpec(112,"fore:#000000"); $_[0]->StyleSetSpec(113,"fore:#000000"); $_[0]->StyleSetSpec(114,"fore:#000000"); $_[0]->StyleSetSpec(115,"fore:#000000"); $_[0]->StyleSetSpec(116,"fore:#000000"); $_[0]->StyleSetSpec(117,"fore:#000000"); $_[0]->StyleSetSpec(118,"fore:#000033,back:#FFF8F8,eolfilled"); # PHP Default $_[0]->StyleSetSpec(119,"fore:#007F00,back:#FFF8F8"); # Double quoted String $_[0]->StyleSetSpec(120,"fore:#009F00,back:#FFF8F8"); # Single quoted string $_[0]->StyleSetSpec(121,"fore:#7F007F,back:#FFF8F8,italics"); # Keyword $_[0]->StyleSetSpec(122,"fore:#CC9900,back:#FFF8F8"); # Number $_[0]->StyleSetSpec(123,"fore:#00007F,back:#FFF8F8,italics"); # Variable $_[0]->StyleSetSpec(124,"fore:#999999,back:#FFF8F8"); # Comment $_[0]->StyleSetSpec(125,"fore:#666666,back:#FFF8F8,italics"); # One line comment $_[0]->StyleSetSpec(126,"fore:#00007F,back:#FFF8F8,italics"); # PHP variable in double quoted string $_[0]->StyleSetSpec(127,"fore:#000000,back:#FFF8F8"); # PHP operator } 1;kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/sql.pm0000644000175000017500000000673411573645307023663 0ustar gregoagregoapackage syntaxhighlighter::sql; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_SQL wxSTC_H_TAG); my $sql_keywords = 'absolute action add admin after aggregate \ alias all allocate alter and any are array as asc \ assertion at authorization \ before begin binary bit blob boolean both breadth by \ call cascade cascaded case cast catalog char character \ check class clob close collate collation column commit \ completion connect connection constraint constraints \ constructor continue corresponding create cross cube current \ current_date current_path current_role current_time current_timestamp \ current_user cursor cycle \ data date day deallocate dec decimal declare default \ deferrable deferred delete depth deref desc describe descriptor \ destroy destructor deterministic dictionary diagnostics disconnect \ distinct domain double drop dynamic \ each else end end-exec equals escape every except \ exception exec execute external \ false fetch first float for foreign found from free full \ function \ general get global go goto grant group grouping \ having host hour \ identity if ignore immediate in indicator initialize initially \ inner inout input insert int integer intersect interval \ into is isolation iterate \ join \ key \ language large last lateral leading left less level like \ limit local localtime localtimestamp locator \ map match minute modifies modify module month \ names national natural nchar nclob new next no none \ not null numeric \ object of off old on only open operation option \ or order ordinality out outer output \ pad parameter parameters partial path postfix precision prefix \ preorder prepare preserve primary \ prior privileges procedure public \ read reads real recursive ref references referencing relative \ restrict result return returns revoke right \ role rollback rollup routine row rows \ savepoint schema scroll scope search second section select \ sequence session session_user set sets size smallint some| space \ specific specifictype sql sqlexception sqlstate sqlwarning start \ state statement static structure system_user \ table temporary terminate than then time timestamp \ timezone_hour timezone_minute to trailing transaction translation \ treat trigger true \ under union unique unknown \ unnest update usage user using \ value values varchar variable varying view \ when whenever where with without work write \ year \ zone'; $_[0]->SetLexer(wxSTC_LEX_SQL); # Set Lexers to use $_[0]->SetKeyWords(0,$sql_keywords); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); $_[0]->StyleSetSpec(0,"fore:#202020"); # White space $_[0]->StyleSetSpec(1,"fore:#bbbbbb"); # Comment $_[0]->StyleSetSpec(2,"fore:#cccccc)"); # Line Comment $_[0]->StyleSetSpec(3,"fore:#004000"); # Doc comment $_[0]->StyleSetSpec(4,"fore:#007f7f"); # Number $_[0]->StyleSetSpec(5,"fore:#7788bb,bold"); # Keyword $_[0]->StyleSetSpec(6,"fore:#555555,back:#ddeecc"); # Doublequoted string $_[0]->StyleSetSpec(7,"fore:#555555,back:#eeeebb"); # Single quoted string $_[0]->StyleSetSpec(8,"fore:#55ffff"); # Symbols $_[0]->StyleSetSpec(9,"fore:#228833"); # Preprocessor $_[0]->StyleSetSpec(10,"fore:#bb7799,bold"); # Operators $_[0]->StyleSetSpec(11,"fore:#778899"); # Identifiers $_[0]->StyleSetSpec(12,"fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled");# End of line where string is not closed } 1;kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/forth.pm0000644000175000017500000000722311573645307024200 0ustar gregoagregoapackage syntaxhighlighter::forth; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_FORTH wxSTC_H_TAG); # control keywords Forth my $forth_keywords = 'AGAIN BEGIN CASE DO ELSE ENDCASE ENDOF IF LOOP OF REPEAT THEN UNTIL WHILE [IF] [ELSE] [THEN] ?DO'; # keywords my $forth_keywords2 = 'DUP DROP ROT SWAP OVER @ ! 2@ 2! 2DUP 2DROP 2SWAP 2OVER NIP R@ >R R> 2R@ 2>R 2R> 0= 0< SP@ SP! W@ W! C@ C! < > = <> 0<> SPACE SPACES KEY? KEY THROW CATCH ABORT */ 2* /MOD CELL+ CELLS CHAR+ CHARS MOVE ERASE DABS TITLE HEX DECIMAL HOLD <# # #S #> SIGN D. . U. DUMP (.") >NUMBER IMMEDIATE EXIT RECURSE UNLOOP LEAVE HERE ALLOT , C, W, COMPILE, BRANCH, RET, LIT, DLIT, ?BRANCH, ", >MARK >RESOLVE1 RESOLVE ALIGN ALIGNED USER-ALLOT USER-HERE HEADER DOES> SMUDGE HIDE :NONAME LAST-WORD ?ERROR ERROR2 FIND1 SFIND SET-CURRENT GET-CURRENT DEFINITIONS GET-ORDER FORTH ONLY SET-ORDER ALSO PREVIOUS VOC-NAME. ORDER LATEST LITERAL 2LITERAL SLITERAL CLITERAL ?LITERAL1 ?SLITERAL1 HEX-LITERAL HEX-SLITERAL ?LITERAL2 ?SLITERAL2 SOURCE EndOfChunk CharAddr PeekChar IsDelimiter GetChar OnDelimiter SkipDelimiters OnNotDelimiter SkipWord SkipUpTo ParseWord NextWord PARSE SKIP CONSOLE-HANDLES REFILL DEPTH ?STACK ?COMP WORD INTERPRET BYE QUIT MAIN1 EVALUATE INCLUDE-FILE INCLUDED >BODY +WORD WORDLIST CLASS! CLASS@ PAR! PAR@ ID. ?IMMEDIATE ?VOC IMMEDIATE VOC WordByAddrWl WordByAddr NLIST WORDS SAVE OPTIONS /notransl ANSI>OEM ACCEPT EMIT CR TYPE EKEY? EKEY EKEY>CHAR EXTERNTASK ERASE-IMPORTS ModuleName ModuleDirName ENVIRONMENT? DROP-EXC-HANDLER SET-EXC-HANDLER HALT ERR CLOSE-FILE CREATE-FILE CREATE-FILE-SHARED OPEN-FILE-SHARED DELETE-FILE FILE-POSITION FILE-SIZE OPEN-FILE READ-FILE REPOSITION-FILE DOS-LINES UNIX-LINES READ-LINE WRITE-FILE RESIZE-FILE WRITE-LINE ALLOCATE FREE RESIZE START SUSPEND RESUME STOP PAUSE MIN MAX TRUE FALSE ASCIIZ> R/O W/O ;CLASS ENDWITH OR AND /STRING SEARCH COMPARE EXPORT ;MODULE SPACE /''; # defwords my $forth_keywords3 = 'VARIABLE CREATE : VALUE CONSTANT VM: M: var dvar chars OBJ CONSTR: DESTR: CLASS: OBJECT: POINTER USER USER-CREATE USER-VALUE VECT WNDPROC: VOCABULARY -- TASK: CEZ: MODULE:'; # prewords1 my $forth_keywords4 = 'CHAR [CHAR] POSTPONE WITH ['] TO [COMPILE] CHAR ASCII '; # prewords2 my $forth_keywords5 = 'REQUIRE WINAPI:'; # string words my $forth_keywords6 = 'S" ABORT" Z" " ." C"'; $_[0]->SetLexer( wxSTC_LEX_FORTH ); # Set Lexers to use $_[0]->SetKeyWords(0,$forth_keywords); $_[0]->SetKeyWords(1,$forth_keywords2); $_[0]->SetKeyWords(2,$forth_keywords3); $_[0]->SetKeyWords(3,$forth_keywords4); $_[0]->SetKeyWords(4,$forth_keywords5); $_[0]->SetKeyWords(5,$forth_keywords6); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec( 0,"fore:#000000"); # whitespace (SCE_FORTH_DEFAULT) $_[0]->StyleSetSpec( 1,"fore:#009933"); # Comment (SCE_FORTH_COMMENT) $_[0]->StyleSetSpec( 2,"fore:#007f00"); # ML comment (SCE_FORTH_COMMENT_ML) $_[0]->StyleSetSpec( 3,"fore:#000000,bold"); # ML comment (SCE_FORTH_IDENTIFIER) $_[0]->StyleSetSpec( 4,"fore:#00007f,bold"); # control (SCE_FORTH_CONTROL) $_[0]->StyleSetSpec( 5,"fore:#000000,bold"); # Keywords $_[0]->StyleSetSpec( 6,"fore:#ff0000"); # defwords (SCE_FORTH_DEFWORD) $_[0]->StyleSetSpec( 7,"fore:#cc3300"); # preword1 (SCE_FORTH_PREWORD1) $_[0]->StyleSetSpec( 8,"fore:#996633"); # preword2 (SCE_FORTH_PREWORD2) $_[0]->StyleSetSpec( 9,"fore:#007f7f"); # number (SCE_FORTH_NUMBER) $_[0]->StyleSetSpec(10,"fore:#cc3300"); # Double quoted string (SCE_FORTH_STRING) $_[0]->StyleSetSpec(11,"fore:#0000cc"); # locale } 1;kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/cpp.pm0000644000175000017500000000610211573645307023633 0ustar gregoagregoapackage syntaxhighlighter::cpp; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_CPP wxSTC_H_TAG); my $cpp_keywords = 'and and_eq asm auto bitand bitor bool break \ case catch char class compl const const_cast continue \ default delete do double dynamic_cast else enum explicit export extern false float for \ friend goto if inline int long mutable namespace new not not_eq \ operator or or_eq private protected public \ register reinterpret_cast return short signed sizeof static static_cast struct switch \ template this throw true try typedef typeid typename union unsigned using \ virtual void volatile wchar_t while xor xor_eq'; # keywords2 is for highlighting user defined keywords or function calls or similar # keywords3 is for doc comment keywords, highlighted in style 17 my $cpp_keywords3 = 'a addindex addtogroup anchor arg attention \ author b brief bug c class code date def defgroup deprecated dontinclude \ e em endcode endhtmlonly endif endlatexonly endlink endverbatim enum example exception \ f$ f[ f] file fn hideinitializer htmlinclude htmlonly \ if image include ingroup internal invariant interface latexonly li line link \ mainpage name namespace nosubgrouping note overload \ p page par param post pre ref relates remarks return retval \ sa section see showinitializer since skip skipline struct subsection \ test throw todo typedef union until \ var verbatim verbinclude version warning weakgroup $ @ \ & < > # { }'; $_[0]->SetLexer(wxSTC_LEX_CPP); # Set Lexers to use $_[0]->SetKeyWords(0,$cpp_keywords); $_[0]->SetKeyWords(2,$cpp_keywords3); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); $_[0]->StyleSetSpec(0,"fore:#202020"); # White space $_[0]->StyleSetSpec(1,"fore:#aaaaaa"); # Comment $_[0]->StyleSetSpec(2,"fore:#bbbbbb)"); # Line Comment $_[0]->StyleSetSpec(3,"fore:#004000"); # Doc comment $_[0]->StyleSetSpec(4,"fore:#007f7f"); # Number $_[0]->StyleSetSpec(5,"fore:#000000,bold"); # Keywords $_[0]->StyleSetSpec(6,"fore:#555555,back:#ddeecc"); # Doublequoted string $_[0]->StyleSetSpec(7,"fore:#555555,back:#eeeebb"); # Single quoted string $_[0]->StyleSetSpec(8,"fore:#55ffff"); # UUIDs (only in IDL) $_[0]->StyleSetSpec(9,"fore:#228833"); # Preprocessor $_[0]->StyleSetSpec(10,"fore:#bb5577, bold"); # Operators $_[0]->StyleSetSpec(11,"fore:#334499"); # Identifiers (functions, etc.) $_[0]->StyleSetSpec(12,"fore:#228822"); # End of line where string is not closed $_[0]->StyleSetSpec(13,"fore:#339933"); # Verbatim strings for C# $_[0]->StyleSetSpec(14,"fore:#44aa44"); # Regular expressions for JavaScript $_[0]->StyleSetSpec(15,"fore:#55bb55"); # Doc Comment Line $_[0]->StyleSetSpec(17,"fore:#000000,back:#A0FFA0"); # Comment keyword $_[0]->StyleSetSpec(18,"fore:#000000,back:#F0E080"); # Comment keyword error # Braces are only matched in operator style braces.cpp.style=10 $_[0]->StyleSetSpec(32,"fore:#000000"); # Default } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/php.pm0000644000175000017500000002426111573645307023646 0ustar gregoagregoapackage syntaxhighlighter::php; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_PHPSCRIPT wxSTC_H_TAG); $_[0]->SetLexer( wxSTC_LEX_PHPSCRIPT ); # Set Lexers to use $_[0]->SetKeyWords(0,' and argv as argc break case cfunction class continue declare default do \ die echo else elseif empty enddeclare endfor endforeach endif endswitch \ endwhile e_all e_parse e_error e_warning eval exit extends false for \ foreach function global http_cookie_vars http_get_vars http_post_vars \ http_post_files http_env_vars http_server_vars if include include_once \ list new not null old_function or parent php_os php_self php_version \ print require require_once return static switch stdclass this true var \ xor virtual while __file__ __line__ __sleep __wakeup'); # Add new keyword. $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec(0,"fore:#202020"); # White space $_[0]->StyleSetSpec(1,"fore:#ff0000"); # Error $_[0]->StyleSetSpec(2,"fore:#9999dd)"); # Comment $_[0]->StyleSetSpec(3,"fore:#004000"); # POD: = at beginning of line $_[0]->StyleSetSpec(4,"fore:#007f7f"); # Number $_[0]->StyleSetSpec(5,"fore:#000077,bold"); # Keywords $_[0]->StyleSetSpec(6,"fore:#ee7b00"); # Doublequoted string $_[0]->StyleSetSpec(7,"fore:#f36600"); # Single quoted string $_[0]->StyleSetSpec(8,"fore:#555555"); # Symbols / Punctuation. Currently not used by LexPerl. $_[0]->StyleSetSpec(9,"fore:#555555"); # Preprocessor. Currently not used by LexPerl. $_[0]->StyleSetSpec(10,"fore:#800080"); # Operators $_[0]->StyleSetSpec(11,"fore:#3355bb"); # Identifiers (functions, etc.) $_[0]->StyleSetSpec(12,"fore:#228822"); # Scalars: $var $_[0]->StyleSetSpec(13,"fore:#339933"); # Array: @var $_[0]->StyleSetSpec(14,"fore:#44aa44"); # Hash: %var $_[0]->StyleSetSpec(15,"fore:#55bb55"); # Symbol table: *var $_[0]->StyleSetSpec(17,"fore:#000000"); # Regex: /re/ or m{re} $_[0]->StyleSetSpec(18,"fore:#0000FF"); # PHP $_[0]->StyleSetSpec(19,"fore:#FFFF00"); # Long Quote (qq, qr, qw, qx) -- obsolete: replaced by qq, qx, qr, qw $_[0]->StyleSetSpec(20,"fore:#FFFF00"); # Back Ticks $_[0]->StyleSetSpec(21,"fore:#600000"); # Data Section: __DATA__ or __END__ at beginning of line $_[0]->StyleSetSpec(22,"fore:#000000"); # Here-doc (delimiter) $_[0]->StyleSetSpec(23,"fore:#7F007F");# Here-doc (single quoted, q) $_[0]->StyleSetSpec(24,"fore:#7F007F"); # Here-doc (double quoted, qq) $_[0]->StyleSetSpec(25,"fore:#7F007F"); # Here-doc (back ticks, qx) $_[0]->StyleSetSpec(26,"fore:#7F007F"); # Single quoted string, generic $_[0]->StyleSetSpec(27,"fore:#f36600"); # qq = Double quoted string $_[0]->StyleSetSpec(28,"fore:#228822"); # qx = Back ticks $_[0]->StyleSetSpec(29,"fore:#f36600"); # qr = Regex $_[0]->StyleSetSpec(30,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(31,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(32,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(33,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(34,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(35,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(36,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(37,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(38,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(39,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(40,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(41,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(42,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(43,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(44,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(45,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(46,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(47,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(48,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(49,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(50,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(51,"fore:#228822"); # qw = Array $_[0]->StyleSetSpec(52,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(53,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(54,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(55,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(56,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(57,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(58,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(59,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(60,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(61,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(62,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(63,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(64,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(65,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(66,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(67,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(68,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(69,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(70,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(71,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(72,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(73,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(74,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(75,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(76,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(77,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(78,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(79,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(80,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(81,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(82,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(83,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(84,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(85,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(86,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(87,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(88,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(89,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(90,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(91,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(92,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(93,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(94,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(95,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(96,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(97,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(98,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(99,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(100,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(101,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(102,"fore:#228822"); # qw = Array #$_[0]->StyleSetSpec(103,"fore:#228822"); # qw = Array # $_[0]->StyleSetSpec(104,"fore:#00007F,italics,back:#FFF8F8"); # PHP complex variable $_[0]->StyleSetSpec(105,"fore:#999999,back:#F8F8ff,italics"); # One line comment $_[0]->StyleSetSpec(106,"fore:#00007F,back:#F8F8ff,italics"); # PHP variable in double quoted string $_[0]->StyleSetSpec(107,"fore:#002200,back:#F8F8ff"); # PHP operator $_[0]->StyleSetSpec(108,"fore:#000033,back:#F8F8ff,eolfilled"); # PHP Default $_[0]->StyleSetSpec(109,"fore:#007F00,back:#F8F8ff"); # Double quoted String $_[0]->StyleSetSpec(110,"fore:#009F00,back:#F8F8ff"); # Single quoted string $_[0]->StyleSetSpec(111,"fore:#000077,bold,back:#F8ffff"); # Keyword $_[0]->StyleSetSpec(112,"fore:#007f7f,back:#F8F8ff"); # Number $_[0]->StyleSetSpec(113,"fore:#228822,back:#F8F8ff,italics"); # Variable $_[0]->StyleSetSpec(114,"fore:#999999,back:#F8F8ff"); # Comment $_[0]->StyleSetSpec(115,"fore:#666666,back:#F8F8ff,italics"); # One line comment $_[0]->StyleSetSpec(116,"fore:#00007F,back:#F8F8ff,italics"); # PHP variable in double quoted string $_[0]->StyleSetSpec(117,"fore:#000000,back:#F8F8ff"); # PHP operator # $_[0]->StyleSetSpec(118,"fore:#000033,back:#F8F8ff,eolfilled"); # PHP Default $_[0]->StyleSetSpec(119,"fore:#007F00,back:#F8F8ff"); # Double quoted String $_[0]->StyleSetSpec(120,"fore:#009F00,back:#F8F8ff"); # Single quoted string $_[0]->StyleSetSpec(121,"fore:#7F007F,back:#F8F8ff,italics"); # Keyword $_[0]->StyleSetSpec(122,"fore:#CC9900,back:#F8F8ff"); # Number $_[0]->StyleSetSpec(123,"fore:#00007F,back:#F8F8ff,italics"); # Variable $_[0]->StyleSetSpec(124,"fore:#777777,back:#F8F8ff"); # Comment $_[0]->StyleSetSpec(125,"fore:#aaaaaa,back:#F8F8Ff,italics"); # One line comment $_[0]->StyleSetSpec(126,"fore:#00007F,back:#F8F8Ff,italics"); # PHP variable in double quoted string $_[0]->StyleSetSpec(127,"fore:#000000,back:#F8F8Ff"); # PHP operator } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/conf.pm0000644000175000017500000000233711573645307024004 0ustar gregoagregoapackage syntaxhighlighter::conf; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_CONF wxSTC_H_TAG); $_[0]->SetLexer( wxSTC_LEX_CONF ); # Set Lexers to use $_[0]->SetKeyWords(0,''); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec( 0,"fore:#000000"); # whitespace (SCE_CONF_DEFAULT) $_[0]->StyleSetSpec( 1,"fore:#777777"); # Comment (SCE_CONF_COMMENT) $_[0]->StyleSetSpec( 2,"fore:#007f7f"); # Number (SCE_CONF_NUMBER) $_[0]->StyleSetSpec( 3,"fore:#888820"); # Apache Runtime Directive (SCE_CONF_DIRECTIVE) $_[0]->StyleSetSpec( 4,"fore:#202020"); # extensions (like .gz, .tgz, .html) (SCE_CONF_EXTENSION) $_[0]->StyleSetSpec( 5,"fore:#208820"); # parameters for Apache Runtime directives (SCE_CONF_PARAMETER) $_[0]->StyleSetSpec( 6,"fore:#882020"); # Double quoted string (SCE_CONF_STRING) $_[0]->StyleSetSpec( 7,"fore:#202020"); # Operators (SCE_CONF_OPERATOR) $_[0]->StyleSetSpec( 8,"fore:#209999"); # IP address (SCE_CONF_IP) $_[0]->StyleSetSpec( 9,"fore:#202020"); # identifier (SCE_CONF_IDENTIFIER) } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/matlab.pm0000644000175000017500000000151711573645307024316 0ustar gregoagregoapackage syntaxhighlighter::matlab; $VERSION = '0.01'; use Wx qw(wxSTC_LEX_MATLAB); sub load { $_[0]->SetLexer( wxSTC_LEX_MATLAB ); $_[0]->SetKeyWords(0,'break case catch continue else elseif end for function \ global if otherwise persistent return switch try while'); $_[0]->StyleSetSpec( 0,"fore:#000000"); # White space $_[0]->StyleSetSpec( 1,"fore:#aaaaaa"); # Comment $_[0]->StyleSetSpec( 2,"fore:#b06000,bold"); # Command $_[0]->StyleSetSpec( 3,"fore:#007f7f"); # Number $_[0]->StyleSetSpec( 4,"fore:#000077,bold"); # Keyword $_[0]->StyleSetSpec( 5,"fore:#f36600,back:#fffcff"); # String (5=single quoted, 8=double quoted) $_[0]->StyleSetSpec( 6,"fore:#800080"); # Operator $_[0]->StyleSetSpec( 7,"fore:#3355bb"); # Identifier $_[0]->StyleSetSpec( 8,"fore:#ee7b00,back:#fff8f8"); } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/make.pm0000644000175000017500000000133311573645307023767 0ustar gregoagregoapackage syntaxhighlighter::make; $VERSION = '0.01'; use Wx qw(wxSTC_LEX_MAKEFILE); sub load{ $_[0]->SetLexer( wxSTC_LEX_MAKEFILE ); $_[0]->SetKeyWords(0,''); $_[0]->StyleSetSpec( 0,"fore:#000000"); # Default $_[0]->StyleSetSpec( 1,"fore:#aaaaaa"); # Comment $_[0]->StyleSetSpec( 2,"fore:#007F00"); # Pre-processor or other comment: ! $_[0]->StyleSetSpec( 3,"fore:#000080"); # Variable: $(x) $_[0]->StyleSetSpec( 4,"fore:#7F007F"); # Operator $_[0]->StyleSetSpec( 5,"fore:#A00000"); # Target $_[0]->StyleSetSpec( 9,"fore:#7f0000,eolfilled");# Error $_[0]->StyleSetSpec(34,"fore:#0000ff,notbold");# Matched Operators $_[0]->StyleSetSpec(35,"fore:#ff0000,notbold");# Matched Operators } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/vb.pm0000644000175000017500000000525411573645307023467 0ustar gregoagregoapackage syntaxhighlighter::vb; $VERSION = '0.02'; sub load{ use Wx qw(wxSTC_LEX_VB wxSTC_H_TAG); my $vb_keywords = 'and begin case call continue do each else elseif end erase error event exit false for function get gosub goto if implement in load loop lset me mid new next not nothing on or property raiseevent rem resume return rset select set stop sub then to true unload until wend while with withevents attribute alias as boolean byref byte byval const compare currency date declare dim double enum explicit friend global integer let lib long module object option optional preserve private property public redim single static string type variant'; my $vbnet_keywords = 'addhandler addressof andalso alias and ansi as assembly auto boolean byref byte byval call case catch cbool cbyte cchar cdate cdec cdbl char cint class clng cobj const cshort csng cstr ctype date decimal declare default delegate dim do double each else elseif end enum erase error event exit false finally for friend function get gettype goto handles if implements imports in inherits integer interface is let lib like long loop me mod module mustinherit mustoverride mybase myclass namespace new next not nothing notinheritable notoverridable object on option optional or orelse overloads overridable overrides paramarray preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared short single static step stop string structure sub synclock then throw to true try typeof unicode until variant when while with withevents writeonly xor'; # Not used here, mostly system statements (files, registry, I/O...), # I am not sure I should include them in the regular statements. my $vb_otherstatements = 'appactivate beep chdir chdrive close deletesetting filecopy get input kill line lock unlock lset mid mkdir name open print put randomize reset rmdir rset savepicture savesetting seek sendkeys setattr time unload width write'; $_[0]->SetLexer( wxSTC_LEX_VB ); # Set Lexers to use $_[0]->SetKeyWords(0,$vbnet_keywords); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec( 0,"fore:#000000"); # whitespace $_[0]->StyleSetSpec( 1,"fore:#555555"); # Comment $_[0]->StyleSetSpec( 2,"fore:#007f7f"); # Number $_[0]->StyleSetSpec( 3,"fore:#3333aa,bold"); # Keyword $_[0]->StyleSetSpec( 4,"fore:#ff2020"); # String $_[0]->StyleSetSpec( 5,"fore:#208820"); # Preprocessor $_[0]->StyleSetSpec( 6,"fore:#882020"); # Operator $_[0]->StyleSetSpec( 7,"fore:#5577ff"); # Identifier $_[0]->StyleSetSpec( 8,"fore:#209999"); # Date } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/tcl.pm0000644000175000017500000001077511573645307023646 0ustar gregoagregoapackage syntaxhighlighter::tcl; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_TCL wxSTC_H_TAG); my $TclKeywords = 'after append array auto_execok auto_import auto_load \ auto_load_index auto_qualify beep binary break case catch cd clock \ close concat continue dde default echo else elseif encoding eof \ error eval exec exit expr fblocked fconfigure fcopy file \ fileevent flush for foreach format gets glob global history if \ incr info interp join lappend lindex linsert list llength load \ lrange lreplace lsearch lsort namespace open package pid \ pkg_mkIndex proc puts pwd read regexp regsub rename resource \ return scan seek set socket source split string subst switch \ tclLog tclMacPkgSearch tclPkgSetup tclPkgUnknown tell time \ trace unknown unset update uplevel upvar variable vwait while'; my $TkKeywordclass = 'bell bind bindtags button canvas checkbutton console \ destroy entry event focus font frame grab grid image label listbox menu \ menubutton message pack place radiobutton raise scale scrollbar \ text tk tkwait toplevel winfo wm'; my $ItclKeywordclass = "@scope body class code common component configbody \ constructor define destructor hull import inherit itcl itk itk_component \ itk_initialize itk_interior itk_option iwidgets keep method \ private protected public"; my $TkCommands = "tkButtonDown tkButtonEnter tkButtonInvoke \ tkButtonLeave tkButtonUp tkCancelRepeat tkCheckRadioInvoke tkDarken \ tkEntryAutoScan tkEntryBackspace tkEntryButton1 tkEntryClosestGap \ tkEntryInsert tkEntryKeySelect tkEntryMouseSelect tkEntryNextWord \ tkEntryPaste tkEntryPreviousWord tkEntrySeeInsert tkEntrySetCursor \ tkEntryTranspose tkEventMotifBindings tkFDGetFileTypes tkFirstMenu \ tkFocusGroup_Destroy tkFocusGroup_In tkFocusGroup_Out tkFocusOK \ tkListboxAutoScan tkListboxBeginExtend tkListboxBeginSelect \ tkListboxBeginToggle tkListboxCancel tkListboxDataExtend \ tkListboxExtendUpDown tkListboxMotion tkListboxSelectAll \ tkListboxUpDown tkMbButtonUp tkMbEnter tkMbLeave tkMbMotion \ tkMbPost tkMenuButtonDown tkMenuDownArrow tkMenuDup tkMenuEscape \ tkMenuFind tkMenuFindName tkMenuFirstEntry tkMenuInvoke tkMenuLeave \ tkMenuLeftArrow tkMenuMotion tkMenuNextEntry tkMenuNextMenu \ tkMenuRightArrow tkMenuUnpost tkMenuUpArrow tkMessageBox \ tkPostOverPoint tkRecolorTree tkRestoreOldGrab tkSaveGrabInfo \ tkScaleActivate tkScaleButton2Down tkScaleButtonDown \ tkScaleControlPress tkScaleDrag tkScaleEndDrag tkScaleIncrement \ tkScreenChanged tkScrollButton2Down tkScrollButtonDown \ tkScrollButtonUp tkScrollByPages tkScrollByUnits tkScrollDrag \ tkScrollEndDrag tkScrollSelect tkScrollStartDrag tkScrollToPos \ tkScrollTopBottom tkTabToWindow tkTearOffMenu tkTextAutoScan \ tkTextButton1 tkTextClosestGap tkTextInsert tkTextKeyExtend \ tkTextKeySelect tkTextNextPara tkTextNextPos tkTextNextWord \ tkTextPaste tkTextPrevPara tkTextPrevPos tkTextResetAnchor \ tkTextScrollPages tkTextSelectTo tkTextSetCursor tkTextTranspose \ tkTextUpDownLine tkTraverseToMenu tkTraverseWithinMenu tk_bisque \ tk_chooseColor tk_dialog tk_focusFollowsMouse tk_focusNext \ tk_focusPrev tk_getOpenFile tk_getSaveFile tk_messageBox \ tk_optionMenu tk_popup tk_setPalette tk_textCopy tk_textCut \ tk_textPaste"; $_[0]->SetLexer( wxSTC_LEX_TCL ); # Set Lexers to use $_[0]->SetKeyWords(0, $TclKeywords); #.$TkKeywordclass.$ItclKeywordclass.$TkCommands # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec( 0,"fore:#000000"); # whitespace (SCE_CONF_DEFAULT) $_[0]->StyleSetSpec( 1,"fore:#777777"); # Comment (SCE_CONF_COMMENT) $_[0]->StyleSetSpec( 2,"fore:#3350ff"); # Number (SCE_CONF_NUMBER) $_[0]->StyleSetSpec( 3,"fore:#888820"); # String $_[0]->StyleSetSpec( 4,"fore:#202020"); # Single quoted string $_[0]->StyleSetSpec( 5,"fore:#208820"); # Keyword $_[0]->StyleSetSpec( 6,"fore:#882020"); # Triple quotes $_[0]->StyleSetSpec( 7,"fore:#202020"); # Triple double quotes $_[0]->StyleSetSpec( 8,"fore:#209999"); # Class name definition $_[0]->StyleSetSpec( 9,"fore:#202020"); # Function or method name definition $_[0]->StyleSetSpec(10,"fore:#000000"); # Operators $_[0]->StyleSetSpec(11,"fore:#777777"); # Identifiers $_[0]->StyleSetSpec(12,"fore:#7f7f7f"); # Comment-blocks $_[0]->StyleSetSpec(13,"fore:#000000,back:#E0C0E0,eolfilled"); # End of line where string is not closed $_[0]->StyleSetSpec(34,"fore:#0000ff"); # Matched Operators $_[0]->StyleSetSpec(35,"fore:#ff0000"); # Matched Operators } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/js.pm0000644000175000017500000000400511573645307023465 0ustar gregoagregoapackage syntaxhighlighter::js; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_CPP wxSTC_H_TAG); my $js_keywords = 'abstract boolean break byte case catch char class \ const continue debugger default delete do double else enum export extends \ final finally float for function goto if implements import in instanceof \ int interface long native new package private protected public \ return short static super switch synchronized this throw throws \ transient try typeof var void volatile while with'; $_[0]->SetLexer(wxSTC_LEX_CPP); # Set Lexers to use $_[0]->SetKeyWords(0,$js_keywords); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); $_[0]->StyleSetSpec(0,"fore:#202020"); # White space $_[0]->StyleSetSpec(1,"fore:#bbbbbb"); # Comment $_[0]->StyleSetSpec(2,"fore:#cccccc)"); # Line Comment $_[0]->StyleSetSpec(3,"fore:#004000"); # Doc comment $_[0]->StyleSetSpec(4,"fore:#007f7f"); # Number $_[0]->StyleSetSpec(5,"fore:#7788bb,bold"); # Keywords $_[0]->StyleSetSpec(6,"fore:#555555,back:#ddeecc"); # Doublequoted string $_[0]->StyleSetSpec(7,"fore:#555555,back:#eeeebb"); # Single quoted string $_[0]->StyleSetSpec(8,"fore:#55ffff"); # UUIDs (only in IDL) $_[0]->StyleSetSpec(9,"fore:#228833"); # Preprocessor $_[0]->StyleSetSpec(10,"fore:#bb7799,bold"); # Operators $_[0]->StyleSetSpec(11,"fore:#778899"); # Identifiers (functions, etc.) $_[0]->StyleSetSpec(12,"fore:#228822"); # End of line where string is not closed $_[0]->StyleSetSpec(13,"fore:#339933"); # Verbatim strings for C# $_[0]->StyleSetSpec(14,"fore:#44aa44"); # Regular expressions for JavaScript $_[0]->StyleSetSpec(15,"fore:#55bb55"); # Doc Comment Line $_[0]->StyleSetSpec(17,"fore:#000000,back:#A0FFA0"); # Comment keyword $_[0]->StyleSetSpec(18,"fore:#000000,back:#F0E080"); # Comment keyword error # Braces are only matched in operator style braces.cpp.style=10 $_[0]->StyleSetSpec(32,"fore:#000000"); # Default } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/vbs.pm0000644000175000017500000000524611573645307023653 0ustar gregoagregoapackage syntaxhighlighter::vbs; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_VB wxSTC_H_TAG); my $vb_keywords = 'and begin case call continue do each else elseif end erase error event exit false for function get gosub goto if implement in load loop lset me mid new next not nothing on or property raiseevent rem resume return rset select set stop sub then to true unload until wend while with withevents attribute alias as boolean byref byte byval const compare currency date declare dim double enum explicit friend global integer let lib long module object option optional preserve private property public redim single static string type variant'; my $vbnet_keywords = 'addhandler addressof andalso alias and ansi as assembly auto boolean byref byte byval call case catch cbool cbyte cchar cdate cdec cdbl char cint class clng cobj const cshort csng cstr ctype date decimal declare default delegate dim do double each else elseif end enum erase error event exit false finally for friend function get gettype goto handles if implements imports in inherits integer interface is let lib like long loop me mod module mustinherit mustoverride mybase myclass namespace new next not nothing notinheritable notoverridable object on option optional or orelse overloads overridable overrides paramarray preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared short single static step stop string structure sub synclock then throw to true try typeof unicode until variant when while with withevents writeonly xor'; # Not used here, mostly system statements (files, registry, I/O...), # I am not sure I should include them in the regular statements. my $vb_otherstatements = 'appactivate beep chdir chdrive close deletesetting filecopy get input kill line lock unlock lset mid mkdir name open print put randomize reset rmdir rset savepicture savesetting seek sendkeys setattr time unload width write'; $_[0]->SetLexer( wxSTC_LEX_VB ); # Set Lexers to use $_[0]->SetKeyWords(0,$vb_keywords); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec( 0,"fore:#000000"); # whitespace $_[0]->StyleSetSpec( 1,"fore:#777777"); # Comment $_[0]->StyleSetSpec( 2,"fore:#007f7f"); # Number $_[0]->StyleSetSpec( 3,"fore:#888820"); # Keyword $_[0]->StyleSetSpec( 4,"fore:#202020"); # String $_[0]->StyleSetSpec( 5,"fore:#208820"); # Preprocessor $_[0]->StyleSetSpec( 6,"fore:#882020"); # Operator $_[0]->StyleSetSpec( 7,"fore:#202020"); # Identifier $_[0]->StyleSetSpec( 8,"fore:#209999"); # Date } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/css.pm0000644000175000017500000000550011573645307023642 0ustar gregoagregoapackage syntaxhighlighter::css; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_CSS wxSTC_H_TAG); $_[0]->SetLexer( wxSTC_LEX_CSS ); # Set Lexers to use $_[0]->SetKeyWords(0,' \ border border-bottom border-bottom-color border-bottom-style border-bottom-width \ border-color border-left border-left-color border-left-style border-left-width \ border-right border-right-color border-right-style border-right-width border-style \ border-top border-top-color border-top-style border-top-width border-width \ clear cursor display float position visibility \ height line-height max-height max-width min-height min-width width \ font font-family font-size font-size-adjust font-stretch font-style font-variant \ font-weight \ content counter-increment counter-reset quotes \ list-style list-style-image list-style-position list-style-type \ margin margin-bottom margin-left margin-right margin-top \ outline outline-color outline-style outline-width \ padding padding-bottom padding-left padding-right padding-top \ bottom clip left overflow right top vertical-align z-index \ border-collapse border-spacing caption-side empty-cells table-layout \ color direction letter-spacing text-align text-decoration text-indent \ text-transform unicode-bidi white-space word-spacing orphans marks page \ page-break-after page-break-before page-break-inside size widows \ azimuth cue cue-after cue-before elevation pause pause-after pause-before pitch \ pitch-range play-during richness speak speak-header speak-numeral speak-punctuation \ speech-rate stress voice-family volume '); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec( 0,"fore:#000000"); # Default $_[0]->StyleSetSpec( 1,"fore:#2020ff"); # HTML tag $_[0]->StyleSetSpec( 2,"fore:#3350ff"); # Class $_[0]->StyleSetSpec( 3,"fore:#202020"); # Pseudo class $_[0]->StyleSetSpec( 4,"fore:#202020"); # Unknown Pseudo class $_[0]->StyleSetSpec( 5,"fore:#208820"); # Operator $_[0]->StyleSetSpec( 6,"fore:#882020"); # Identifier $_[0]->StyleSetSpec( 7,"fore:#202020"); # Unknown Identifier $_[0]->StyleSetSpec( 8,"fore:#209999"); # Value $_[0]->StyleSetSpec( 9,"fore:#888820"); # Comment $_[0]->StyleSetSpec(10,"fore:#202020"); # ID $_[0]->StyleSetSpec(11,"fore:#202020"); # Important $_[0]->StyleSetSpec(12,"fore:#202020"); # Directive (@) $_[0]->StyleSetSpec(13,"fore:#202020"); # Double quoted strings $_[0]->StyleSetSpec(14,"fore:#202020"); # Single quoted strings } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/latex.pm0000644000175000017500000001755111573645307024200 0ustar gregoagregoapackage syntaxhighlighter::latex; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_TEX wxSTC_H_TAG); my $tex_primitives = 'above abovedisplayshortskip abovedisplayskip abovewithdelims accent adjdemerits advance afterassignment aftergroup atop atopwithdelims badness baselineskip batchmode begingroup belowdisplayshortskip belowdisplayskip binoppenalty botmark box boxmaxdepth brokenpenalty catcode char chardef cleaders closein closeout clubpenalty copy count countdef cr crcr csname day deadcycles def defaulthyphenchar defaultskewchar delcode delimiter delimiterfactor delimeters delimitershortfall delimeters dimen dimendef discretionary displayindent displaylimits displaystyle displaywidowpenalty displaywidth divide doublehyphendemerits dp dump edef else emergencystretch end endcsname endgroup endinput endlinechar eqno errhelp errmessage errorcontextlines errorstopmode escapechar everycr everydisplay everyhbox everyjob everymath everypar everyvbox exhyphenpenalty expandafter fam fi finalhyphendemerits firstmark floatingpenalty font fontdimen fontname futurelet gdef global group globaldefs halign hangafter hangindent hbadness hbox hfil horizontal hfill horizontal hfilneg hfuzz hoffset holdinginserts hrule hsize hskip hss horizontal ht hyphenation hyphenchar hyphenpenalty hyphen if ifcase ifcat ifdim ifeof iffalse ifhbox ifhmode ifinner ifmmode ifnum ifodd iftrue ifvbox ifvmode ifvoid ifx ignorespaces immediate indent input inputlineno input insert insertpenalties interlinepenalty jobname kern language lastbox lastkern lastpenalty lastskip lccode leaders left lefthyphenmin leftskip leqno let limits linepenalty line lineskip lineskiplimit long looseness lower lowercase mag mark mathaccent mathbin mathchar mathchardef mathchoice mathclose mathcode mathinner mathop mathopen mathord mathpunct mathrel mathsurround maxdeadcycles maxdepth meaning medmuskip message mkern month moveleft moveright mskip multiply muskip muskipdef newlinechar noalign noboundary noexpand noindent nolimits nonscript scriptscript nonstopmode nulldelimiterspace nullfont number omit openin openout or outer output outputpenalty over overfullrule overline overwithdelims pagedepth pagefilllstretch pagefillstretch pagefilstretch pagegoal pageshrink pagestretch pagetotal par parfillskip parindent parshape parskip patterns pausing penalty postdisplaypenalty predisplaypenalty predisplaysize pretolerance prevdepth prevgraf radical raise read relax relpenalty right righthyphenmin rightskip romannumeral scriptfont scriptscriptfont scriptscriptstyle scriptspace scriptstyle scrollmode setbox setlanguage sfcode shipout show showbox showboxbreadth showboxdepth showlists showthe skewchar skip skipdef spacefactor spaceskip span special splitbotmark splitfirstmark splitmaxdepth splittopskip string tabskip textfont textstyle the thickmuskip thinmuskip time toks toksdef tolerance topmark topskip tracingcommands tracinglostchars tracingmacros tracingonline tracingoutput tracingpages tracingparagraphs tracingrestores tracingstats uccode uchyph underline unhbox unhcopy unkern unpenalty unskip unvbox unvcopy uppercase vadjust valign vbadness vbox vcenter vfil vfill vfilneg vfuzz voffset vrule vsize vskip vsplit vss vtop wd widowpenalty write xdef xleaders xspaceskip year'; my $etex_primitives = 'beginL beginR botmarks clubpenalties currentgrouplevel currentgrouptype currentifbranch currentiflevel currentiftype detokenize dimexpr displaywidowpenalties endL endR eTeXrevision eTeXversion everyeof firstmarks fontchardp fontcharht fontcharic fontcharwd glueexpr glueshrink glueshrinkorder gluestretch gluestretchorder gluetomu ifcsname ifdefined iffontchar interactionmode interactionmode interlinepenalties lastlinefit lastnodetype marks topmarks middle muexpr mutoglue numexpr pagediscards parshapedimen parshapeindent parshapelength predisplaydirection savinghyphcodes savingvdiscards scantokens showgroups showifs showtokens splitdiscards splitfirstmarks TeXXeTstate tracingassigns tracinggroups tracingifs tracingnesting tracingscantokens unexpanded unless widowpenalties'; my $pdftex_primitives = 'pdfadjustspacing pdfannot pdfavoidoverfull pdfcatalog pdfcompresslevel pdfdecimaldigits pdfdest pdfdestmargin pdfendlink pdfendthread pdffontattr pdffontexpand pdffontname pdffontobjnum pdffontsize pdfhorigin pdfimageresolution pdfincludechars pdfinfo pdflastannot pdflastdemerits pdflastobj pdflastvbreakpenalty pdflastxform pdflastximage pdflastximagepages pdflastxpos pdflastypos pdflinesnapx pdflinesnapy pdflinkmargin pdfliteral pdfmapfile pdfmaxpenalty pdfminpenalty pdfmovechars pdfnames pdfobj pdfoptionpdfminorversion pdfoutline pdfoutput pdfpageattr pdfpageheight pdfpageresources pdfpagesattr pdfpagewidth pdfpkresolution pdfprotrudechars pdfrefobj pdfrefxform pdfrefximage pdfsavepos pdfsnaprefpoint pdfsnapx pdfsnapy pdfstartlink pdfstartthread pdftexrevision pdftexversion pdfthread pdfthreadmargin pdfuniqueresname pdfvorigin pdfxform pdfximage'; my $omega_primitives = 'odelimiter omathaccent omathchar oradical omathchardef omathcode odelcode leftghost rightghost charwd charht chardp charit localleftbox localrightbox localinterlinepenalty localbrokenpenalty pagedir bodydir pardir textdir mathdir boxdir nextfakemath pagewidth pageheight pagerightoffset pagebottomoffset nullocp nullocplist ocp externalocp ocplist pushocplist popocplist clearocplists ocptracelevel addbeforeocplist addafterocplist removebeforeocplist removeafterocplist OmegaVersion InputTranslation OutputTranslation DefaultInputTranslation DefaultOutputTranslation noInputTranslation noOutputTranslation InputMode OutputMode DefaultInputMode DefaultOutputMode noInputMode noOutputMode noDefaultInputMode noDefaultOutputMode'; # only the macros that make sense: my $partial_tex_macros = 'TeX bgroup egroup endgraf space empty null newcount newdimen newskip newmuskip newbox newtoks newhelp newread newwrite newfam newlanguage newinsert newif maxdimen magstephalf magstep frenchspacing nonfrenchspacing normalbaselines obeylines obeyspaces raggedright ttraggedright thinspace negthinspace enspace enskip quad qquad smallskip medskip bigskip removelastskip topglue vglue hglue break nobreak allowbreak filbreak goodbreak smallbreak medbreak bigbreak line leftline rightline centerline rlap llap underbar strutbox strut cases matrix pmatrix bordermatrix eqalign displaylines eqalignno leqalignno pageno folio tracingall showhyphens fmtname fmtversion hphantom vphantom phantom smash'; my $partial_etex_macros = 'eTeX newmarks grouptype interactionmode nodetype iftype tracingall loggingall tracingnone'; $_[0]->SetLexer(wxSTC_LEX_TEX); # Set Lexers to use $_[0]->SetKeyWords(0,$tex_primitives.$partial_tex_macros); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); $_[0]->StyleSetSpec(0,"fore:#202020"); # Default $_[0]->StyleSetSpec(1,"fore:#007f7f"); # Special $_[0]->StyleSetSpec(2,"fore:#7f0000)"); # Group $_[0]->StyleSetSpec(3,"fore:#7f7f00"); # Symbol $_[0]->StyleSetSpec(4,"fore:#007f00"); # Command $_[0]->StyleSetSpec(5,"fore:#000000"); # Text $_[0]->StyleSetSpec(34,"fore:#00007f"); # Identifiers $_[0]->StyleSetSpec(35,"fore:#7f007f"); # Identifiers } 1;kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/java.pm0000644000175000017500000000400511573645307023772 0ustar gregoagregoapackage syntaxhighlighter::java; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_CPP wxSTC_H_TAG); my $java_keywords = 'abstract assert boolean break byte case catch char class \ const continue default do double else extends final finally float for future \ generic goto if implements import inner instanceof int interface long \ native new null outer package private protected public rest \ return short static super switch synchronized this throw throws \ transient try var void volatile while'; $_[0]->SetLexer(wxSTC_LEX_CPP); # Set Lexers to use $_[0]->SetKeyWords(0,$java_keywords); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); $_[0]->StyleSetSpec(0,"fore:#202020"); # White space $_[0]->StyleSetSpec(1,"fore:#bbbbbb"); # Comment $_[0]->StyleSetSpec(2,"fore:#cccccc)"); # Line Comment $_[0]->StyleSetSpec(3,"fore:#004000"); # Doc comment $_[0]->StyleSetSpec(4,"fore:#007f7f"); # Number $_[0]->StyleSetSpec(5,"fore:#7788bb,bold"); # Keywords $_[0]->StyleSetSpec(6,"fore:#555555,back:#ddeecc"); # Doublequoted string $_[0]->StyleSetSpec(7,"fore:#555555,back:#eeeebb"); # Single quoted string $_[0]->StyleSetSpec(8,"fore:#55ffff"); # UUIDs (only in IDL) $_[0]->StyleSetSpec(9,"fore:#228833"); # Preprocessor $_[0]->StyleSetSpec(10,"fore:#bb7799,bold"); # Operators $_[0]->StyleSetSpec(11,"fore:#778899"); # Identifiers (functions, etc.) $_[0]->StyleSetSpec(12,"fore:#228822"); # End of line where string is not closed $_[0]->StyleSetSpec(13,"fore:#339933"); # Verbatim strings for C# $_[0]->StyleSetSpec(14,"fore:#44aa44"); # Regular expressions for JavaScript $_[0]->StyleSetSpec(15,"fore:#55bb55"); # Doc Comment Line $_[0]->StyleSetSpec(17,"fore:#000000,back:#A0FFA0"); # Comment keyword $_[0]->StyleSetSpec(18,"fore:#000000,back:#F0E080"); # Comment keyword error # Braces are only matched in operator style braces.cpp.style=10 $_[0]->StyleSetSpec(32,"fore:#000000"); # Default } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/cs2.pm0000644000175000017500000000431711573645307023546 0ustar gregoagregoa# alternative c# colors by Wolfgang Wagner package syntaxhighlighter::cs; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_CPP wxSTC_H_TAG); my $cs_keywords = 'bstract as base bool break byte case catch char checked class \ const continue decimal default delegate do double else enum \ event explicit extern false finally fixed float for foreach goto if \ implicit in int interface internal is lock long namespace new null \ object operator out override params private protected public \ readonly ref return sbyte sealed short sizeof stackalloc static \ string struct switch this throw true try typeof uint ulong \ unchecked unsafe ushort using virtual void while'; $_[0]->SetLexer(wxSTC_LEX_CPP); # Set Lexers to use $_[0]->SetKeyWords(0,$cs_keywords); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); $_[0]->StyleSetSpec(0,"fore:#202020"); # White space $_[0]->StyleSetSpec(1,"fore:#909090"); # Comment $_[0]->StyleSetSpec(2,"fore:#909090"); # Line Comment $_[0]->StyleSetSpec(3,"fore:#004000"); # Doc comment $_[0]->StyleSetSpec(4,"fore:#007f7f"); # Number $_[0]->StyleSetSpec(5,"fore:#000077,bold"); # Keywords $_[0]->StyleSetSpec(6,"fore:#108810"); # Doublequoted string $_[0]->StyleSetSpec(7,"fore:#108810"); # Single quoted string $_[0]->StyleSetSpec(8,"fore:#55ffff"); # UUIDs (only in IDL) $_[0]->StyleSetSpec(9,"fore:#228833"); # Preprocessor $_[0]->StyleSetSpec(10,"fore:#bb7799,bold"); # Operators $_[0]->StyleSetSpec(11,"fore:#404040"); # Identifiers (functions, etc.) $_[0]->StyleSetSpec(12,"fore:#228822"); # End of line where string is not closed $_[0]->StyleSetSpec(13,"fore:#339933"); # Verbatim strings for C# $_[0]->StyleSetSpec(14,"fore:#44aa44"); # Regular expressions for JavaScript $_[0]->StyleSetSpec(15,"fore:#55bb55"); # Doc Comment Line $_[0]->StyleSetSpec(17,"fore:#000000,back:#A0FFA0"); # Comment keyword $_[0]->StyleSetSpec(18,"fore:#000000,back:#F0E080"); # Comment keyword error # Braces are only matched in operator style braces.cpp.style=10 $_[0]->StyleSetSpec(32,"fore:#000000"); # Default } 1;kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/python.pm0000644000175000017500000000300211573645307024366 0ustar gregoagregoapackage syntaxhighlighter::python; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_PYTHON wxSTC_H_TAG); $_[0]->SetLexer( wxSTC_LEX_PYTHON ); # Set Lexers to use $_[0]->SetKeyWords(0,'and assert break class continue def del elif \ else except exec finally for from global if import in is lambda None \ not or pass print raise return try while yield'); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec( 0,"fore:#000000"); # whitespace (SCE_CONF_DEFAULT) $_[0]->StyleSetSpec( 1,"fore:#777777"); # Comment (SCE_CONF_COMMENT) $_[0]->StyleSetSpec( 2,"fore:#3350ff"); # Number (SCE_CONF_NUMBER) $_[0]->StyleSetSpec( 3,"fore:#888820"); # String $_[0]->StyleSetSpec( 4,"fore:#202020"); # Single quoted string $_[0]->StyleSetSpec( 5,"fore:#208820"); # Keyword $_[0]->StyleSetSpec( 6,"fore:#882020"); # Triple quotes $_[0]->StyleSetSpec( 7,"fore:#202020"); # Triple double quotes $_[0]->StyleSetSpec( 8,"fore:#209999"); # Class name definition $_[0]->StyleSetSpec( 9,"fore:#202020"); # Function or method name definition $_[0]->StyleSetSpec(10,"fore:#000000"); # Operators $_[0]->StyleSetSpec(11,"fore:#777777"); # Identifiers $_[0]->StyleSetSpec(12,"fore:#7f7f7f"); # Comment-blocks $_[0]->StyleSetSpec(13,"fore:#000000,back:#E0C0E0,eolfilled"); # End of line where string is not closed $_[0]->StyleSetSpec(34,"fore:#0000ff"); # Matched Operators $_[0]->StyleSetSpec(35,"fore:#ff0000"); # Matched Operators } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/cs.pm0000644000175000017500000000426411573645307023465 0ustar gregoagregoapackage syntaxhighlighter::cs; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_CPP wxSTC_H_TAG); my $cs_keywords = 'bstract as base bool break byte case catch char checked class \ const continue decimal default delegate do double else enum \ event explicit extern false finally fixed float for foreach goto if \ implicit in int interface internal is lock long namespace new null \ object operator out override params private protected public \ readonly ref return sbyte sealed short sizeof stackalloc static \ string struct switch this throw true try typeof uint ulong \ unchecked unsafe ushort using virtual void while'; $_[0]->SetLexer(wxSTC_LEX_CPP); # Set Lexers to use $_[0]->SetKeyWords(0,$cs_keywords); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); $_[0]->StyleSetSpec(0,"fore:#202020"); # White space $_[0]->StyleSetSpec(1,"fore:#bbbbbb"); # Comment $_[0]->StyleSetSpec(2,"fore:#cccccc)"); # Line Comment $_[0]->StyleSetSpec(3,"fore:#004000"); # Doc comment $_[0]->StyleSetSpec(4,"fore:#007f7f"); # Number $_[0]->StyleSetSpec(5,"fore:#7788bb,bold"); # Keywords $_[0]->StyleSetSpec(6,"fore:#555555,back:#ddeecc"); # Doublequoted string $_[0]->StyleSetSpec(7,"fore:#555555,back:#eeeebb"); # Single quoted string $_[0]->StyleSetSpec(8,"fore:#55ffff"); # UUIDs (only in IDL) $_[0]->StyleSetSpec(9,"fore:#228833"); # Preprocessor $_[0]->StyleSetSpec(10,"fore:#bb7799,bold"); # Operators $_[0]->StyleSetSpec(11,"fore:#778899"); # Identifiers (functions, etc.) $_[0]->StyleSetSpec(12,"fore:#228822"); # End of line where string is not closed $_[0]->StyleSetSpec(13,"fore:#339933"); # Verbatim strings for C# $_[0]->StyleSetSpec(14,"fore:#44aa44"); # Regular expressions for JavaScript $_[0]->StyleSetSpec(15,"fore:#55bb55"); # Doc Comment Line $_[0]->StyleSetSpec(17,"fore:#000000,back:#A0FFA0"); # Comment keyword $_[0]->StyleSetSpec(18,"fore:#000000,back:#F0E080"); # Comment keyword error # Braces are only matched in operator style braces.cpp.style=10 $_[0]->StyleSetSpec(32,"fore:#000000"); # Default } 1;kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/sh.pm0000644000175000017500000001000611573645307023461 0ustar gregoagregoapackage syntaxhighlighter::sh; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_PERL wxSTC_H_TAG); $_[0]->SetLexer( wxSTC_LEX_PERL ); # Set Lexers for perl and Bash shell $_[0]->SetKeyWords(0,'alias \ ar asa awk banner basename bash bc bdiff break \ bunzip2 bzip2 cal calendar case cat cc cd chmod cksum \ clear cmp col comm compress continue cp cpio crypt \ csplit ctags cut date dc dd declare deroff dev df diff diff3 \ dircmp dirname do done du echo ed egrep elif else env \ esac eval ex exec exit expand export expr false fc \ fgrep fi file find fmt fold for function functions \ getconf getopt getopts grep gres hash head help \ history iconv id if in integer jobs join kill local lc \ let line ln logname look ls m4 mail mailx make \ man mkdir more mt mv newgrp nl nm nohup ntps od \ pack paste patch pathchk pax pcat perl pg pr print \ printf ps pwd read readonly red return rev rm rmdir \ sed select set sh shift size sleep sort spell \ split start stop strings strip stty sum suspend \ sync tail tar tee test then time times touch tr \ trap true tsort tty type typeset ulimit umask unalias \ uname uncompress unexpand uniq unpack unset until \ uudecode uuencode vi vim vpax wait wc whence which \ while who wpaste wstart xargs zcat'); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec(0,"fore:#202020"); # White space $_[0]->StyleSetSpec(1,"fore:#ff0000"); # Error $_[0]->StyleSetSpec(2,"fore:#aaaaaa)"); # Comment $_[0]->StyleSetSpec(3,"fore:#004000,back:#E0FFE0,$(font.text),eolfilled"); # POD: = at beginning of line $_[0]->StyleSetSpec(4,"fore:#007f7f"); # Number $_[0]->StyleSetSpec(5,"fore:#000077,bold"); # Keywords $_[0]->StyleSetSpec(6,"fore:#ee7b00,back:#fff8f8"); # Doublequoted string $_[0]->StyleSetSpec(7,"fore:#f36600,back:#fff8ff"); # Single quoted string $_[0]->StyleSetSpec(8,"fore:#555555"); # Symbols / Punctuation. Currently not used by LexPerl. $_[0]->StyleSetSpec(9,""); # Preprocessor. Currently not used by LexPerl. $_[0]->StyleSetSpec(10,"$(colour.operator),bold"); # Operators $_[0]->StyleSetSpec(11,"fore:#3355bb"); # Identifiers (functions, etc.) $_[0]->StyleSetSpec(12,"fore:#228822"); # Scalars: $var $_[0]->StyleSetSpec(13,"fore:#339933"); # Array: @var $_[0]->StyleSetSpec(14,"fore:#44aa44"); # Hash: %var $_[0]->StyleSetSpec(15,"fore:#55bb55"); # Symbol table: *var $_[0]->StyleSetSpec(17,"fore:#000000,back:#A0FFA0"); # Regex: /re/ or m{re} $_[0]->StyleSetSpec(18,"fore:#000000,back:#F0E080"); # Substitution: s/re/ore/ $_[0]->StyleSetSpec(19,"fore:#FFFF00,back:#8080A0"); # Long Quote (qq, qr, qw, qx) -- obsolete: replaced by qq, qx, qr, qw $_[0]->StyleSetSpec(20,"fore:#FFFF00,back:#A08080"); # Back Ticks $_[0]->StyleSetSpec(21,"fore:#600000,back:#FFF0D8,eolfilled");# Data Section: __DATA__ or __END__ at beginning of line $_[0]->StyleSetSpec(22,"fore:#000000,back:#DDD0DD"); # Here-doc (delimiter) $_[0]->StyleSetSpec(23,"fore:#7F007F,back:#DDD0DD,eolfilled,notbold");# Here-doc (single quoted, q) $_[0]->StyleSetSpec(24,"fore:#7F007F,back:#DDD0DD,eolfilled,bold"); # Here-doc (double quoted, qq) $_[0]->StyleSetSpec(25,"fore:#7F007F,back:#DDD0DD,eolfilled,italics");# Here-doc (back ticks, qx) $_[0]->StyleSetSpec(26,"fore:#7F007F,$(font.monospace),notbold"); # Single quoted string, generic $_[0]->StyleSetSpec(27,"$(style.perl.6)"); # qq = Double quoted string $_[0]->StyleSetSpec(28,"$(style.perl.20)"); # qx = Back ticks $_[0]->StyleSetSpec(29,"$(style.perl.17)"); # qr = Regex $_[0]->StyleSetSpec(30,"fore:#f36600,back:#fff8f8"); # qw = Array } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/ave.pm0000644000175000017500000000205111573645307023623 0ustar gregoagregoapackage syntaxhighlighter::ave; $VERSION = '0.01'; use Wx qw(wxSTC_LEX_AVE wxSTC_H_TAG); sub load{ $_[0]->SetLexer( wxSTC_LEX_AVE ); $_[0]->SetKeyWords(0,'nil true false else for if while then elseif end av self \ in exit'); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec( 0,"fore:#FF0000"); # White space $_[0]->StyleSetSpec( 1,"fore:#aaaaaa"); # Comment $_[0]->StyleSetSpec( 2,"fore:#007f7f"); # Number $_[0]->StyleSetSpec( 3,"fore:#000077,bold"); # Keyword $_[0]->StyleSetSpec( 6,"fore:#f36600"); # String $_[0]->StyleSetSpec( 7,"fore:#207f7f,bold"); # Enumeration $_[0]->StyleSetSpec( 8,"back:#E0C0E0,eolfilled"); # End of line where string is not closed $_[0]->StyleSetSpec( 9,"fore:#7F007f"); # Identifier (everything else...) $_[0]->StyleSetSpec(10,"fore:#ff9999"); # Operators $_[0]->StyleSetSpec(11,"fore:#FF0000"); # Illegal token $_[0]->StyleSetSpec(32,"fore:#000000"); # Default # Other keywords 12-16 (bozo test colors :-) 12,13 bold } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/yaml.pm0000644000175000017500000000231411573645307024014 0ustar gregoagregoapackage syntaxhighlighter::yaml; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_YAML wxSTC_H_TAG); $_[0]->SetLexer( wxSTC_LEX_YAML ); # Set Lexers to use $_[0]->SetKeyWords(0,'true false yes no'); # Add new keyword. $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec(0,"fore:#000000"); # default $_[0]->StyleSetSpec(1,"fore:#008800"); # comment line $_[0]->StyleSetSpec(2,"fore:#000088,bold"); # value identifier $_[0]->StyleSetSpec(3,"fore:#880088"); # keyword value $_[0]->StyleSetSpec(4,"fore:#880000"); # numerical value $_[0]->StyleSetSpec(5,"fore:#008888"); # reference/repeating value $_[0]->StyleSetSpec(6,"fore:#FFFFFF,bold,back:#000088,eolfilled"); # document delimiting line $_[0]->StyleSetSpec(7,"fore:#333366"); # text block marker $_[0]->StyleSetSpec(8,"fore:#FFFFFF,italics,bold,back:#FF0000,eolfilled");# syntax error marker } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/scheme.pm0000644000175000017500000000611611573645307024322 0ustar gregoagregoapackage syntaxhighlighter::scheme; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_LISP wxSTC_H_TAG); $_[0]->SetLexer( wxSTC_LEX_LISP ); $_[0]->SetKeyWords(0,'+ - * / = < > <= >= => \ abs acos and angle append apply asin assoc assoc assq assv atan \ begin boolean? \ caar cadr call-with-current-continuation call/cc \ call-with-input-file call-with-output-file call-with-values \ car cdr \ caar cadr cdar cddr \ caaar caadr cadar caddr cdaar cdadr cddar cdddr \ caaaar caaadr caadar caaddr cadaar cadadr caddar cadddr \ cdaaar cdaadr cdadar cdaddr cddaar cddadr cdddar cddddr \ case ceiling char->integer \ char-alphabetic? char-ci<=? char-ci=? char-ci>? \ char-downcase char-lower-case? char-numeric? char-ready? \ char-upcase char-upper-case? char-whitespace? \ char<=? char=? char>? char? \ close-input-port close-output-port complex? cond cons cos \ current-input-port current-output-port \ define define-syntax delay denominator display do dynamic-wind \ else eof-object? eq? equal? eqv? eval even? exact->inexact exact? \ exp expt \ floor for-each force \ gcd \ if imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment \ lambda lcm length let let* let-syntax letrec letrec-syntax \ list list->string list->vector list-ref list-tail list? load log \ magnitude make-polar make-rectangular make-string make-vector \ map max member memq memv min modulo \ negative? newline not null-environment null? number->string number? numerator \ odd? open-input-file open-output-file or output-port? \ pair? peek-char input-port? output-port? positive? procedure? \ quasiquote quote quotient \ rational? rationalize read read-char real-part real? remainder reverse round \ scheme-report-environment set! set-car! set-cdr! sin sqrt string \ string->list string->number string->symbol string-append \ string-ci<=? string-ci=? string-ci>? \ string-copy string-fill! string-length string-ref string-set! \ string<=? string=? string>? string? \ substring symbol->string symbol? syntax-rules \ transcript-off transcript-on truncate \ unquote unquote-splicing \ values vector vector->list vector-fill! vector-length vector-ref vector-set! vector? \ with-input-from-file with-output-to-file write write-char \ zero?'); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec(32,"fore:#000000"); # Default $_[0]->StyleSetSpec( 0,"fore:#000000"); # White space $_[0]->StyleSetSpec( 1,"fore:#447744"); # Line Comment $_[0]->StyleSetSpec( 2,"fore:#007f7f"); # Number $_[0]->StyleSetSpec( 3,"fore:#000077,bold"); # Keyword $_[0]->StyleSetSpec( 6,"fore:#882020"); # String $_[0]->StyleSetSpec( 8,"fore:#209999,eolfilled"); # End of line where string is not closed $_[0]->StyleSetSpec( 9,"fore:#7F0000"); # Identifiers $_[0]->StyleSetSpec(10,"fore:#eecc99,bold"); # Operators $_[0]->StyleSetSpec(34,"fore:#0000FF,bold"); # Matched Operators $_[0]->StyleSetSpec(35,"fore:#FF0000,bold"); # } 1;kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/asm.pm0000644000175000017500000002367611573645307023650 0ustar gregoagregoapackage syntaxhighlighter::asm; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_ASM wxSTC_H_TAG); # these keywords are taken from the masm book (v6.13) # updated with Intel Pentium 4, MMX, SSE, SSE2 instructions from NASM # (note that some are undocumented instructions) my $cpu_instruction = 'aaa aad aam aas adc add and call cbw \ clc cld cli cmc cmp cmps cmpsb cmpsw cwd daa das dec div esc hlt \ idiv imul in inc int into iret ja jae jb jbe jc jcxz je jg jge jl \ jle jmp jna jnae jnb jnbe jnc jne jng jnge jnl jnle jno jnp jns \ jnz jo jp jpe jpo js jz lahf lds lea les lods lodsb lodsw loop \ loope loopew loopne loopnew loopnz loopnzw loopw loopz loopzw \ mov movs movsb movsw mul neg nop not or out pop popf push pushf \ rcl rcr ret retf retn rol ror sahf sal sar sbb scas scasb scasw \ shl shr stc std sti stos stosb stosw sub test wait xchg xlat \ xlatb xor \ bound enter ins insb insw leave outs outsb outsw popa pusha pushw \ arpl lar lsl sgdt sidt sldt smsw str verr verw clts lgdt lidt lldt lmsw ltr \ bsf bsr bt btc btr bts cdq cmpsd cwde insd iretd iretdf iretf \ jecxz lfs lgs lodsd loopd looped loopned loopnzd loopzd lss \ movsd movsx movzx outsd popad popfd pushad pushd pushfd scasd seta \ setae setb setbe setc sete setg setge setl setle setna setnae setnb \ setnbe setnc setne setng setnge setnl setnle setno setnp setns \ setnz seto setp setpe setpo sets setz shld shrd stosd \ bswap cmpxchg invd invlpg wbinvd xadd \ lock rep repe repne repnz repz'; # these are mostly non-MMX/SSE/SSE2 486+ instructions my $cpu_instruction2 = 'cflush cpuid emms femms \ cmovo cmovno cmovb cmovc cmovnae cmovae cmovnb cmovnc \ cmove cmovz cmovne cmovnz cmovbe cmovna cmova cmovnbe \ cmovs cmovns cmovp cmovpe cmovnp cmovpo cmovl cmovnge \ cmovge cmovnl cmovle cmovng cmovg cmovnle \ cmpxchg486 cmpxchg8b \ loadall loadall286 ibts icebp int1 int3 int01 int03 iretw \ popaw popfw pushaw pushfw rdmsr rdpmc rdshr rdtsc \ rsdc rsldt rsm rsts salc smi smint smintold svdc svldt svts \ syscall sysenter sysexit sysret ud0 ud1 ud2 umov xbts wrmsr wrshr'; # fpu instructions, updated for 486+ my $fpu_instruction = 'f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcom fcomp fcompp fdecstp \ fdisi fdiv fdivp fdivr fdivrp feni ffree fiadd ficom ficomp fidiv \ fidivr fild fimul fincstp finit fist fistp fisub fisubr fld fld1 \ fldcw fldenv fldenvw fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul \ fmulp fnclex fndisi fneni fninit fnop fnsave fnsavew fnstcw fnstenv \ fnstenvw fnstsw fpatan fprem fptan frndint frstor frstorw fsave \ fsavew fscale fsqrt fst fstcw fstenv fstenvw fstp fstsw fsub fsubp \ fsubr fsubrp ftst fwait fxam fxch fxtract fyl2x fyl2xp1 \ fsetpm fcos fldenvd fnsaved fnstenvd fprem1 frstord fsaved fsin fsincos \ fstenvd fucom fucomp fucompp fcomi fcomip ffreep \ fcmovb fcmove fcmovbe fcmovu fcmovnb fcmovne fcmovnbe fcmovnu'; # these are MMX, SSE, SSE2 instructions my $ext_instruction = 'addpd addps addsd addss andpd andps andnpd andnps \ cmpeqpd cmpltpd cmplepd cmpunordpd cmpnepd cmpnltpd cmpnlepd cmpordpd \ cmpeqps cmpltps cmpleps cmpunordps cmpneps cmpnltps cmpnleps cmpordps \ cmpeqsd cmpltsd cmplesd cmpunordsd cmpnesd cmpnltsd cmpnlesd cmpordsd \ cmpeqss cmpltss cmpless cmpunordss cmpness cmpnltss cmpnless cmpordss \ comisd comiss cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps \ cvtpi2pd cvtpi2ps cvtps2dq cvtps2pd cvtps2pi cvtss2sd cvtss2si \ cvtsd2si cvtsd2ss cvtsi2sd cvtsi2ss \ cvttpd2dq cvttpd2pi cvttps2dq cvttps2pi cvttsd2si cvttss2si \ divpd divps divsd divss fxrstor fxsave ldmxscr lfence mfence \ maskmovdqu maskmovdq maxpd maxps paxsd maxss minpd minps minsd minss \ movapd movaps movdq2q movdqa movdqu movhlps movhpd movhps movd movq \ movlhps movlpd movlps movmskpd movmskps movntdq movnti movntpd movntps \ movntq movq2dq movsd movss movupd movups mulpd mulps mulsd mulss \ orpd orps packssdw packsswb packuswb paddb paddsb paddw paddsw \ paddd paddsiw paddq paddusb paddusw pand pandn pause paveb pavgb pavgw \ pavgusb pdistib pextrw pcmpeqb pcmpeqw pcmpeqd pcmpgtb pcmpgtw pcmpgtd \ pf2id pf2iw pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul \ pmachriw pmaddwd pmagw pmaxsw pmaxub pminsw pminub pmovmskb \ pmulhrwc pmulhriw pmulhrwa pmulhuw pmulhw pmullw pmuludq \ pmvzb pmvnzb pmvlzb pmvgezb pfnacc pfpnacc por prefetch prefetchw \ prefetchnta prefetcht0 prefetcht1 prefetcht2 pfrcp pfrcpit1 pfrcpit2 \ pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pf2iw pinsrw psadbw pshufd \ pshufhw pshuflw pshufw psllw pslld psllq pslldq psraw psrad \ psrlw psrld psrlq psrldq psubb psubw psubd psubq psubsb psubsw \ psubusb psubusw psubsiw pswapd punpckhbw punpckhwd punpckhdq punpckhqdq \ punpcklbw punpcklwd punpckldq punpcklqdq pxor rcpps rcpss \ rsqrtps rsqrtss sfence shufpd shufps sqrtpd sqrtps sqrtsd sqrtss \ stmxcsr subpd subps subsd subss ucomisd ucomiss \ unpckhpd unpckhps unpcklpd unpcklps xorpd xorps'; my $register = 'ah al ax bh bl bp bx ch cl cr0 cr2 cr3 cr4 cs \ cx dh di dl dr0 dr1 dr2 dr3 dr6 dr7 ds dx eax ebp ebx ecx edi edx \ es esi esp fs gs si sp ss st tr3 tr4 tr5 tr6 tr7 \ st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 \ xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7'; # masm directives my $directive = '.186 .286 .286c .286p .287 .386 .386c .386p .387 .486 .486p \ .8086 .8087 .alpha .break .code .const .continue .cref .data .data? \ .dosseg .else .elseif .endif .endw .err .err1 .err2 .errb \ .errdef .errdif .errdifi .erre .erridn .erridni .errnb .errndef \ .errnz .exit .fardata .fardata? .if .lall .lfcond .list .listall \ .listif .listmacro .listmacroall .model .no87 .nocref .nolist \ .nolistif .nolistmacro .radix .repeat .sall .seq .sfcond .stack \ .startup .tfcond .type .until .untilcxz .while .xall .xcref \ .xlist alias align assume catstr comm comment db dd df dosseg dq \ dt dup dw echo else elseif elseif1 elseif2 elseifb elseifdef elseifdif \ elseifdifi elseife elseifidn elseifidni elseifnb elseifndef end \ endif endm endp ends eq equ even exitm extern externdef extrn for \ forc ge goto group gt high highword if if1 if2 ifb ifdef ifdif \ ifdifi ife ifidn ifidni ifnb ifndef include includelib instr invoke \ irp irpc label le length lengthof local low lowword lroffset \ lt macro mask mod .msfloat name ne offset opattr option org %out \ page popcontext proc proto ptr public purge pushcontext record \ repeat rept seg segment short size sizeof sizestr struc struct \ substr subtitle subttl textequ this title type typedef union while width'; my $directive_operand = '$ ? @b @f addr basic byte c carry? dword \ far far16 fortran fword near near16 overflow? parity? pascal qword \ real4 real8 real10 sbyte sdword sign? stdcall sword syscall tbyte \ vararg word zero? flat near32 far32 \ abs all assumes at casemap common compact \ cpu dotname emulator epilogue error export expr16 expr32 farstack flat \ forceframe huge language large listing ljmp loadds m510 medium memory \ nearstack nodotname noemulator nokeyword noljmp nom510 none nonunique \ nooldmacros nooldstructs noreadonly noscoped nosignextend nothing \ notpublic oldmacros oldstructs os_dos para private prologue radix \ readonly req scoped setif2 smallstack tiny use16 use32 uses'; # nasm directives, mostly complete, does not parse properly # the following: %!, %%, %+, %+n %-n, %{n} my $directive_nasm = 'db dw dd dq dt resb resw resd resq rest incbin equ times \ %define %idefine %xdefine %xidefine %undef %assign %iassign \ %strlen %substr %macro %imacro %endmacro %rotate .nolist \ %if %elif %else %endif %ifdef %ifndef %elifdef %elifndef \ %ifmacro %ifnmacro %elifmacro %elifnmacro %ifctk %ifnctk %elifctk %elifnctk \ %ifidn %ifnidn %elifidn %elifnidn %ifidni %ifnidni %elifidni %elifnidni \ %ifid %ifnid %elifid %elifnid %ifstr %ifnstr %elifstr %elifnstr \ %ifnum %ifnnum %elifnum %elifnnum %error %rep %endrep %exitrep \ %include %push %pop %repl struct endstruc istruc at iend align alignb \ %arg %stacksize %local %line \ bits use16 use32 section absolute extern global common cpu org \ section group import export'; my $directive_operand_nasm = 'a16 a32 o16 o32 byte word dword nosplit $ $$ seq wrt \ flat large small .text .data .bss near far \ %0 %1 %2 %3 %4 %5 %6 %7 %8 %9'; $_[0]->SetLexer( wxSTC_LEX_ASM ); # Set Lexers to use # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->SetKeyWords(0,$cpu_instruction.$cpu_instruction2); $_[0]->SetKeyWords(1,$fpu_instruction); $_[0]->SetKeyWords(2,$register); $_[0]->SetKeyWords(3,$cpu_instruction.$cpu_instruction2); $_[0]->SetKeyWords(4,$directive.$directive_nasm); $_[0]->SetKeyWords(5,$directive_operand.$directive_operand_nasm); $_[0]->SetKeyWords(6,$ext_instruction); $_[0]->StyleSetSpec( 0,"fore:#000000"); # default $_[0]->StyleSetSpec( 1,"fore:#adadad,italic"); # Comment $_[0]->StyleSetSpec( 2,"fore:#007f7f"); # Number $_[0]->StyleSetSpec( 3,"fore:#007f7f,back:#eeeeee"); # String $_[0]->StyleSetSpec( 4,"fore:#cf007f"); # Operator $_[0]->StyleSetSpec( 5,"fore:#000077,bold"); # Identifier $_[0]->StyleSetSpec( 6,"fore:#ff5500,back:#ffffff"); # CPU instruction $_[0]->StyleSetSpec( 7,"fore:#ff3300,back:#f5f5f5"); # FPU instruction $_[0]->StyleSetSpec( 8,"fore:#118811"); # Register $_[0]->StyleSetSpec( 9,"fore:#bb6600,back:#f5f5f5"); # assembler Directive $_[0]->StyleSetSpec(10,"fore:#bb6644"); # assembler Directive Operand $_[0]->StyleSetSpec(11,"fore:#adadad"); # Comment block (GNU as /*...*/ syntax, unimplemented) $_[0]->StyleSetSpec(12,"fore:#228822"); # Character/String (single quote) (also character prefix in GNU as) $_[0]->StyleSetSpec(13,"fore:#ffeeee,back:#E0C0E0,eolfilled"); # End of line where string is not closed $_[0]->StyleSetSpec(14,"fore:#44aa44"); # Extended instructions $_[0]->StyleSetSpec(32,"fore:#808080"); # Assembler Styles } 1;kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/diff.pm0000644000175000017500000000130611573645307023762 0ustar gregoagregoapackage syntaxhighlighter::diff; $VERSION = '0.01'; use Wx qw(wxSTC_LEX_DIFF); sub load{ $_[0]->SetLexer( wxSTC_LEX_DIFF ); $_[0]->SetKeyWords(0,''); $_[0]->StyleSetSpec( 0,"fore:#000000"); # Default $_[0]->StyleSetSpec( 1,"fore:#007F00"); # Comment (part before "diff ..." or "--- ..." and , Only in ..., Binary file...) $_[0]->StyleSetSpec( 2,"fore:#7F7F00"); # Command (diff ...) $_[0]->StyleSetSpec( 3,"fore:#7F0000"); # Source file (--- ...) and Destination file (+++ ...) $_[0]->StyleSetSpec( 4,"fore:#7F007F"); # Position setting (@@ ...) $_[0]->StyleSetSpec( 5,"fore:#007F7F"); # Line removal (-...) $_[0]->StyleSetSpec( 6,"fore:#00007F"); # Line addition (+...) } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/batch.pm0000644000175000017500000000204311573645307024132 0ustar gregoagregoapackage syntaxhighlighter::batch; $VERSION = '0.01'; use Wx qw(wxSTC_LEX_BATCH); sub load{ $_[0]->SetLexer( wxSTC_LEX_BATCH ); $_[0]->SetKeyWords(0,'rem set if exist errorlevel for in do \ break call chcp cd chdir choice cls country ctty date del erase dir echo \ exit goto loadfix loadhigh mkdir md move path pause prompt rename ren \ rmdir rd shift time type ver verify vol \ com con lpt nul \ color copy defined else not start'); $_[0]->StyleSetSpec( 0,"fore:#000000"); # Default $_[0]->StyleSetSpec( 1,"fore:#aaaaaa"); # Comment (rem or ::) $_[0]->StyleSetSpec( 2,"fore:#000077,bold"); # Keywords $_[0]->StyleSetSpec( 3,"fore:#ee7b00"); # Label (line beginning with ':') $_[0]->StyleSetSpec( 4,"fore:#7F007F"); # Hide command character ('@') $_[0]->StyleSetSpec( 5,"fore:#007090,bold"); # External commands $_[0]->StyleSetSpec( 6,"fore:#800080"); # Variable: %%x (x is almost whatever, except space and %), %n (n in [0-9]), %EnvironmentVar% $_[0]->StyleSetSpec( 7,"fore:#000000"); # Operator: * ? < > | } 1; kephra-0.4.3.34+dfsg.orig/share/config/syntaxhighlighter/lisp.pm0000644000175000017500000000372611573645307024031 0ustar gregoagregoapackage syntaxhighlighter::lisp; $VERSION = '0.01'; sub load{ use Wx qw(wxSTC_LEX_LISP wxSTC_H_TAG); $_[0]->SetLexer( wxSTC_LEX_LISP ); # Set Lexers to use $_[0]->SetKeyWords(0,'not defun + - * / = < > <= >= princ eval apply funcall quote identity function complement backquote lambda set setq setf defun defmacro gensym make symbol intern symbol name symbol value symbol plist get getf putprop remprop hash make array aref car cdr caar cadr cdar cddr caaar caadr cadar caddr cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr cadaar cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr cddaar cddadr cdddar cddddr cons list append reverse last nth nthcdr member assoc subst sublis nsubst nsublis remove length list length mapc mapcar mapl maplist mapcan mapcon rplaca rplacd nconc delete atom symbolp numberp boundp null listp consp minusp zerop plusp evenp oddp eq eql equal cond case and or let l if prog prog1 prog2 progn go return do dolist dotimes catch throw error cerror break continue errset baktrace evalhook truncate float rem min max abs sin cos tan expt exp sqrt random logand logior logxor lognot bignums logeqv lognand lognor logorc2 logtest logbitp logcount integer length nil'); # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec(32,"fore:#000000"); # Default $_[0]->StyleSetSpec( 0,"fore:#000000"); # White space $_[0]->StyleSetSpec( 1,"fore:#447744"); # Line Comment $_[0]->StyleSetSpec( 2,"fore:#007f7f"); # Number $_[0]->StyleSetSpec( 3,"fore:#000077,bold"); # Keyword $_[0]->StyleSetSpec( 6,"fore:#882020"); # String $_[0]->StyleSetSpec( 8,"fore:#209999,eolfilled"); # End of line where string is not closed $_[0]->StyleSetSpec( 9,"fore:#7F0000"); # Identifiers $_[0]->StyleSetSpec(10,"fore:#eecc99,bold"); # Operators $_[0]->StyleSetSpec(34,"fore:#0000FF,bold"); # Matched Operators $_[0]->StyleSetSpec(35,"fore:#FF0000,bold"); # } 1;kephra-0.4.3.34+dfsg.orig/share/config/session/0000755000175000017500000000000012300715027020414 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/share/config/session/current.yaml0000644000175000017500000000615211657612064023001 0ustar gregoagregoa--- current_nr: 0 document: - EOL: auto codepage: utf8 config_file: ~ cursor_pos: 639 edit_pos: 115 file_path: '/home/lichtkind/txt/artikel/heise/Moose.txt' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: none tab_size: 4 tab_use: 1 - EOL: auto codepage: utf8 config_file: ~ cursor_pos: 68 edit_pos: '-1' file_path: '/home/lichtkind/txt/artikel/heise/material.txt' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: none tab_size: 4 tab_use: 0 - EOL: auto codepage: 8bit config_file: ~ cursor_pos: 37 edit_pos: 624 file_path: '/home/lichtkind/code/perl/test/oop/simple.pl' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: perl tab_size: 4 tab_use: 1 - EOL: lf codepage: utf8 config_file: ~ cursor_pos: 26 edit_pos: 242 file_path: '/home/lichtkind/code/perl/project/editor/dev/xp/Kephra/lib/Kephra/Document.pm' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: perl tab_size: 4 tab_use: 0 - EOL: lf codepage: utf8 config_file: ~ cursor_pos: 521 edit_pos: 2806 file_path: '/home/lichtkind/code/perl/project/editor/dev/xp/Kephra/lib/Kephra/App/Window.pm' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: perl tab_size: 4 tab_use: 0 - EOL: auto codepage: utf8 config_file: ~ cursor_pos: 191 edit_pos: 566 file_path: '/home/lichtkind/code/perl/project/notiz/bn.pl' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: perl tab_size: 4 tab_use: 0 - EOL: auto codepage: utf8 config_file: ~ cursor_pos: 2740 edit_pos: 2035 file_path: '/home/lichtkind/txt/artikel/$foo/wxperl-tut_9.txt' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: none tab_size: 4 tab_use: auto - EOL: auto codepage: 8bit config_file: ~ cursor_pos: 151 edit_pos: 372 file_path: '/home/lichtkind/code/perl/test/wx/widget/cb.pl' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: perl tab_size: 4 tab_use: 1 - EOL: lf codepage: ascii config_file: ~ cursor_pos: 282 edit_pos: 791 file_path: '/home/lichtkind/code/perl/project/editor/dev/xp/Kephra/doc/Drumbeat.pod' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: perl tab_size: 4 tab_use: 1 - EOL: lf codepage: ascii config_file: ~ cursor_pos: 24 edit_pos: 24 file_path: '/home/lichtkind/code/perl/project/editor/dev/xp/Kephra/doc/Overview.pod' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: perl tab_size: 4 tab_use: 1 - EOL: auto codepage: 8bit config_file: ~ cursor_pos: 96 edit_pos: 235 file_path: '/home/lichtkind/code/perl/project/editor/dev/xp/Kephra/doc/Components.txt' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: none tab_size: 4 tab_use: auto kephra-0.4.3.34+dfsg.orig/share/config/session/history.yml0000644000175000017500000000705311657612064022660 0ustar gregoagregoa--- document: - EOL: cr+lf codepage: 8bit config_file: ~ cursor_pos: 0 edit_pos: 1402 file_path: '/home/lichtkind/code/perl/test/friendly/sniffer.pl' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: perl tab_size: 4 tab_use: 1 - EOL: lf codepage: utf8 config_file: ~ cursor_pos: 775 edit_pos: 0 file_path: '/home/lichtkind/code/perl/test/friendly/snifferb.pl' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: perl tab_size: 4 tab_use: 1 - EOL: auto codepage: 8bit config_file: ~ cursor_pos: 0 edit_pos: '-1' file_path: '/home/lichtkind/code/perl/test/friendly/sniffera.pl' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: perl tab_size: 4 tab_use: 1 - EOL: auto codepage: 8bit config_file: ~ cursor_pos: 0 edit_pos: '-1' file_path: '/home/lichtkind/code/perl/test/friendly/snifferraw.pl' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: perl tab_size: 4 tab_use: 0 - EOL: lf codepage: utf8 config_file: ~ cursor_pos: 2176 edit_pos: 0 file_path: '/home/lichtkind/txt/artikel/mystikum/meru.txt' folded_lines: [] marked_lines: [] readonly: 'off' syntaxmode: none tab_size: 4 tab_use: 1 - EOL: lf codepage: utf8 config_file: ~ cursor_pos: 284 edit_pos: 283 file_path: '/home/lichtkind/txt/arbeit/gw.txt' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: none tab_size: 4 tab_use: 1 - EOL: auto codepage: utf8 config_file: ~ cursor_pos: 1028 edit_pos: 6402 file_path: '/home/lichtkind/txt/artikel/$foo/rezension-sprachen.txt' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: none tab_size: 4 tab_use: auto - EOL: auto codepage: utf8 config_file: ~ cursor_pos: 1489 edit_pos: '-1' file_path: '/home/lichtkind/txt/artikel/$foo/wxperl-tut_4.txt' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: none tab_size: 4 tab_use: 0 - EOL: auto codepage: utf8 config_file: ~ cursor_pos: 1619 edit_pos: '-1' file_path: '/home/lichtkind/txt/artikel/$foo/wxperl-tut_2.txt' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: none tab_size: 4 tab_use: 1 - EOL: auto codepage: utf8 config_file: ~ cursor_pos: 0 edit_pos: '-1' file_path: '/home/lichtkind/txt/artikel/$foo/wxperl-tut_3.txt' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: none tab_size: 4 tab_use: 1 - EOL: auto codepage: utf8 config_file: ~ cursor_pos: 0 edit_pos: '-1' file_path: '/home/lichtkind/txt/artikel/$foo/perl6-tut_2.txt' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: none tab_size: 4 tab_use: 1 - EOL: auto codepage: 8bit config_file: ~ cursor_pos: 0 edit_pos: 1015 file_path: '/home/lichtkind/code/perl/project/editor/dev/base/lib/Kephra/Dialog/Info.pm' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: perl tab_size: 4 tab_use: 1 - EOL: auto codepage: utf8 config_file: ~ cursor_pos: 4 edit_pos: '-1' file_path: '/home/lichtkind/txt/artikel/$foo/wxperl-tut_7.txt' folded_lines: [] marked_lines: [] readonly: protect syntaxmode: none tab_size: 4 tab_use: 0 kephra-0.4.3.34+dfsg.orig/share/config/global/0000755000175000017500000000000012300715027020171 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/share/config/global/autosaved.conf0000644000175000017500000002346311657612064023056 0ustar gregoagregoa purpose = build in global settings version = 0.4.3.32 app_data_sub_dir = interface file = commands.yaml sub_dir = cache use = 1 file = interface/commands.conf node = commandlist defaultfile = interface/contextmenus.yml document_context = editpanel_contextmenu document_list = &document_change document_selection = textselection_contextmenu file_history = &file_history insert_templates = &insert_templates marker_margin = markermargin_contextmenu status_encoding = status_encoding_contextmenu status_eol = status_lineendchar_contextmenu status_info = status_info_contexmenu status_syntaxmode = status_syntaxstyle_contextmenu status_tab = status_whitespace_contextmenu toolbar_search = searchbar_contextmenu error_output = panel iconset_path = interface/icon/set/jenne directory = localisation file = english.conf file = interface/mainmenu.yml node = full_menubar responsive = 1 visible = 1 content_file = global/data/notepad_content.txt eval_with = eval font_family = Nimbus Sans L font_size = 10 size = -1584 splitter_pos = 300 visible = 1 append = 0 back_color = 000022 font_family = DejaVu Sans Mono font_size = 9 fore_color = ffffff interpreter_path = perl size = -1047 visible = 1 autofocus = 0 autohide = 0 contextmenu = toolbar_search contextmenu_visible = 1 file = interface/appbars.conf node = searchbar position = below visible = 1 contextmenu_visible = 1 file = interface/appbars.yml interactive = 1 msg_nr = 1 node = statusbar visible = 1 close_button = current contextmenu = document_list contextmenu_visible = 1 file_info = file_name info_symbol = 1 insert_new_tab = rightmost mark_configs = 1 max_tab_width = 25 middle_click = file-close-current movable_tabs = 1 number_tabs = 0 switch_back = 1 tablist_button = 1 visible = 1 contextmenu = 0 file = interface/appbars.yml node = main_toolbar responsive = 1 size = 16 visible = 1 position_x = 0 position_y = 0 size_x = 800 size_y = 600 fullscreen = 0 icon = interface/icon/app/proton.xpm max_number = 1 maximize_editpanel = 0 position_x = 0 position_y = 24 save_position = 1 size_x = 1920 size_y = 1176 stay_on_top = 0 title = \$filepath - \$appname \$version transparency = 0.2 transparent = 0 xp_style = 1 button_handing = right position_x = 100 position_y = 100 save_position = 1 tooltips = 1 position_x = 524 position_y = 175 save_position = 1 tooltips = 1 transparency = 0.2 width = 496 DND_mode = copy glue_tangent = 0 indention = 1 join = 1 make = 1 focus = 0 indention = 1 ID_margin = marker_margin ID_normal = document_context ID_selection = document_selection margin = 1 visible = custom left-middle = edit-paste left-right = edit-cut left-selection = edit-copy middle = goto-last-edit middle-selected = edit-insert-selection-at-cursor middle-selection = find-selection, find-next use_advanced_mouse_functions = 1 family = DejaVu Sans Mono size = 10 style = normal weight = normal fast_undo_steps = 7 back_color = 99ff99 bad_color = ff0000 good_color = 0000ff mode = adjacent visible = 1 color = 0000ff period = 500 width = 2 color = f5f5a5 visible = 1 end_of_line_marker = 0 color = bbbbbb visible = 1 color = ccccff position = 80 style = 1 back_color = 001177 fore_color = f3f3f3 color = cccc99 visible = 1 line_wrap = 0 back_color = fff5f5 flag_line = 1 fore_color = aa9977 keep_caret_visible = 1 style = boxes visible = 1 autosize = 1 back_color = d8d8d4 fore_color = 777788 min_width = 3 visible = 1 back_color = 0022ff fore_color = 000055 visible = 1 text = 6 scroll_width = 640 word_chars = \$%-@_abcdefghijklmnopqrstuvwxyzäöüßABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ0123456789 directory = /home/lichtkind/txt/artikel/heise/ EOL = OS codepage = ascii cursor_pos = 0 readonly = 0 syntaxmode = perl tab_size = 4 tab_use = 1 EOL = auto codepage = auto cursor_pos = 0 readonly = protect syntaxmode = auto tab_size = 4 tab_use = auto ada = ada ads adb as = as asm = s asm ave = ave baan = bc cln batch = bat cmd nt conf = conf context = tuo sty cpp = c cc cpp cxx h cs = cs css = css diff = diff patch eiffel = e err = err errorlist forth = forth fortran = f for f77 f90 f95 f2k haskell = hs html = htm html ssi shtml xhtml tag stag idl = idl odl java = jav java js = js latex = aux toc idx lisp = el jl lsp lisp lua = lua make = makefile Makefile mak configure matlab = m octave nsis = nsi nsh pascal = pas dpr dpk dfm inc pp perl = pl ple plx plex pm pod cgi php = php php3 php4 phtml property = properties session ini inf reg url cfg cnf aut ps = ps python = py pyw ruby = rb scheme = scm smd ss sh = bsh sh sql = sql tcl = tcl tk itk tex = tex sty text = txt nfo vb = vb bas frm cls ctl pag dsr dob vbs = vbs dsm xml = xml xsl svg xul xsd dtd xslt axl xrc rdf yaml = yaml yml config = conf perl = perl text = text web = css html php perl js dir_recursive = 1 each_once = 1 in_current_dir = 1 into_empty_doc = 0 into_only_empty_doc = 1 notify_change = 30 only_text = 0 single_doc = 0 auto_save = 30 b4_close = ask b4_quit = ask change_doc = 0 empty = 0 on_leave = 0 overwrite = ask reload_config = 1 tilde_backup = 0 unchanged = 0 file = current.yaml node = save = 1 backup = backup.yaml directory = session file = history.yml length = 13 node = save = 1 directory = template file = perl.conf auto_wrap = 1 fast_steps = 7 in = document incremental = 1 match_case = 0 match_regex = 0 match_whole_word = 0 match_word_begin = 0 data_file = global/data/search.yml length = 12 remember_only_matched = 1 save = 1 use = 1 any = 1 wrap = 1 credits = english/license/credits.txt feature = english/all_feature.txt keymap = english/keymap.txt license = english/license/gpl.txt navigation = english/navigation.txt special = english/special_feature.txt version = english/this_version.txt welcome = english/welcome.txt kephra-0.4.3.34+dfsg.orig/share/config/global/sub/0000755000175000017500000000000012300715027020762 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/share/config/global/sub/pbs.conf0000644000175000017500000000124211573645304022427 0ustar gregoagregoa purpose = configs along Damians Conways: "Perl Best Practices" version = 0.3.8.13 indention = 1 make = 1 indention = 1 visible = 1 position = 78 style = 1 visible = 1 line_wrap = 0 tab_size = 4 tab_use = 0 kephra-0.4.3.34+dfsg.orig/share/config/global/sub/documentation/0000755000175000017500000000000012300715027023633 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/share/config/global/sub/documentation/deutsch.conf0000644000175000017500000000054611573645304026161 0ustar gregoagregoa credits = deutsch/lizenz/anerkennung.txt feature = deutsch/alle_funktionen.txt keymap = deutsch/tastaturbelegung.txt license = deutsch/lizenz/gpl.txt special = deutsch/besondere_funktionen.txt navigation = deutsch/navigation.txt version = deutsch/diese_version.txt welcome = deutsch/willkommen.txt kephra-0.4.3.34+dfsg.orig/share/config/global/sub/documentation/english.conf0000644000175000017500000000051511573645304026147 0ustar gregoagregoa special = english/special_feature.txt credits = english/license/credits.txt feature = english/all_feature.txt keymap = english/keymap.txt license = english/license/gpl.txt navigation = english/navigation.txt version = english/this_version.txt welcome = english/welcome.txt kephra-0.4.3.34+dfsg.orig/share/config/global/sub/documentation/cesky.conf0000644000175000017500000000033711573645304025636 0ustar gregoagregoa credits = cesky/ feature = cesky/ keymap = cesky/ license = cesky/ navigation = cesky/ special = cesky/ version = cesky/tahle_verse.txt welcome = cesky/vitejte.txt kephra-0.4.3.34+dfsg.orig/share/config/global/data/0000755000175000017500000000000012300715027021102 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/share/config/global/data/notepad_content.txt0000644000175000017500000000017211657612064025042 0ustar gregoagregoaEncode->encodings(":all")' ord 'o' chr(98) - heise:moose - $foo - books - wx - fm:p5t3-4 - review:rexpl - .com:xrc kephra-0.4.3.34+dfsg.orig/share/config/global/data/search.yml0000644000175000017500000000041311657612064023103 0ustar gregoagregoa--- bookmark: {} find: history: - That - '$row2' - '$kundenmail' - vorgestellt - static - Panel - 'man ' - Verständnis - gespräch - auch - welche - nur item: exci replace: history: - "
\n" item: "
\n" kephra-0.4.3.34+dfsg.orig/share/config/global/autosaved.conf.old0000644000175000017500000002346211602234733023623 0ustar gregoagregoa purpose = build in global settings version = 0.4.3.31 app_data_sub_dir = interface file = commands.yaml sub_dir = cache use = 1 file = interface/commands.conf node = commandlist defaultfile = interface/contextmenus.yml document_context = editpanel_contextmenu document_list = &document_change document_selection = textselection_contextmenu file_history = &file_history insert_templates = &insert_templates marker_margin = markermargin_contextmenu status_encoding = status_encoding_contextmenu status_eol = status_lineendchar_contextmenu status_info = status_info_contexmenu status_syntaxmode = status_syntaxstyle_contextmenu status_tab = status_whitespace_contextmenu toolbar_search = searchbar_contextmenu error_output = panel iconset_path = interface/icon/set/jenne directory = localisation file = english.conf file = interface/mainmenu.yml node = full_menubar responsive = 1 visible = 1 content_file = global/data/notepad_content.txt eval_with = eval font_family = Nimbus Sans L font_size = 10 size = -876 splitter_pos = 300 visible = 0 append = 0 back_color = 000022 font_family = DejaVu Sans Mono font_size = 9 fore_color = ffffff interpreter_path = perl size = -1064 visible = 1 autofocus = 0 autohide = 0 contextmenu = toolbar_search contextmenu_visible = 1 file = interface/appbars.conf node = searchbar position = below visible = 1 contextmenu_visible = 1 file = interface/appbars.yml interactive = 1 msg_nr = 0 node = statusbar visible = 1 close_button = current contextmenu = document_list contextmenu_visible = 1 file_info = file_name info_symbol = 1 insert_new_tab = rightmost mark_configs = 1 max_tab_width = 25 middle_click = file-close-current movable_tabs = 1 number_tabs = 0 switch_back = 1 tablist_button = 1 visible = 1 contextmenu = 0 file = interface/appbars.yml node = main_toolbar responsive = 1 size = 16 visible = 1 position_x = 0 position_y = 0 size_x = 800 size_y = 600 fullscreen = 0 icon = interface/icon/app/proton.xpm max_number = 1 maximize_editpanel = 0 position_x = 0 position_y = 24 save_position = 1 size_x = 1920 size_y = 1176 stay_on_top = 0 title = \$filepath - \$appname \$version transparency = 0.2 transparent = 0 xp_style = 1 button_handing = right position_x = 100 position_y = 100 save_position = 1 tooltips = 1 position_x = 100 position_y = 100 save_position = 1 tooltips = 1 transparency = 0.2 width = 496 DND_mode = copy glue_tangent = 0 indention = 1 join = 1 make = 1 focus = 0 indention = 1 ID_margin = marker_margin ID_normal = document_context ID_selection = document_selection margin = 1 visible = custom left-middle = edit-paste left-right = edit-cut left-selection = edit-copy middle = goto-last-edit middle-selected = edit-insert-selection-at-cursor middle-selection = find-selection, find-next use_advanced_mouse_functions = 1 family = DejaVu Sans Mono size = 10 style = normal weight = normal fast_undo_steps = 7 back_color = 99ff99 bad_color = ff0000 good_color = 0000ff mode = adjacent visible = 1 color = 0000ff period = 500 width = 2 color = f5f5a5 visible = 1 end_of_line_marker = 0 color = bbbbbb visible = 1 color = ccccff position = 80 style = 1 back_color = 001177 fore_color = f3f3f3 color = cccc99 visible = 1 line_wrap = 0 back_color = fff5f5 flag_line = 1 fore_color = aa9977 keep_caret_visible = 1 style = boxes visible = 1 autosize = 1 back_color = d8d8d4 fore_color = 777788 min_width = 3 visible = 1 back_color = 0022ff fore_color = 000055 visible = 1 text = 6 scroll_width = 640 word_chars = \$%-@_abcdefghijklmnopqrstuvwxyzäöüßABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ0123456789 directory = /home/lichtkind/txt/artikel/heise/ EOL = OS codepage = ascii cursor_pos = 0 readonly = 0 syntaxmode = perl tab_size = 4 tab_use = 1 EOL = auto codepage = auto cursor_pos = 0 readonly = protect syntaxmode = auto tab_size = 4 tab_use = auto ada = ada ads adb as = as asm = s asm ave = ave baan = bc cln batch = bat cmd nt conf = conf context = tuo sty cpp = c cc cpp cxx h cs = cs css = css diff = diff patch eiffel = e err = err errorlist forth = forth fortran = f for f77 f90 f95 f2k haskell = hs html = htm html ssi shtml xhtml tag stag idl = idl odl java = jav java js = js latex = aux toc idx lisp = el jl lsp lisp lua = lua make = makefile Makefile mak configure matlab = m octave nsis = nsi nsh pascal = pas dpr dpk dfm inc pp perl = pl ple plx plex pm pod cgi php = php php3 php4 phtml property = properties session ini inf reg url cfg cnf aut ps = ps python = py pyw ruby = rb scheme = scm smd ss sh = bsh sh sql = sql tcl = tcl tk itk tex = tex sty text = txt nfo vb = vb bas frm cls ctl pag dsr dob vbs = vbs dsm xml = xml xsl svg xul xsd dtd xslt axl xrc rdf yaml = yaml yml config = conf perl = perl text = text web = css html php perl js dir_recursive = 1 each_once = 1 in_current_dir = 1 into_empty_doc = 0 into_only_empty_doc = 1 notify_change = 30 only_text = 0 single_doc = 0 auto_save = 30 b4_close = ask b4_quit = ask change_doc = 0 empty = 0 on_leave = 0 overwrite = ask reload_config = 1 tilde_backup = 0 unchanged = 0 file = current.yaml node = save = 1 backup = backup.yaml directory = session file = history.yml length = 13 node = save = 1 directory = template file = perl.conf auto_wrap = 1 fast_steps = 7 in = document incremental = 1 match_case = 0 match_regex = 0 match_whole_word = 0 match_word_begin = 0 data_file = global/data/search.yml length = 12 remember_only_matched = 1 save = 1 use = 1 any = 1 wrap = 1 credits = english/license/credits.txt feature = english/all_feature.txt keymap = english/keymap.txt license = english/license/gpl.txt navigation = english/navigation.txt special = english/special_feature.txt version = english/this_version.txt welcome = english/welcome.txt kephra-0.4.3.34+dfsg.orig/share/config/global/autosaved.conf~0000644000175000017500000002351411657550041023245 0ustar gregoagregoa purpose = build in global settings version = 0.4.3.32 app_data_sub_dir = interface file = commands.yaml sub_dir = cache use = 1 file = interface/commands.conf node = commandlist defaultfile = interface/contextmenus.yml document_context = editpanel_contextmenu document_list = &document_change document_selection = textselection_contextmenu file_history = &file_history insert_templates = &insert_templates marker_margin = markermargin_contextmenu status_encoding = status_encoding_contextmenu status_eol = status_lineendchar_contextmenu status_info = status_info_contexmenu status_syntaxmode = status_syntaxstyle_contextmenu status_tab = status_whitespace_contextmenu toolbar_search = searchbar_contextmenu error_output = panel iconset_path = interface/icon/set/jenne directory = localisation file = english.conf file = interface/mainmenu.yml node = full_menubar responsive = 1 visible = 1 content_file = global/data/notepad_content.txt eval_with = eval font_family = Nimbus Sans L font_size = 10 size = -1584 splitter_pos = 300 visible = 1 append = 0 back_color = 000022 font_family = DejaVu Sans Mono font_size = 9 fore_color = ffffff interpreter_path = perl size = -1047 visible = 1 autofocus = 0 autohide = 0 contextmenu = toolbar_search contextmenu_visible = 1 file = interface/appbars.conf node = searchbar position = below visible = 1 contextmenu_visible = 1 file = interface/appbars.yml interactive = 1 msg_nr = 1 node = statusbar visible = 1 close_button = current contextmenu = document_list contextmenu_visible = 1 file_info = file_name info_symbol = 1 insert_new_tab = rightmost mark_configs = 1 max_tab_width = 25 middle_click = file-close-current movable_tabs = 1 number_tabs = 0 switch_back = 1 tablist_button = 1 visible = 1 contextmenu = 0 file = interface/appbars.yml node = main_toolbar responsive = 1 size = 16 visible = 1 position_x = 0 position_y = 0 size_x = 800 size_y = 600 fullscreen = 0 icon = interface/icon/app/proton.xpm max_number = 1 maximize_editpanel = 0 position_x = 0 position_y = 24 save_position = 1 size_x = 1920 size_y = 1176 stay_on_top = 0 title = \$filepath - \$appname \$version transparency = 0.2 transparent = 0 xp_style = 1 button_handing = right position_x = 100 position_y = 100 save_position = 1 tooltips = 1 position_x = 524 position_y = 175 save_position = 1 tooltips = 1 transparency = 0.2 width = 496 DND_mode = copy glue_tangent = 0 indention = 1 join = 1 make = 1 focus = 0 indention = 1 ID_margin = marker_margin ID_normal = document_context ID_selection = document_selection margin = 1 visible = custom left-middle = edit-paste left-right = edit-cut left-selection = edit-copy middle = goto-last-edit middle-selected = edit-insert-selection-at-cursor middle-selection = find-selection, find-next use_advanced_mouse_functions = 1 family = DejaVu Sans Mono size = 10 style = normal weight = normal fast_undo_steps = 7 back_color = 99ff99 bad_color = ff0000 good_color = 0000ff mode = adjacent visible = 1 color = 0000ff period = 500 width = 2 color = f5f5a5 visible = 1 end_of_line_marker = 0 color = bbbbbb visible = 1 color = ccccff position = 80 style = 1 back_color = 001177 fore_color = f3f3f3 color = cccc99 visible = 1 line_wrap = 0 back_color = fff5f5 flag_line = 1 fore_color = aa9977 keep_caret_visible = 1 style = boxes visible = 1 autosize = 1 back_color = d8d8d4 fore_color = 777788 min_width = 3 visible = 1 back_color = 0022ff fore_color = 000055 visible = 1 text = 6 scroll_width = 640 word_chars = \$%-@_abcdefghijklmnopqrstuvwxyzäöüßABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ0123456789 directory = /home/lichtkind/code/perl/project/editor/dev/xp/Kephra/doc/ EOL = OS codepage = ascii cursor_pos = 0 readonly = 0 syntaxmode = perl tab_size = 4 tab_use = 1 EOL = auto codepage = auto cursor_pos = 0 readonly = protect syntaxmode = auto tab_size = 4 tab_use = auto ada = ada ads adb as = as asm = s asm ave = ave baan = bc cln batch = bat cmd nt conf = conf context = tuo sty cpp = c cc cpp cxx h cs = cs css = css diff = diff patch eiffel = e err = err errorlist forth = forth fortran = f for f77 f90 f95 f2k haskell = hs html = htm html ssi shtml xhtml tag stag idl = idl odl java = jav java js = js latex = aux toc idx lisp = el jl lsp lisp lua = lua make = makefile Makefile mak configure matlab = m octave nsis = nsi nsh pascal = pas dpr dpk dfm inc pp perl = pl ple plx plex pm pod cgi php = php php3 php4 phtml property = properties session ini inf reg url cfg cnf aut ps = ps python = py pyw ruby = rb scheme = scm smd ss sh = bsh sh sql = sql tcl = tcl tk itk tex = tex sty text = txt nfo vb = vb bas frm cls ctl pag dsr dob vbs = vbs dsm xml = xml xsl svg xul xsd dtd xslt axl xrc rdf yaml = yaml yml config = conf perl = perl text = text web = css html php perl js dir_recursive = 1 each_once = 1 in_current_dir = 1 into_empty_doc = 0 into_only_empty_doc = 1 notify_change = 30 only_text = 0 single_doc = 0 auto_save = 30 b4_close = ask b4_quit = ask change_doc = 0 empty = 0 on_leave = 0 overwrite = ask reload_config = 1 tilde_backup = 0 unchanged = 0 file = current.yaml node = save = 1 backup = backup.yaml directory = session file = history.yml length = 13 node = save = 1 directory = template file = perl.conf auto_wrap = 1 fast_steps = 7 in = document incremental = 1 match_case = 0 match_regex = 0 match_whole_word = 0 match_word_begin = 0 data_file = global/data/search.yml length = 12 remember_only_matched = 1 save = 1 use = 1 any = 1 wrap = 1 credits = english/license/credits.txt feature = english/all_feature.txt keymap = english/keymap.txt license = english/license/gpl.txt navigation = english/navigation.txt special = english/special_feature.txt version = english/this_version.txt welcome = english/welcome.txt kephra-0.4.3.34+dfsg.orig/share/config/syntaxmode/0000755000175000017500000000000012300715027021124 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/share/config/syntaxmode/perl.conf0000644000175000017500000001337311573645307022762 0ustar gregoagregoa ID = perl name = Perl rants = tab_size = 4 tab_use = 1 ID = wxSTC_LEX_PERL bracelight = ()[]{} keywords = < 1 = fore:\#ff0000; Error 2 = fore:\#aaaaaa; Comment 3 = fore:\#004000,back:\#E0FFE0,eolfilled; POD 4 = 5 = 6 = 7 = 8 = ; Symbols / Punctuation. Currently not used 9 = ; Preprocessor. Currently not used 10 = 11 = 12 = 13 = 14 = 15 = 16 = 17 = 18 = 19 = 20 = 21 = 22 = 23 = 24 = 25 = 26 = 27 = 28 = 29 = 30 = wordchars = # $_[0]->StyleSetSpec( wxSTC_H_TAG, "fore:#000055" ); # Apply tag style for selected lexer (blue) $_[0]->StyleSetSpec(3,"fore:#004000,back:#E0FFE0,$(font.text),eolfilled"); # POD $_[0]->StyleSetSpec(4,"fore:#007f7f"); # Number $_[0]->StyleSetSpec(5,"fore:#000077,bold"); # Keywords $_[0]->StyleSetSpec(6,"fore:#ee7b00,back:#fff8f8"); # Doublequoted string $_[0]->StyleSetSpec(7,"fore:#f36600,back:#fffcff"); # Single quoted string $_[0]->StyleSetSpec(8,"fore:#555555"); # $_[0]->StyleSetSpec(10,"fore:#002200"); # Operators $_[0]->StyleSetSpec(11,"fore:#3355bb"); # Identifiers (functions, etc.) $_[0]->StyleSetSpec(12,"fore:#228822"); # Scalars: $var $_[0]->StyleSetSpec(13,"fore:#339933"); # Array: @var $_[0]->StyleSetSpec(14,"fore:#44aa44"); # Hash: %var $_[0]->StyleSetSpec(15,"fore:#55bb55"); # Symbol table: *var $_[0]->StyleSetSpec(17,"fore:#000000,back:#A0FFA0"); # Regex: /re/ or m{re} $_[0]->StyleSetSpec(18,"fore:#000000,back:#F0E080"); # Substitution: s/re/ore/ $_[0]->StyleSetSpec(19,"fore:#000000,back:#8080A0"); # Long Quote (qq, qr, qw, qx) -- obsolete: replaced by qq, qx, qr, qw $_[0]->StyleSetSpec(20,"fore:#ff7700,back:#f9f9d7"); # Back Ticks $_[0]->StyleSetSpec(21,"fore:#600000,back:#FFF0D8,eolfilled"); # Data Section: __DATA__ or __END__ at beginning of line $_[0]->StyleSetSpec(22,"fore:#000000,back:#DDD0DD"); # Here-doc (delimiter) $_[0]->StyleSetSpec(23,"fore:#7F007F,back:#DDD0DD,eolfilled,notbold"); # Here-doc (single quoted, q) $_[0]->StyleSetSpec(24,"fore:#7F007F,back:#DDD0DD,eolfilled,bold"); # Here-doc (double quoted, qq) $_[0]->StyleSetSpec(25,"fore:#7F007F,back:#DDD0DD,eolfilled,italics"); # Here-doc (back ticks, qx) $_[0]->StyleSetSpec(26,"fore:#7F007F,$(font.monospace),notbold"); # Single quoted string, generic $_[0]->StyleSetSpec(27,"$(style.perl.6)"); # qq = Double quoted string $_[0]->StyleSetSpec(28,"$(style.perl.20)"); # qx = Back ticks $_[0]->StyleSetSpec(29,"$(style.perl.17)"); # qr = Regex $_[0]->StyleSetSpec(30,"fore:#f36600,back:#fff8f8"); # qw = Array debug = no compile = no block = \#~ box = \#~ stream = no run = tidy = no kephra-0.4.3.34+dfsg.orig/share/config/template/0000755000175000017500000000000012300715027020544 5ustar gregoagregoakephra-0.4.3.34+dfsg.orig/share/config/template/perl.conf0000644000175000017500000000115611573645307022376 0ustar gregoagregoa