Commits

Herbert Breunung committed 9a8d822

clearing the table

  • Participants
  • Parent commits d85efc2
  • Branches sp2

Comments (0)

Files changed (295)

File Changes

-Revision history for Kephra
-
-0.5     Module::Starter (ed) the rewrite on 2 June 2011
-

File LICENSE

-		    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.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) 19yy  <name of author>
-
-    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.
-
-  <signature of Ty Coon>, 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.

File MANIFEST

-Changes
-bin/kephra
-lib/Kephra.pm
-LICENSE
-Makefile.PL
-MANIFEST			This list of files
-README
-t/00-start.t
-t/01-compile.t
-t/pod.t

File Makefile.PL

-use 5.006;
-use strict;
-use warnings;
-use ExtUtils::MakeMaker;
-
-WriteMakefile(
-    NAME                => 'Kephra',
-    AUTHOR              => q{Herbert Breunung <lichtkind@cpan.org>},
-    VERSION_FROM        => 'lib/Kephra.pm',
-    ABSTRACT_FROM       => 'lib/Kephra.pm',
-    ($ExtUtils::MakeMaker::VERSION >= 6.3002
-      ? ('LICENSE'=> 'gpl_2')
-      : ()),
-    PL_FILES            => {},
-    PREREQ_PM => {
-        'Test::More' => 0,
-        'Benchmark' => 0,
-        'Encode' => 0,
-        'File::Find' => 0,
-        'File::Spec::Functions' => 0,
-        'File::UserConfig' => 0,
-        'Config::General' => 0,
-        'YAML::Tiny' => 0,
-        'PPI' => 0.009,
-        'Moo' => 0.009,
-        'Wx' => 0.74,
-        'Wx::Perl::ProcessStream' => 0,
-    },
-    dist                => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
-    clean               => { FILES => 'Kephra-*' },
-);

File README

-Kephra
-
-this is the rewrite of Kephra and will hopefully become version 0.6
-
-
-INSTALLATION
-
-To install this module, run the following commands:
-
-    perl Makefile.PL
-    make
-    make test
-    make install
-
-SUPPORT AND DOCUMENTATION
-
-After installing, you can find documentation for this module with the
-perldoc command.
-
-    perldoc Kephra
-
-You can also look for information at:
-
-    HG Source Archive
-        https://bitbucket.org/lichtkind/kephra
-
-    Homepage
-        https://http://kephra.sourceforge.net
-
-    RT, CPAN's request tracker (report bugs here)
-        http://rt.cpan.org/NoAuth/Bugs.html?Dist=Kephra
-
-    AnnoCPAN, Annotated CPAN documentation
-        http://annocpan.org/dist/Kephra
-
-    CPAN Ratings
-        http://cpanratings.perl.org/d/Kephra
-
-    Search CPAN
-        http://search.cpan.org/dist/Kephra/
-
-
-LICENSE AND COPYRIGHT
-
-Copyright (C) 2011 Herbert Breunung
-
-This program is released under the following license: gpl2
-

File bin/kephra

-#! /usr/bin/perl -w
-#############################################################################
-## Author:      Herbert Breunung
-## Purpose:     Kephra starter
-## Created:     1/06/2011
-## Copyright:   (c) Herbert Breunung
-## Licence:     GPLv2
-#############################################################################
-
-use strict;
-our $VERSION = '0.1';
-
-BEGIN {
-	my $dir = -d 'lib' ? 'lib' : '../lib';
-	unshift @INC, $dir;
-	require Kephra;
-}
-
-
-Kephra::start();
-
-__END__
-
-=head1 NAME
-
-kephra - Kephra starter script
-
-=head1 SYNOPSIS
-
-    > kephra [<files>]   # start with certain files open
-
-for main Docs please go to the main Module named L<Kephra>.
-
-=cut
-

File doc/Components.pod

-=head1 Kephra Graphical Components
-
-the visible parts of the editor app:
-
-component     position            key                    purpose
-
---------------------------------------------------------------------------------
-
-MenuBar       top 1
-
-MainToolBar   top 2                             icons, dropdown menu, tool panel 
-
-TabBar        top 3                     
-Editor        center                            main editing area, dividable by 4
-
-SearchBar     below 1                           find and goto functions
-
-TextLab       below 2                           find|lines -> replace append, prepend
-
-IOUnit
- Output        below Search     ctrl+shift+<    just watching various output channels
- InputRow      below Output     ctrl+<          typing commands to kephra/perl/shell/other
-
-StatusLine    below Input
-
-
-
-FileBrowser   left                F2
-
-Project       left                 
-Manager
-
-
-TreeLib       right               F7           nested list of snippets (runnable with *)
-
-DocBrowser    right               F8           simple html browser (converst POD)
-
-OrgPad        right               F9           simple org mode clone
-
-ScratchSheet  right              F12           plain temp text buffer, 1 global, 1 per doc
-
-
-# Document      external
-# Viewer        window
-
-Dialogs: File, Color, Config, Info
-
-
-=head2 Visual Overview
-_______________________________________________________________________________
-|____________________________________menu_____________________________________|
-|________________________________global_toolbar_______________________________|
-|                  |___|___|___|___|____|___|___|___|___|___|                 |
-|                  |                    |                   |                 |
-|    filebrowser   |    editor leftup   |  editor rightup   |                 |
-|                  |                    |                   |     treelib     |
-|   projectmanager |                    |                   |                 |
-|                  |                    |                   |     orgpad      |
-|                  |              editor panel              |                 |
-|                  |____________________|___________________|    scratchsheet |
-|                  |___|___|___|___|____|___|___|___|___|___|                 |
-|                  |                    |                   |    clipboard    |
-|                  |      left down     |    right down     |                 |
-|                  |                    |                   |                 |
-|                  |____________________|___________________|                 |
-|                  |__________________find__________________|                 |
-|                  |_________________replace________________|                 |
-|      left        |_________________textlab________________|      right      |
-|    sidepanel     |___|___|___|___|___|____________________|    sidepanel    |
-|                  |                                        |                 |
-|                  |                 output                 |                 |
-|                  |                                        |                 |
-|                  |________________________________________|                 |
-|__________________|_________________input__________________|_________________|
-|___________________________status____________________________________________|

