Source Code/scribus: Difference between revisions

From Scribus Wiki
Jump to navigation Jump to search
No edit summary
m (Jluc, Like this?)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Development]][[Category:SourceCode]]
[[Category:Development]][[Category:SourceCode]]


Parent directory : [[Source_Code]]
<div class="toccolours mw-collapsible mw-collapsed" style="width:800px;">
<big>See also : [[Source Code|parent folder's documentation]]</big>
<div class="mw-collapsible-content">{{:Source_Code}}</div>
</div>


The <tt>scribus</tt> directory contains the source code for Scribus, and plenty of subdirectories with important functionality held within. To name but a few of the important source files...
The <big>'''<tt>scribus</tt>'''</big> directory contains the source code for Scribus, and plenty of subdirectories with important functionality held within. To name but a few of the important source files...


*<tt>main.h/.cpp</tt> - Where the program starts running from. Its just a stub file that points to the main *nix or win32 main files
*<big>'''<tt>main.h/.cpp</tt>'''</big> 
*<tt>main_nix.h/.cpp</tt>
**Where the program starts running from. Its just a stub file that points to the main *nix or win32 main files
*<big>'''<tt>main_nix.h/.cpp</tt>'''</big>
**Creates the ScribusQApp class (where Qt starts to kick in)
**Creates the ScribusQApp class (where Qt starts to kick in)
**Initiates the crash handler
**Initiates the crash handler
**Starts and initialises the ScribusQApp instance, and passes the command line to it for parsing
**Starts and initialises the ScribusQApp instance, and passes the command line to it for parsing
*<tt>main_win32.h/.cpp</tt>
*<big>'''<tt>main_win32.h/.cpp</tt>'''</big>
**Creates the ScribusQApp class (where Qt starts to kick in) from the <tt>scribusapp.cpp</tt> file.
**Creates the ScribusQApp class (where Qt starts to kick in) from the <tt>scribusapp.cpp</tt> file.
**Initiates the crash handler
**Initiates the crash handler
**Starts and initialises the ScribusQApp instance, and passes the command line to it for parsing
**Starts and initialises the ScribusQApp instance, and passes the command line to it for parsing
*<tt>scribusqapp.h/.cpp</tt>
*<big>'''<tt>scribusqapp.h/.cpp</tt>'''</big>
**Initialise the ScribusCore instance which is in <tt>scribuscore.cpp</tt>
**Initialise the ScribusCore instance which is in <tt>scribuscore.cpp</tt>
**Sets up the download manager
**Sets up the download manager
**Parses the command line
**Parses the command line
**Sets up the regional settings/languages and loads the GUI translations
**Sets up the regional settings/languages and loads the GUI translations
*<tt>scribuscore.h/.cpp</tt>
*<big>'''<tt>scribuscore.h/.cpp</tt>'''</big>
**Starts the GUI (<tt>ScribusMainWindow</tt> class) which is in <tt>scribus.cpp</tt>
**Starts the GUI (<tt>ScribusMainWindow</tt> class) which is in <tt>scribus.cpp</tt>
**Sets up splash screen
**Sets up splash screen
Line 26: Line 30:
**Loads the preferences
**Loads the preferences
**Initialises the colour management system
**Initialises the colour management system
*<tt>scribus.h/.cpp</tt>
*<big>'''<tt>scribus.h/.cpp</tt>'''</big>
**A real monster of a file, which contains a lot of important GUI code for the main window, menus etc.
**A real monster of a file, which contains a lot of important GUI code for the main window, menus etc.
*<tt>scribusview.h/.cpp</tt>
*<big>'''<tt>scribusview.h/.cpp</tt>'''</big>
**The view of the Scribus document is contained here and interfaces with the "canvas"
**The view of the Scribus document is contained here and interfaces with the "canvas"
*<tt>scribusdoc.h/.cpp</tt>
*<big>'''<tt>scribusdoc.h/.cpp</tt>'''</big>
**Contains most of the code around manipulation of a Scribus document, with many links into page items, etc
**Contains most of the code around manipulation of a Scribus document, with many links into page items, etc
*<tt>scribuswin.h/.cpp</tt>
*<big>'''<tt>scribuswin.h/.cpp</tt>'''</big>
**The document window of the Scribus document is contained here and interfaces with the ScribusMainWindows and ScribusView instances.
**The document window of the Scribus document is contained here and interfaces with the ScribusMainWindows and ScribusView instances.
*<tt>pageitem.h/.cpp</tt>
*<big>'''<tt>pageitem.h/.cpp</tt>'''</big>
**The base code for all page items is contained here.
**The base code for all page items is contained here.
*<tt>pageitem_*.h/.cpp</tt>
*<big>'''<tt>pageitem_*.h/.cpp</tt>'''</big>
**All of the different page item types have their own classes/files with the specific definitions and needs for the type of item they are.
**All of the different page item types have their own classes/files with the specific definitions and needs for the type of item they are.
*<tt></tt>
*<big>'''<tt></tt>'''</big>
*<tt></tt>
*<big>'''<tt></tt>'''</big>
 
<!--use this template:
*<big>'''<tt></tt>'''</big>
-->

Latest revision as of 00:20, 20 January 2014


See also : parent folder's documentation

Introduction

This group of pages aims to document some of the important files within the Scribus source code. Scribus has a lot of files and lots of classes within to bring the functionality to the user. There's some basic organisation into directories to distinguish files/classes and their purpose, however the file trees are generally quite large.

Visual Tree

Scribus Source Tree

This page will act similiarly to wiki Source Tree page.

Tree

It will list and summarize all the directories that live within the Scribus project source tree.[1]

├── OSX-package
│   ├── inputs
│   └── linktools
├── Scribus.app
│   └── Contents
├── cmake
│   └── modules
├── devel-doc
│   ├── images
│   └── templates
├── doc
│   ├── cs
│   ├── de
│   ├── en
│   ├── fr
│   ├── it
│   └── pl
├── dtd
├── resources
│   ├── dicts
│   ├── editorconfig
│   ├── icons
│   ├── keysets
│   ├── loremipsum
│   ├── profiles
│   ├── spell_dicts
│   ├── swatches
│   ├── templates
│   ├── translations
│   └── versions
├── scribus
│   ├── colormgmt
│   ├── desaxe
│   ├── designer
│   ├── downloadmanager
│   ├── dtd
│   ├── fonts
│   ├── manpages
│   ├── old
│   ├── plugins
│   ├── styles
│   ├── tests
│   ├── text
│   ├── third_party
│   ├── tt
│   ├── ui
│   └── unicodemap
├── win32
│   └── vc9
└── xcode
    └── Scribus

Related Pages

Low Hanging Fruit

References

  1. Retrieved from SVN on 2013-11-21

Root Directory (Scribus)

The directory contains the main build files for building with CMake (primarily on Unix-like platforms):

  • CMakeLists.txt
  • ConfigureChecks.cmake
  • cmake_uninstall.cmake.in
  • config.h.cmake

Various documentation files are included as well such as:

  • README
  • README.MacOSX
  • AUTHORS
  • BUILDING
  • ...

Sub-Folders

After that, there are a number of directories per the below:

  • cmake - This directory contains the additional files to find additional resources on the system for building the code
  • devel-doc - This directory contains the files required to build the doxygen based source file documentation. Some classes are better documented than others. :) You can build this documentation by running make in that directory. It takes a while to run through all the source code though. Then you can open the index.html file in your favourite web browser.
  • resources - This directory contains a lot of important files for Scribus to run, and are installed with the main Scribus program. Examples are icons, fonts, GUI translation files, document templates, etc.
  • Most importantly, there is the scribus directory. This directory is the root of the real source code tree and contains the most important files for the source of Scribus.

The scribus directory contains the source code for Scribus, and plenty of subdirectories with important functionality held within. To name but a few of the important source files...

  • main.h/.cpp
    • Where the program starts running from. Its just a stub file that points to the main *nix or win32 main files
  • main_nix.h/.cpp
    • Creates the ScribusQApp class (where Qt starts to kick in)
    • Initiates the crash handler
    • Starts and initialises the ScribusQApp instance, and passes the command line to it for parsing
  • main_win32.h/.cpp
    • Creates the ScribusQApp class (where Qt starts to kick in) from the scribusapp.cpp file.
    • Initiates the crash handler
    • Starts and initialises the ScribusQApp instance, and passes the command line to it for parsing
  • scribusqapp.h/.cpp
    • Initialise the ScribusCore instance which is in scribuscore.cpp
    • Sets up the download manager
    • Parses the command line
    • Sets up the regional settings/languages and loads the GUI translations
  • scribuscore.h/.cpp
    • Starts the GUI (ScribusMainWindow class) which is in scribus.cpp
    • Sets up splash screen
    • Finds the fonts on the system
    • Initialises the default program values, key shortcuts
    • Loads the preferences
    • Initialises the colour management system
  • scribus.h/.cpp
    • A real monster of a file, which contains a lot of important GUI code for the main window, menus etc.
  • scribusview.h/.cpp
    • The view of the Scribus document is contained here and interfaces with the "canvas"
  • scribusdoc.h/.cpp
    • Contains most of the code around manipulation of a Scribus document, with many links into page items, etc
  • scribuswin.h/.cpp
    • The document window of the Scribus document is contained here and interfaces with the ScribusMainWindows and ScribusView instances.
  • pageitem.h/.cpp
    • The base code for all page items is contained here.
  • pageitem_*.h/.cpp
    • All of the different page item types have their own classes/files with the specific definitions and needs for the type of item they are.