Commits

Herbert Breunung committed dba447d

move and clean internal docs a bit

  • Participants
  • Parent commits 8885865

Comments (0)

Files changed (12)

 	qw/Benchmark Encode Encode::Guess Cwd/,
 	qw/File::Find File::Spec File::UserConfig Config::General YAML/,
 	qw/PPI Moo/,
-	qw/Wx Wx::Scintilla Wx::Perl::ProcessStream/, #  Wx::STC
+	qw/Wx Wx::STC Wx::Perl::ProcessStream/, #  Wx::Scintilla
 );
 our @used_wx_modules = qw/Wx::AUI Wx::DND Wx::RichText/; # Wx::STC Wx::HTML
 

lib/Kephra/API.pm

+
 use strict;
 use warnings;
 use Carp;
 use Kephra::SandrumInterpreter;
 use Kephra::Worker;
 
+
 package Kephra::API;
 my $VERSION = 0.1;
 
 sub all_documents   { Kephra::DocumentStash::all_doc() }
 sub do_with_all_documents { }
 
-sub focus             {$Kephra::App::Window::_ref->set_focus(@_)}
-sub focus_back        {$Kephra::App::Window::_ref->set_focus_back()}
+sub focus           { $Kephra::App::Window::_ref->set_focus(@_) }
+sub focus_back      { $Kephra::App::Window::_ref->set_focus_back(@_) }
 
 # IO-unit
-sub input             { $Kephra::App::Part::IOUnit::_ref->get_line() }
-sub output            { $Kephra::App::Part::IOUnit::_ref->output(@_) }
-sub log               { $Kephra::App::Part::IOUnit::_ref->output('log', @_) }
-sub raise_output_slot { $Kephra::App::Part::IOUnit::_ref->raise_slot(@_) }
+sub input           { $Kephra::App::Part::IOUnit::_ref->get_line() }
+sub output          { $Kephra::App::Part::IOUnit::_ref->output(@_) }
+sub log             { $Kephra::App::Part::IOUnit::_ref->output('log', @_) }
 
 sub configs  { }
 
 # event table
-sub add_event_callback {}
-sub del_event_callback {}
-sub trigger_event {}
-sub freeze_event {}
-sub thaw_event {}
+sub add_event_callback { }
+sub del_event_callback { }
+sub trigger_event      { }
+sub freeze_event       { }
+sub thaw_event         { }
 
 
 # command list
-sub add_command {}
-sub del_command {}
-sub run_command {}
+sub add_command { }
+sub del_command { }
+sub run_command { }
 sub command_status {}
 
 # cmd line lang
 sub available_plugins {}
 sub unregister_plugin {}
 
+# if you want to know more, read Kephra::Internals.pod
+
+
 1;
 
-__END__
-
-=head1 NAMESPACES
-
-If you want to leave the recommended ways as proposed by this module
-and call functions or data directly ...
-here is an overview to the Kephra name space organisation.
-
-to the namespace Kephra::Doc::* belongs also the module Kephra::Doc
-
-=over 2
-
-* Kephra
-
-internals
-
-* Kephra::API
-
-interface all plugins and internal functions should use
-
-* Kephra::App
-
-all the Wx-GUI-related stuff, all visible parts
-
-* Kephra::Config
-
-data structures
-
-* Kephra::Document
-
-document properties, syntax modes
-
-* Kephra::Edit
-
-text processing
-
-* Kephra::Plugin
-
-plugin namespace
-Kephra::API::Plugin is the base class for all plugins
-
-=back
-

lib/Kephra/App/Dialog.pm

 use warnings;
 use Wx;
 use Kephra::API;
-use Kephra::CommandList;
 
 package Kephra::App::Dialog;
 

lib/Kephra/App/Dialog/About.pm

 	$book->SetSelection(0);
 
 	my $sizer = Wx::BoxSizer->new( &Wx::wxVERTICAL );
-	$sizer->Add($book, 1, Wx::wxGROW, 0);
+	$sizer->Add($book, 1, &Wx::wxGROW, 0);
 	$dialog->SetSizer($sizer);
 
 

lib/Kephra/App/Dialog/Config.pm

 	$keysizer->AddStretchSpacer();
 	$keysizer->Add($button{lc($_)}, 0, &Wx::wxGROW | &Wx::wxALL, 10) for @button_label;
 	my $sizer = Wx::BoxSizer->new( &Wx::wxVERTICAL );