File doc/Index.pod

Empty file removed.

File doc/LongFeatureList.txt

-
-File:
-	new/open/save/reload/exit
-
-Encodings
-	Utf/Latin1/ASCII
-
-Syntaxmodes:
-	are files that contain information perl language
-	fileendings to recognize it
-	file content to recognize it
-	keywords
-	colors for the syntaxhiglighting
-	comment character
-	compiler/interpreter/lint command
-
-Search:

File doc/Overview.pod

-=head1 Kephra Overview
-
-Welcome to the root document of the Kephra user documentation.
-All paths are short from here.
-If you are new, it is the best point to start from.
-
-=head2 Philosophy
-
-=head3 Main Objective
-
-=head3 Inspirations
-
-  Nedit, Kommodo, Vim, Emacs, Geany, Gedit
-
-=head3 Design Decisions
-
-=head2 Techology
-
-=head2 Main Features
-
-

File doc/Plan.txt

Empty file removed.

File doc/Sanddrum.pod

-=head1 Sandrum
-
-=head2 SYNOPSIS
-
-language of the Kephra command line
-
-=head2 Main Idea
-
-The best thing about vi is the way to control the editor with short comands,
-that get typed into a seperate line.
-For complex operations is this the fastest way to get thigs done.
-Thats because each latter can open a new context.
-This way you can stuff much more commands onto the keayboard.
-Also the the options of each command multiply the into the unimaginable,
-if you just think in terms of point and click or simple key combinations
-
-Why not Perl? All commands would be much longer/complicated.
-But its also possible. In a different command line just one tab away.
-
-=head2 Name
-
-Kephra, depicted as a scarab is a desert beatle. 
-For communication the beat the sand, making low frequency sound signals.
-
-
-=head2 Command Overview
-
-  .       -     repeat last action
-  /../    -     match / find
-  /../../ -     substitute
-  g/d     -     goto line number /d stands for number (regex syntax)
-  gb      -     goto [docs] beginning
-  ge      -     goto        end
-  gs/w    -     goto sub name = /w
-  gd.     -     goto doc nr (/d) or name(/w)
-  dw      -     delete word
-  dl      -     delete line
-  cw      -     copy word
-  cl      -     copy line
-  cs      -     copy selection
-  sa      -     select all
-  u       -     undo
-  r       -     redo

File ignore.txt

-blib*
-Makefile
-Makefile.old
-Build
-Build.bat
-_build*
-pm_to_blib*
-*.tar.gz
-.lwpcookies
-.hg
-cover_db
-pod2htm*.tmp
-Kephra-*

File lib/Kephra.pm

-# See end of file for docs
-use v5.10;
-use strict;
-use warnings;
-
-
-package Kephra;
-our $NAME     = __PACKAGE__;    # name of entire application
-our $VERSION  = '0.4.5.13';
-
-our @external_dependencies = (
-	qw/Benchmark Encode Encode::Guess Cwd/,
-	qw/File::Find File::Spec File::UserConfig Config::General YAML/,
-	qw/Moo/, #PPI 
-	qw/Wx Wx::STC Wx::Perl::ProcessStream/, #  Wx::Scintilla
-);
-our @used_wx_modules = qw/Wx::AUI Wx::DND Wx::RichText/; # Wx::STC Wx::HTML
-
-sub start {
-	#start_worker_thread();
-	load_libs();
-	configdir();
-	Kephra::App->new()->MainLoop();
-}
-
-sub load_libs {
-	my $pkg = __PACKAGE__;
-	eval 'require ' . $_ for @external_dependencies, @used_wx_modules;
-	require Kephra::App;
-	#$require_string .= $pkg . '::'; eval $require_string . $_ for @needed_at_first;
-}
-
-
-sub start_worker_thread {
-	# TODO:  
-	#Kephra::Works
-}
-
-
-
-
-1;
-
-__END__
-
-=head1 NAME
-
-Kephra - fresh and beautiful text editor that works as you prefer
-
-=head1 SYNOPSIS
-
-just start it with some files already open
-
-    kephra file.name file name ....
-
-=head1 User Documentation
-
-
-
-=head1 INTERNALS
-
-just follow L<Kephra::API>.
-
-=head1 AUTHOR
-
-Herbert Breunung, C<< <lichtkind at cpan.org> >>
-
-=head1 BUGS
-
-Please report any bugs or feature requests to C<bug-kephra at rt.cpan.org>, or through
-the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Kephra>.  I will be notified, and then you'll
-automatically be notified of progress on your bug as I make changes.
-
-
-=head1 SUPPORT
-
-You can find documentation for this module with the perldoc command.
-
-	perldoc Kephra
-
-You can also look for information at:
-
-=over 2
-
-=item * HG Source Archive
-
-L<https://bitbucket.org/lichtkind/kephra>
-
-=item * Homepage
-
-L<https://http://kephra.sourceforge.net>
-
-=item * RT: CPAN's request tracker (report bugs here)
-
-L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Kephra>
-
-=item * AnnoCPAN: Annotated CPAN documentation
-
-L<http://annocpan.org/dist/Kephra>
-
-=item * CPAN Ratings
-
-L<http://cpanratings.perl.org/d/Kephra>
-
-=item * Search CPAN
-
-L<http://search.cpan.org/dist/Kephra/>
-
-=back
-
-
-=head1 ACKNOWLEDGEMENTS
-
-=over 2
-
-=item * Herbert Breunung E<lt>lichtkind@cpan.orgE<gt> (main author and design lead)
-
-=back
-
-=head1 LICENSE AND COPYRIGHT
-
-Copyright 2011 Herbert Breunung.
-
-This program is released under the license: gpl v2
-
-=cut

File lib/Kephra/API.pm

