Kephra / lib / Kephra / Internals.pod

=head1 API

=head2 Kephra::API

The module Kephra::API is the best starting point to understand the inner workings.
Thats'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
you can step to the other major interfaces that can be seen in the first lines.

But more vitally it decouples many cross module calls and allows to change things
under the hood during smaller release cycles. As long as the first version number
(see L<Versioning>) does not change, nothing will be removed from the API.

=head2 Kephra::Config

Interface too most not document related internally held data.
We have a much broader understanding of configuration.
Even Icons and localisation belong to it.
Its all data which puts the app in the state it is.

=head2 Kephra::CommandList

Also sort of API but more complex. Contains every call the user is able to make.
Needed to protocol each call for monitoring, macros and other introspection
based functions. Also helps to make simple menu and toolbar definitions.
They just need to be a list of CommandIDs.

=head2 Kephra::KeyMap

handles the mapping from key kommbo to the command it triggeres for any 
App::Dialog and App::Part

=head2 Kephra::EventTable


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

* Kephra

contains just the init process:
setting dirs, loading libs, finding configs, start worker fork

* Kephra::API

interface to important internal functions all modules and plugins should use

* Kephra::App

module that handles boot and shutdown sequence
namespace of all the Wx-GUI-related stuff, all visible parts
Kephra::App::* contains the more lower level stuff and 
Kephra::App::*::* the higher level components

* Kephra::App::Dialog

all dialogs are called from here

* Kephra::App::Part

namespace of the great visual sections of the app

=head2 Kephra::App::Focus

keeps track in which App::Part the Focus wanders to make save way back if needed

=over 4

* Kephra::App::Panel

wrapper around Wx::Panel + Wx::BoxSizer, helps not to deal with with sizers
is a stepping stone to the GCL

* Kephra::App::Window

main frame/window and main layout of the app
holds all the Kephra::App::Part s and Bars

* 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


=head1 Glossary

=head2 App

everything visible and GUI (Wx) related

=head2 App::Part

visual area dedicated for one purpose, editor is the most prominent,
but ther are also FileBrowser, IOUnit and more

=head2 Editor

one widget for editing text

=head2 Edit

namespace for the actual editing operations

=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
(visibility and ordering of elements)

=head1 Document



our @needed_at_first = qw/App API/;
our @starttime_loaded_modules = qw/
	App App::Util API Config Config::Default Config::File
	Document DocumentStash CommandList Edit EventTable 
	File KeyMap PluginRegistrar SanddrumInterpreter Works/;
our @runtime_loaded_namespaces =
	qw/App::Dialog Config::Default/;

our @command_modules = 
	qw/App App::Panel::Editor App::Panel::FileBrowser App::Panel::IOUnit
	App::Panel::OrgPad App::Panel::ProjectManager App::Panel::SratchSheet
	App::Panel::TextLab App::Panel::TreeLib
	CommandList Config 
	Edit File EventTable KeyMap PluginRegistrar SanddrumInterpreter/;
our @oop_interfaces = 
	qw/App::Editor App::Panel App::Splitter App::SidePanelController 
	   App::Bar::Document Document/;