-	$sizer->Add($tree, 1, Wx::wxGROW, 0);
+	$sizer->Add($tree, 1, &Wx::wxGROW, 0);
 	$sizer->Add(Wx::StaticLine->new($dialog, -1, [-1,-1], [-1,2]), 0, &Wx::wxTOP | &Wx::wxGROW, 10);
 	$sizer->Add($keysizer, 0, &Wx::wxGROW, 0);
 	$dialog->SetSizer($sizer);

lib/Kephra/App/Dialog/Keymap.pm

 	$keysizer->AddStretchSpacer();
 	$keysizer->Add($button{lc($_)}, 0, &Wx::wxGROW | &Wx::wxALL, 10) for @button_label;
 	my $sizer = Wx::BoxSizer->new( &Wx::wxVERTICAL );
-	$sizer->Add($list, 1, Wx::wxGROW, 0);
+	$sizer->Add($list, 1, &Wx::wxGROW, 0);
 	$sizer->Add($keysizer, 0, &Wx::wxGROW, 0);
 	$dialog->SetSizer($sizer);
 

lib/Kephra/App/Part/IOUnit.pm

 use Wx::AUI;
 use Wx::Perl::ProcessStream;
 use Kephra::API;
+use Kephra::KeyMap;
 
 package Kephra::App::Part::IOUnit;
+
 our @ISA = 'Wx::Panel';
 our $_ref;
 

lib/Kephra/CommandList.pm

 use strict;
 use warnings;
-use Kephra::KeyMap;
-use Kephra::Config::Default;
-use Kephra::Log;
+use Kephra::API;
 
 package Kephra::CommandList;
 

lib/Kephra/EventTable.pm

 use strict;
 use warnings;
-use Kephra::Log;
+use Kephra::API;
 
-package Kephra::API::EventTable;
+package Kephra::EventTable;
 
 my %event;
 

lib/Kephra/File.pm

 use warnings;
 use File::Spec;
 use Kephra::API;
-use Kephra::DocumentStash;
 
 package Kephra::File;
 

lib/Kephra/Internals.pod

 =head1 API
 
+=head2 Kephra::API
+
 The module Kephra::API is the best starting point to understand the inner workings.
 It's one design goal and purpose of this file, because it gives an overview of
 all important functions and values and shows where they originate. From here
 under the hood. As long as the first version number (see L<Versioning>)
 does not change, nothing will be removed from the API.
 
-=head1 CommandList
+=head2 Kephra::CommandList
 
-=head1 KeyMap
+=head2 Kephra::KeyMap
 
-=head1 EventTable
+=head2 Kephra::EventTable
+
+=head1 NAMESPACES
+
+If you want to leave the recommended ways as proposed by the API
+and call functions or data directly ...
+here is an overview to the Kephra name space organisation.
+
+to the namespace Kephra::Doc::* belongs also the module Kephra::Doc
+
+=over 2
+
+* Kephra
+
+internals
+
+* Kephra::API
+
+interface all plugins and internal functions should use
+
+* Kephra::App
+
+all the Wx-GUI-related stuff, all visible parts
+
+* Kephra::Config
+
+data structures
+
+* Kephra::Document
+
+document properties, syntax modes
+
+* Kephra::Edit
+
+text processing
+
+* Kephra::Plugin
+
+plugin namespace
+Kephra::API::Plugin is the base class for all plugins
+
+=back
 
 =head1 Glossary
 
-=head3 App
+=head2 App
 
 everything visible and GUI (Wx) related
 
-=head3 App::Part
+=head2 App::Part
 
 visual area dedicated for one purpose, editor is the most prominent,
 but ther are also FileBrowser, IOUnit and more
 
-=head3 Editor
+=head2 Editor
 
 one widget for editing text
 
-=head3 Edit
+=head2 Edit
 
 namespace for the actual editing operations
 
-=head3 Panel
+=head2 Panel
 
 area to place widget on, can be under anything, even under each editor
 a Kephra::App::Panel is a helper class that manages its sizer

t/610-commandlist.t

 
 use Wx;
 use Kephra::App::Util;
+use Kephra::API;
 use Kephra::CommandList;
 
 sub one     { 1 }