-use strict;
-use warnings;
-#use Carp;
-use Kephra::API::Command;
-use Kephra::API::Doc;
-use Kephra::API::Event;
-use Kephra::API::KeyMap;
-#use Kephra::API::Macro;
-#use Kephra::API::Plugin;
-#use Kephra::API::Sandrum;
-use Kephra::App::Focus;
-use Kephra::App::Window;
-use Kephra::File;
-use Kephra::Config;
-use Kephra::Help;
-use Kephra::Log;
-#use Kephra::Worker;
-
-
-package Kephra::API;
-my $VERSION = 0.5;
-
-Kephra::API::Command::switch_variables({
- '$app'    => { switch => 'app',         class => 'Kephra::App' },
- '$win'    => { switch => 'main_window', class => 'Kephra::App::Window' },
- '$docbar' => { switch => 'docbar',      class => 'Kephra::App::Bar::Document' },
- '$doc'    => { switch => 'document',    class => 'Kephra::Document' },
- '$ed'     => { switch => 'editor',      class => 'Kephra::App::Editor' },
-});
-
-sub app                 { $Kephra::App::_ref }
-sub main_window         { $Kephra::App::Window::_ref }
-sub docbar              { Kephra::App::Part::Editor::docbar() }
-sub all_docbars         { Kephra::App::Part::Editor::all_docbars() }
-sub passive_docbars     { Kephra::App::Part::Editor::passive_docbars() }
-sub document            { Kephra::API::Doc::active() }
-sub all_documents       { Kephra::API::Doc::all() }
-sub do_with_all_editors {&Kephra::API::Doc::do_with_all_editors }
-sub editor              { Kephra::API::Doc::active_editor() }
-
-sub focus           { Kephra::App::Focus::set(@_) }
-sub focus_back      { Kephra::App::Focus::set_back(@_) }
-
-# IO-unit
-sub input  {main_window()->{'part'}{'iounit'}->get_line() if ref main_window() and exists main_window()->{'part'}{'iounit'} }
-sub output {main_window()->{'part'}{'iounit'}->output(@_) if ref main_window() and exists main_window()->{'part'}{'iounit'} }
-sub log    {main_window()->{'part'}{'iounit'}->output('log', @_) if ref main_window() and exists main_window()->{'part'}{'iounit'} }
-
-sub configs  { }
-
-# command list
-sub add_command { }
-sub del_command { }
-sub run_command { }
-sub command_status {}
-
-# cmd line lang
-sub run_sandrum_commands {}
-
-# event table
-sub add_event_callback { }
-sub del_event_callback { }
-sub trigger_event      { }
-sub freeze_event       { }
-sub thaw_event         { }
-
-# plugin API
-sub register_plugin {}
-sub get_plugin_status {}
-sub get_plugin_data {}
-sub available_plugins {}
-sub unregister_plugin {}
-
-
-1; # if you want to know more, please read Kephra::Internals.pod
-

File lib/Kephra/API/Command.pm

-use strict;
-use warnings;
-use v5.10;
-use Kephra::API;
-
-package Kephra::API::Command;                             # callable by the user
-
-my %list;     # by ID
-#my %keyproxy;# by keycode
-my %switchvar; #switchvar vor cmd definitions
-my $done_init = 0;
-
-
-sub      _raw_list { \%list }
-sub sub_exists     { no strict 'refs'; !!*{ $_[0] }{CODE} if $_[0] }
-sub package_exists { no strict 'refs'; !!%{ $_[0] . '::' } if $_[0] }
-sub calling_module { ( caller(1) )[0] }
-
-sub switch_variables {
-	my ($var_def) = shift;
-	my $api = 'Kephra::API';
-	my $caller = calling_module();
-	return Kephra::Log::error("only callable by $api", 1) if $caller ne $api;
-	#return Kephra::Log::error("call me just once", 1) if keys %switchvar;
-	return Kephra::Log::error("need a hashref", 1) unless ref $var_def eq 'HASH';
-	for my $var (keys %$var_def){
-		delete $var_def->{$var} unless substr($var, 0, 1) eq '$';
-		delete $var_def->{$var} unless sub_exists( $api .'::'. $var_def->{$var}{'switch'} );
-		delete $var_def->{$var} unless package_exists ( $var_def->{$var}{'class'} );
-	}
-	%switchvar = %$var_def;
-	compile( keys %list );
-	$done_init = 1;
-}
-
-sub register {
-	my $cmd = shift;
-	return Kephra::Log::error("cmd def have to be in a hash ref, not $cmd", 1)
-		unless ref $cmd eq 'HASH';
-	my $caller = calling_module();
-	for my $ID (keys %$cmd) {
-		Kephra::Log::warning( 
-			"$cmd already registered to do ". property($ID, 'sub')." by ".
-			property($ID, 'source')  ), next if registered( $ID );
-		#for (qw/sub options state event label help keys icon/){} filter input later
-		$list{$ID}           = $cmd->{$ID};
-		$list{$ID}{'source'} = $caller;
-		compile($ID) if $done_init;
-	}
-}
-
-sub compile {
-	for my $cmd_ID (@_) {
-		my $cmd = $list{ $cmd_ID };
-		my $sub = $cmd->{'sub'};
-		Kephra::Log::warning( "$cmd_ID lacks value on hashkey 'sub'"), next unless $sub;
-
-		if ( substr($sub, 0, 1) eq '$'){
-			my $method_pos = index($sub, '->');
-			my $var = substr($sub, 0, $method_pos);
-			Kephra::Log::warning
-				("unknown switchvar $var in $cmd_ID 'sub' entry", 1), next
-					unless ref $switchvar{ $var };
-			my $method = $switchvar{$var}{'class'}.'::'.substr($sub, $method_pos+2);
-			# move that check into test suite
-			#Kephra::Log::warning ("called unknown method with $sub", 1), next
-			#	unless sub_exists($method) ;
-			
-			$cmd->{'coderef'} = 'Kephra::API::' . $switchvar{$var}{'switch'} . '()' .
-			                      substr($sub, $method_pos);
-		}
-		elsif ( index($sub, '::') == -1) {
-			$cmd->{'coderef'} = $cmd->{'source'} . '::' . $sub
-		}
-		else { $cmd->{'coderef'} = $sub }
-
-		# add parameter if are any
-		$cmd->{'coderef'} .= exists $cmd->{'parameter'} # just one parameter yet
-			? "( '" . $cmd->{'parameter'} . "' )"
-			: '()';
-		$cmd->{'coderef'} = eval 'sub { ' . $cmd->{'coderef'} . ' }';
-
-		Kephra::API::KeyMap::register_keys({ $cmd_ID => $cmd->{'keys'} }) if $cmd->{'keys'};
-	}
-}
-
-
-sub run {
-	my $cmd = shift;
-	$cmd = [$cmd] unless ref $cmd eq ref [];
-	my $return;
-	for (@$cmd) { $return = $list{$_}{'coderef'}->() if exists $list{$_} }
-	$return;
-}
-sub run_by_keycode {
-	my ($code, $map) = @_;
-}
-
-sub registered      { 1 if defined $_[0]  and exists $list{ $_[0] }             }
-sub property_exists { 1 if registered($_[0]) and exists $list{ $_[0] }{ $_[1] } }
-sub add {}
-
-sub all_properties { 
-	if ( registered($_[0]) ) { $list{$_[0]} }
-	else { Kephra::Log::warning('requested data of unknown command '.$_[0], 1) }
-}
-sub property       { $list{$_[0]}{$_[1]}         if property_exists(@_) }
-sub set_property   { $list{$_[0]}{$_[1]} = $_[2] if property_exists(@_) }
-
-
-1;
-
-__END__
-
-=head1 Command Definition
-
-cmd_ID => {
-	coderef   => compiled from sub, source and option, saves state
-	sub       => 'Kephra::File::new',
-	parameter => [],
-	source    => package that registered that cmd
-	state     => return value of the call or antother coderef
-	event     => '',
-	label     => 'New',
-	help      => '', # help text to be shown in statusbar or as popup
-	keys      => 'Ctrl + N',
-	icon      => '',
-	bitmap    => '',  #Wx::Bitmap Object
-}

File lib/Kephra/API/Doc.pm

-use v5.10;
-use strict;
-use warnings;
-use Wx;
-use Kephra::App::Editor;
-use Kephra::App::Panel;
-use Kephra::Document;
-
-package Kephra::API::Doc;
-my %document = ('ID'=>{});             # keys of subhashes: ID editor panel file
-my $active;
-my $lowest_free_ID = 1;
-my $lowest_free_anon_NR = 1;
-
-use constant DOC_CLASS => 'Kephra::Document';
-use Scalar::Util qw(blessed looks_like_number);
-
-
-sub active        { $active || '' }
-sub active_editor { $active->editor->{Kephra::API::docbar()} if $active }
-sub active_panel  { $active->panel->{Kephra::API::docbar()} if $active }
-sub set_active {
-	my $doc = find( shift );
-	$active = $doc if $doc;
-}
-sub previous      { App::Kephra::Focus::last( DOC_CLASS ) }
-sub all           { values %{$document{'ID'}} }
-
-sub is { return 1 if blessed($_[0]) and $_[0]->isa( DOC_CLASS ); return 0 }
-
-
-sub add {
-	my $doc = shift;
-	Kephra::Log::warning('need a ' . DOC_CLASS . " thats in stash, not $doc!", 1)
-		unless is($doc);
-	$document{'ID'}  {$lowest_free_ID} = $doc;
-	add_instance($doc, $_) for keys $doc->editor;
-	if ($doc->file_path) {
-		$document{'file'}{$doc->file_path} = $doc;
-	} else {
-		$doc->anon_NR( $lowest_free_anon_NR++ );
-		$document{'anon'}{$doc->anon_NR} = $doc;
-	}
-	$lowest_free_ID++;
-}
-
-
-sub rename_file {
-	my $doc = find( shift );
-	Kephra::Log::warning('need a ' . DOC_CLASS . " thats in stash, not $doc!", 1)
-		unless is($doc);
-	my $file = $doc->old_file_path;
-	delete $document{'file'}{$file} if $file and $document{'file'}{$file};
-	if ($doc->file_path){
-		$document{'file'}{$doc->file_path} = $doc;
-		unless ($doc->old_file_path) {
-			delete $document{'anon'}{$doc->anon_NR};
-			$doc->anon_NR(0);
-		}
-	} else {
-		if ($doc->old_file_path) {
-			$doc->anon_NR( $lowest_free_anon_NR++ );
-			$document{'anon'}{$doc->anon_NR} = $doc;
-		}
-	}
-}
-
-
-sub remove {
-	my $doc = shift;
-#say "remove $doc ", scalar keys %{$document{'ID'}}, ' ',scalar keys %{$document{'file'}}; 
-	Kephra::Log::warning('need a ' . DOC_CLASS . ' thats in stash, not $doc!', 1)
-		unless is($doc);
-	delete $document{'ID'}{$doc->ID} if $doc->ID;
-	#remove_instance($doc, $_) for values $doc->panel;
-	delete $document{'file'}{$doc->file_path} if $doc->file_path;
-#say "removed $doc ", scalar keys %{$document{'ID'}}, ' ',scalar keys %{$document{'file'}}; 
-}
-
-
-sub add_instance {
-	my ($doc, $bar) = @_;
-	return Kephra::Log::warning('need as first parameter a'.DOC_CLASS.' thats in stash, not $doc!', 1)
-		unless is($doc);
-	#return Kephra::Log::warning("need a Kephra::App::Bar::Document instance as second parameter, not $bar")
-	#	unless blessed($bar) eq 'Kephra::App::Bar::Document';
-	$document{'panel'} { $doc->panel->{$bar}  } = $doc;
-	$document{'editor'}{ $doc->editor->{$bar} } = $doc;
-}
-
-
-sub remove_instance {
-	my ($doc, $bar) = @_;
-	return Kephra::Log::warning('need as first parameter a'.DOC_CLASS.' thats in stash, not $doc!', 1)
-		unless is($doc);
-	return Kephra::Log::warning("need a Kephra::App::Bar::Document instance as second parameter, not $bar")
-		unless blessed($bar) eq 'Kephra::App::Bar::Document';
-	delete $document{'panel'}{ $doc->panel->{$bar} };
-	delete $document{'editor'}{ $doc->editor->{$bar} };
-}
-
-
-sub find {
-	my $any = shift;
-	Kephra::Log::warning("need a parameter!", 1) unless defined $any and $any;
-	return     looks_like_number($any)                                     ? $document{'ID'}    {$any}
-	         : ref($any) eq ''                                             ? $document{'file'}  {$any}
-	         : $any->isa('Kephra::App::Panel')                             ? $document{'panel'} {$any}
-	         : $any->isa('Kephra::App::Editor')                            ? $document{'editor'}{$any}
-	         :($any->isa(DOC_CLASS) and $document{'ID'}{$any->ID} eq $any) ? $any
-	         :                                                               undef;
-}
-
-
-sub file_loaded {
-	my $file_path = shift;
-	#Kephra::Log::warning("needs a file path as input!") unless $file_path and -e $file_path;
-	for my $doc ( all() ) {
-		return 1 if $doc->file_path and $doc->file_path eq $file_path;
-	}
-}
-
-
-sub all_editors { keys %{$document{'editor'}} }
-sub do_with_all_editors {
-}
-
-1;

File lib/Kephra/API/Event.pm

-use strict;
-use warnings;
-use Kephra::API;
-
-package Kephra::API::Event;
-
-my %event;
-
-sub add_callback {}
-sub del_callback {}
-sub trigger_callback {}
-sub freeze_callback {}
-sub thaw_callback{}
-
-sub add_event {}
-sub del_event {}
-sub trigger_event {}
-sub freeze_event {}
-sub thaw_event{}
-
-sub global_halt {}
-sub global_restore {}
-
-
-1;

File lib/Kephra/API/GCL.pm

-use strict;
-use warnings;
-
-# GUI Composition Language
-package Kephra::API::GCL;
-
-
-1;
-
-__END__
-
-will be split one day as a seperate project

File lib/Kephra/API/KeyMap.pm

-use strict;
-use warnings;
-use Wx;
-use Kephra::API;
-
-package Kephra::API::KeyMap;
-
-my %definition;
-my %code;
-my %mod_key_value = ( shift => 1000, ctrl => 2000, alt  => 4000);
-my %key_value = (
-	left  => &Wx::WXK_LEFT,      right => &Wx::WXK_RIGHT,
-	up    => &Wx::WXK_UP,         down => &Wx::WXK_DOWN,
-	pageup=> &Wx::WXK_PAGEUP, pagedown => &Wx::WXK_PAGEDOWN,
-	home  => &Wx::WXK_HOME,        end => &Wx::WXK_END,
-	delete => &Wx::WXK_DELETE,  insert => &Wx::WXK_INSERT,
-	back  => &Wx::WXK_BACK,        tab => &Wx::WXK_TAB,
-	esc   => &Wx::WXK_ESCAPE,    
-	enter => &Wx::WXK_RETURN,    space => &Wx::WXK_SPACE,
-	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,
-	pound => 35, tilde => 92,
-	num_left  => &Wx::WXK_NUMPAD_LEFT,  num_right=> &Wx::WXK_NUMPAD_RIGHT,
-	num_up    => &Wx::WXK_NUMPAD_UP,    num_down => &Wx::WXK_NUMPAD_DOWN,
-	num_space => &Wx::WXK_NUMPAD_SPACE, num_tab  => &Wx::WXK_NUMPAD_TAB,
-	num_enter => &Wx::WXK_NUMPAD_ENTER, num_F1   => &Wx::WXK_NUMPAD_F1,
-);
-my $main_map = 'editor';
-
-sub apply {}
-sub build {}
-sub copy {}
-sub overlay {}
-sub register_map {
-}
-
-sub register_keys {
-	my ($keys, $map) = @_;
-	return Kephra::Log::warning("got no hashref") unless ref $keys eq ref {};
-	$map = $main_map unless defined $map;
-	for my $cmd (keys %$keys) {
-		$definition{$map}{ $cmd } = $keys->{$cmd};
-		my $code = keycode_from_definition( $keys->{$cmd} );
-		unless (exists $code{$map}{ $code }) { $code{$map}{ $code } = $cmd }
-		else {
-			Kephra::Log::warning("$cmd tried to register the already taken keycode $code");
-		}
-	}
-}
-
-sub keycode_is_registered {
-	my ($code, $map) = @_;
-	Kephra::Log::warning('got no key code') unless $code;
-	$map = $main_map unless defined $map;
-	return 1 if defined $code{$map}{$code} and $code{$map}{$code}
-}
-
-sub cmd_from_keycode {
-	my ($code, $map) = @_;
-	Kephra::Log::warning('got no key code') unless $code;
-	$map = $main_map unless defined $map;
-	$code{$map}{$code};
-}
-
-sub keycode_from_definition {
-	my $def = shift;
-	$def =~ tr/ 	//d;
-	Kephra::Log::warning('got no key definition') unless $def;
-
-	my @key = split '\+', $def;           # only + can combine key in definition
-	my $code = length($key[-1]) == 1 ? ord uc $key[-1] : $key_value{ $key[-1] };
-	Kephra::Log::warning('don\'t know this key '.$key[-1]) unless $code;
-
-	$code += $mod_key_value{ shift(@key) } while @key > 1;
-	Kephra::Log::warning("got unknown key definition $def") unless $code;
-	return $code;
-}
-
-sub keycode_from_event {
-	my $event = shift;
-	Kephra::Log::warning ("got no event, but $event") unless ref $event and $event->isa('Wx::Event');
-	my $code = $event->GetKeyCode;
-	$code += $mod_key_value{'shift'} if $event->ShiftDown;
-	$code += $mod_key_value{'ctrl'} if $event->ControlDown;
-	$code += $mod_key_value{'alt'} if $event->AltDown;
-	return $code;
-}
-
-sub react_on_event {
-	my ($event, $map) = @_;
-	Kephra::Log::warning ("got no event, but $event") unless ref $event and $event->isa('Wx::Event');
-	$map = $main_map unless defined $map;
-	my $key = keycode_from_event($event);
-	Kephra::API::log("pressed key $key inside the ".(caller)[0]);
-	if (keycode_is_registered($key)){
-			my $cmd = cmd_from_code($key);
-			Kephra::API::log("run command: $cmd");
-			Kephra::API::Command::run( $cmd );
-	}
-	else {$event->Skip}
-}
-
-1;

File lib/Kephra/API/Macro.pm

-use strict;
-use warnings;
-
-package Kephra::API::Macro;
-
-
-1;

File lib/Kephra/API/Plugin.pm

-use strict;
-use warnings;
-
-package Kephra::API::Plugin;
-
-# init the registered plugins
-sub start {}
-
-# register a plugin
-sub register {}
-sub unregister {}
-
-# load and unload a specific plugin
-sub load {}
-sub unload {}
-
-1;

File lib/Kephra/API/Sandrum.pm

-use strict;
-use warnings;
-
-package Kephra::API::Sandrum;
-
-
-1;

File lib/Kephra/App.pm

-use strict;
-use warnings;
-
-use Wx;
-use Kephra::API;
-
-package Kephra::App;
-our @ISA = 'Wx::App';
-our $_ref;
-
-Kephra::API::Command::register({
- 'app-close-save'=> {sub => '$app->close_save', label=> 'Exit', keys=> 'alt+q'},
-});
-
-sub OnInit {
-	$_ref = shift;
-	Kephra::Config::File::Location::init();
-
-	my $win = Kephra::App::Window->new(__PACKAGE__);
-	Kephra::File::new();
-
-	$win->Center();
-	$win->Refresh();   # remove visual clutter on start
-	$win->Show();
-
-	1;
-}
-
-sub close_save {
-	Kephra::File::close_all();
-	close_raw();
-}
-
-sub close_raw  {
-	my $win = Kephra::API::main_window();
-	$win->destroy();
-}
-
-sub OnExit {
-	my $app = shift;
-	Wx::wxTheClipboard->Flush;
-	1;
-}
-
-# $app->ExitMainLoop(1);
-1;

File lib/Kephra/App/Bar/Document.pm

-use v5.12;
-use warnings;
-use Wx;
-use Wx::AUI;
-use Kephra::API;
-use Kephra::API::Command;
-
-package Kephra::App::Bar::Document;
-our @ISA = 'Wx::AuiNotebook';
-our $_ref;
-
-use Scalar::Util qw(blessed looks_like_number);
-
-
-Kephra::API::Command::register({
- 'docbar-select-left'     =>{sub=>'$docbar->select_page_left',     label=>'Previous Tab',  keys=>'ctrl+pageup'},
- 'docbar-select-right'    =>{sub=>'$docbar->select_page_right',    label=>'Next Tab',      keys=>'ctrl+pagedown'},
- #'docbar-select-leftmost'=>{sub=>'$docbar->select_page_leftmost', label=>'First Tab',     keys=>'ctrl+shift+pageup'},
- #'docbar-select-rightmost'=>{sub=>'$docbar->select_page_rightmost',label=>'Last Tab',      keys=>'ctrl+shift+pagedown'},
- 'docbar-move-left'       =>{sub=>'$docbar->move_page_left',       label=>'Move Left',     keys=>'ctrl+shift+pageup'},
- 'docbar-move-right'      =>{sub=>'$docbar->move_page_right',      label=>'Move Right',    keys=>'ctrl+shift+pagedown'},
- #'docbar-move-leftmost'   =>{sub=>'$docbar->move_page_leftmost',   label=>'Move Leftmost', keys=>'alt+shift+pageup'},
- #'docbar-move-rightmost'  =>{sub=>'$docbar->move_page_rightmost',  label=>'Move Rightmost',keys=>'alt+shift+pagedown'},
-});
-
-
-sub new {
-	my( $class, $parent) = @_;
-	my $self = $_ref = $class->SUPER::new( $parent, -1, [-1,-1], [-1,-1],
-		&Wx::wxAUI_NB_TOP | &Wx::wxAUI_NB_TAB_MOVE | &Wx::wxAUI_NB_WINDOWLIST_BUTTON |
-		&Wx::wxAUI_NB_SCROLL_BUTTONS | &Wx::wxAUI_NB_CLOSE_ON_ACTIVE_TAB
-	);
-
-	$self->{'visual_page_order'} = [];   # visual order of internal pos : vis -> int
-	$self->{'internal_page_order'} = []; # internal order of visual pos : int -> vis
-
-	$_->add_instance($self) for Kephra::API::all_documents();
-	$self->mount_events();
-
-	return $self;
-}
-
-sub Destroy {
-	my ($self) = @_;
-	$_->del_instance($self) for Kephra::API::all_documents();
-	$self->SUPER::Destroy( );
-	1;
-}
-
-sub mount_events {
-	my ($self) = @_;
-	#Wx::Event::EVT_SET_FOCUS ($self,  sub { print "focus--\n";$_[1]->Skip });
-	Wx::Event::EVT_AUINOTEBOOK_BEGIN_DRAG( $self, -1, sub {
-		my ($bar, $event ) = @_;
-		$bar->{'DND_page_nr'} = $event->GetSelection;
-	});
-	Wx::Event::EVT_AUINOTEBOOK_END_DRAG($self, -1, sub {
-		my ($bar, $event ) = @_;
-		return unless defined $bar->{'DND_page_nr'};
-		$bar->move_page_position_visually($bar->{'DND_page_nr'}, $event->GetSelection);
-		$bar->{'DND_page_nr'} = undef;
-		Kephra::App::Focus::stay();
-	});
-	Wx::Event::EVT_AUINOTEBOOK_PAGE_CHANGED( $self, -1, sub {
-		my ($bar, $event ) = @_;
-		my $new_page = $bar->GetPage( $event->GetSelection );
-		Kephra::API::Doc::set_active( $new_page );
-		Kephra::API::main_window()->refresh_title();
-		Kephra::API::focus( $new_page );
-		$event->Skip;
-	});
-	Wx::Event::EVT_AUINOTEBOOK_PAGE_CLOSE( $self, -1, sub {
-		my ($bar, $event ) = @_; 
-		$event->Veto;
-		Kephra::File::close_active();
-	});
-	# keep focus on editor even when klicking on tab bar
-	#Wx::Event::EVT_LEFT_DOWN( $self, sub { Kephra::API::active_editor()->focus; print "--down"; });
-	#$self->Connect( -1, -1, &Wx::wxEVT_SET_FOCUS, sub {  print "--"; } )
-	#Wx::Event::EVT_SET_FOCUS( $self, sub { my ($bar, $event ) = @_; $event->Skip; say "--bar"; });
-}
-
-sub unmount_events {
-	my ($self) = @_;
-	Wx::Event::EVT_AUINOTEBOOK_BEGIN_DRAG( $self, -1, sub {});
-	Wx::Event::EVT_AUINOTEBOOK_END_DRAG  ( $self, -1, sub {});
-	Wx::Event::EVT_AUINOTEBOOK_PAGE_CHANGED( $self, -1, sub {});
-	Wx::Event::EVT_AUINOTEBOOK_PAGE_CLOSE  ( $self, -1, sub {});
-}
-
-
-sub add_page {
-	my ($self, $new_page, $position, $title, $set_active) = @_;
-	return Kephra::Log::warning( "got no panel", 1 ) until Kephra::App::Util::is_panel($new_page);
-	my $active_pos = $self->GetSelection;
-
-	$title    = ''                           unless defined $title;
-	$position = 'right'                      if $position eq 'default' or $position eq -1;
-	$position = $self->rightmost_page_pos+1  if $position eq 'rightmost';
-	$position = $active_pos + 1              if $position eq 'right';
-	$position = $active_pos                  if $position eq 'left';
-	$position = $self->leftmost_page_pos     if $position eq 'leftmost';
-	$set_active = 0                          unless defined $set_active;
-
-	$new_page->Reparent($self);
-	$self->InsertPage( $position, $new_page, $title, $set_active);
-	#$self->set_page_title( $title, $new_page );
-	Kephra::API::focus($new_page) if $set_active;
-	Kephra::API::main_window()->refresh_title() if $set_active;
-
-	# inserting new index to position translators
-	for   (@{$self->{'visual_page_order'}}){ $_++ if $_ >= $position }
-	splice @{$self->{'visual_page_order'}},  $position, 0, $position;
-	$self->refresh_internal_page_order();
-
-	$self;
-}
-
-sub remove_page {
-	my ($self, $page) = @_;
-	my $internal_position = $self->GetPageIndex( $page );
-
-	$self->RemovePage( $internal_position );
-	my $visual_position = $self->{'internal_page_order'}[$internal_position];
-	my $visual = $self->{'visual_page_order'};
-	splice @$visual, $visual_position, 1;
-	for (@$visual) {$_-- if $_ >= $internal_position}
-	$self->{'visual_page_order'} = $visual;
-	$self->refresh_internal_page_order;
-}
-
-
-sub refresh_internal_page_order {       # sync visual_page_order index with internal_page_order after each change
-	my ($self) = @_;
-	my $visual = $self->{'visual_page_order'};
-	return unless ref $visual eq ref [];
-	my $internal;
-	$internal->[ $visual->[$_] ] = $_ for 0 .. @$visual-1;
-	$self->{'internal_page_order'} = $internal;
-}
-
-sub move_page_position_visually {          # for dnd only
-	my ($self, $from, $to ) = @_;
-	return unless $from >= 0 and $from < $self->GetPageCount;
-	return unless $to >= 0 and $to < $self->GetPageCount;
-	my $position = splice @{$self->{'visual_page_order'}}, $from, 1;
-	splice @{$self->{'visual_page_order'}}, $to, 0, $position;
-	$self->refresh_internal_page_order();
-}
-
-sub move_page_visually  {               # for movements by keyboard
-	my ($self, $from, $to ) = @_;
-	my $max = $self->GetPageCount - 1;
-	return if $from < 0 or $from > $max;
-	return if $to < 0 or $to > $max;
-	return if $from == $to;
-
-	my $pos = $self->{'visual_page_order'}[ $from ];
-	my $page = $self->GetPage( $pos );
-	my $label = $self->GetPageText( $pos );
-	my $visual = $self->{'visual_page_order'};
-
-	$self->unmount_events();
-	$self->RemovePage( $pos );
-	$self->InsertPage( $to, $page, $label);
-	my $removed = splice @$visual, $from, 1;
-	if ($from < $to) { for (@$visual) {$_-- if $_ > $removed and $_ <= $to} }
-	else             { for (@$visual) {$_++ if $_ < $removed and $_ >= $to} }
-	splice @$visual, $to, 0, $to;
-	$self->{'visual_page_order'} = $visual;
-	$self->refresh_internal_page_order();
-	$self->SetSelection( $self->{'visual_page_order'}[$to] );
-	$self->mount_events();
-}
-
-sub move_page_left      {
-	my ($self) = @_;
-	$self->move_page_visually ( 
-		$self->active_visual_pos, $self->next_page_pos_rot_left( $self->GetSelection )
-	);
-}
-sub move_page_right     {
-	my ($self) = @_;
-	$self->move_page_visually( 
-		$self->active_visual_pos, $self->next_page_pos_rot_right( $self->GetSelection )
-	);
-}
-sub move_page_leftmost  { 
-	my ($self) = @_;
-	$self->move_page_visually( $self->active_visual_pos, $self->leftmost_page_pos );
-}
-sub move_page_rightmost { 
-	my ($self) = @_;
-	$self->move_page_visually( $self->active_visual_pos, $self->rightmost_page_pos );
-}
-
-sub select_page_left    { 
-	my ($self) = @_;
-	$self->raise_page( $self->next_page_pos_rot_left( $self->GetSelection ) );
-}
-sub select_page_right   { 
-	my ($self) = @_;
-	$self->raise_page( $self->next_page_pos_rot_right( $self->GetSelection ) );
-}
-sub select_page_leftmost  { $_[0]->raise_page( $_[0]->leftmost_page_pos ) }
-sub select_page_rightmost { $_[0]->raise_page( $_[0]->rightmost_page_pos ) }
-
-sub active_visual_pos     { $_[0]->{'internal_page_order'}[ $_[0]->GetSelection ] }
-sub leftmost_page_pos     { 0 }
-sub rightmost_page_pos    { $_[0]->GetPageCount-1 }
-sub valid_page_pos        { 
-	1 if $_[1] >= $_[0]->leftmost_page_pos and $_[1]<= $_[0]->rightmost_page_pos
-}
-sub next_page_pos_rot_left{
-	my ($self) = @_; # take in position of internal order
-	my $pos = $self->{'internal_page_order'}[ $_[1] ];
-	$self->{'visual_page_order'}[$pos == 0 ? $self->rightmost_page_pos : $pos-1]
-}
-sub next_page_pos_rot_right{
-	my ($self) = @_; # take in position of internal order
-	my $pos = $self->{'internal_page_order'}[ $_[1] ];
-	$self->{'visual_page_order'}[$pos == $self->rightmost_page_pos ? 0 : $pos+1]
-}
-
-
-sub raise_page    {
-	my ($self, $pop) = @_; # can be Position Or Page (panel reference)
-	my $position = int $pop eq $pop ? $pop : $self->GetPageIndex($pop);
-	return unless $self->valid_page_pos( $position );
-	# if just selecting the currrent, only tab drives focus nuts
-	$self->SetSelection( $position ) unless $position == $self->GetSelection;
-	my $page = $self->GetPage($position);
-	my $doc = Kephra::API::Doc::find($page);
-	Kephra::API::Doc::set_active( $doc );
-	Kephra::API::focus ( defined $doc ? $doc->editor->{$self} : $page );
-	Kephra::API::main_window()->refresh_title();
-
-}
-
-
-sub active_title { $_[0]->GetPageText( $_[0]->GetSelection ) }
-
-sub set_page_title {
-	my ($self, $label, $page) = @_;
-	$page = $self->GetSelection unless defined $page;
-	return Kephra::Log::warning("need a Kephra::App::Panel or valid position number") 
-		unless (looks_like_number($page) and $self->valid_page_pos($page))
-		or (blessed($page) and $page->isa('Kephra::App::Panel'));
-	my $found = $self->GetPageIndex($page);
-	my $position = $found eq &Wx::wxNOT_FOUND ? $page : $found;
-	$self->SetPageText( $position, $label );
-}
-
-
-1;

File lib/Kephra/App/Bar/MainTool.pm

-use strict;
-use warnings;
-
-package Kephra::App::Bar::MainTool;
-
-
-1;

File lib/Kephra/App/Bar/Menu.pm

-use strict;
-use warnings;
-
-use Kephra::App::Menu;
-use Kephra::Config::Default;
-use Kephra::Log;
-
-package Kephra::App::Bar::Menu;
-
-sub get {
-	my $menu_def = Kephra::Config::Default::mainmenu();
-	return Kephra::Log::error("got no array ref as menu definition")
-		unless ref $menu_def eq 'ARRAY';
-
-	my $bar = Wx::MenuBar->new();
-	for my $menu_data (@{ Kephra::App::Menu::assemble($menu_def) }) {
-		next unless ref $menu_data eq ref [];
-		$bar->Append( Kephra::App::Menu::compile( $menu_data ) );
-	}
-	return $bar;
-}
-
-sub set {
-	my $which_menu = shift;
-}
-
-
-1;

File lib/Kephra/App/Bar/Search.pm

-use strict;
-use warnings;
-use Wx;
-
-use Kephra::App::ToolBar;
-use Kephra::Config::Default;
-use Kephra::Log;
-
-package Kephra::App::Bar::Search;
-our @ISA = 'Wx::Panel';
-
-sub new {
-	my( $class, $parent) = @_;
-	my $panel = $class->SUPER::new($parent, -1, [-1,-1],[-1, -1]);
-
-	my $bar_def = Kephra::Config::Default::searchbar();
-	return Kephra::Log::error('got no array ref as bar definition') unless ref $bar_def eq 'ARRAY';
-
-	my $bar_data = Kephra::App::ToolBar::assemble($bar_def);
-	my $bar = Kephra::App::ToolBar::compile($bar_data, $panel);
-	my $sizer = Wx::BoxSizer->new( &Wx::wxVERTICAL );
-	$sizer->Add($bar, 1, &Wx::wxGROW, 0);
-	$panel->SetSizer($sizer);
-
-    return $panel;
-}
-
-
-1;

File lib/Kephra/App/Bar/Side.pm

-use strict;
-use warnings;
-
-package Kephra::App::Bar::Side;
-our @ISA = 'Wx::Panel';
-
-sub new {}
-sub add {}
-sub remove {}
-
-sub open {}
-sub close {}
-sub raise {}
-
-1;

File lib/Kephra/App/Bar/Status.pm

-use strict;
-use warnings;
-use Wx;
-use Kephra::App::Util;
-
-package Kephra::App::Bar::Status;
-our @ISA = 'Wx::Panel';
-
-my $color = Kephra::App::Util::get('create_color');
-
-sub new {
-	my( $class, $parent) = @_;
-	my $self = $class->SUPER::new($parent, -1, [-1,-1],[-1, 30]);
-	my $sizer = Wx::BoxSizer->new( &Wx::wxHORIZONTAL );
-	my $grey = $color->('#aaaaaa');
-	for my $type (qw(cursorpos mode tabs EOL info)){