Warning, /office/calligra/libs/flake/Mainpage.dox is written in an unsupported language. File is not indexed.
0001 /** 0002 * \mainpage Flake 0003 * 0004 * The Flake library is a low level library for all kinds of graphical content 0005 * to be placed on any Calligra canvas. This includes a line to text-areas or 0006 * even movies. Just as important, this library will include tools to manipulate 0007 * the graphical content. At least at the level of Flake objects. This goes from 0008 * moving/rotating the object to a basis for complex brushes for a paint program. 0009 0010 * <b>Who uses Flake</b><br> 0011 * <img src="../flake.png"> 0012 * Flake is a middle layer between the applications and the content providers. 0013 * The applications will allow flake to be plugged in by implementing the 0014 * KoCanvasController interface while providers of content (like a chart engine 0015 * or a text component) will extend KoShape and optionally KoToolBase to do their 0016 * work. 0017 * 0018 * A <b>shape</b> is a rectangle or a text or a movie. A shape paints itself and has content. 0019 * A <b>Tool</b> get user input. Tools do things on data, tools do things on shapes. 0020 * Both shapes and tools are plugins. So they are independent of applications. 0021 * For example; I have a textshape that paints text. It comes with a texttool that 0022 * takes mouse and keyboard events and alters the text that the textshape shows. 0023 * This idea of combining a shape and a text is done in flake by "ID"s . Each 0024 * shape has an ID and a tool has an ID. If they have the same ID they belong 0025 * together. 0026 * Example; I select a text shape and the toolbox will show a icon to activate the 0027 * text tool. 0028 * 0029 * The way that a shape is kept separate from the application and from the Flake 0030 * layer is similar to how a widget in a GUI is kept separate from the application. 0031 * The shape inherits from the abstract KoShape class and all the logic embedded in 0032 * the KoShape class is enough for the flake layer to do all things with it like 0033 * positioning and moving as well as rotating and deleting it. 0034 * Just like a widget does not know the difference between painting on one app, or 0035 * another a shape will not know the difference. The flake library will take care 0036 * of all details. 0037 * 0038 * It is common to combine a shape-plugin with one or more tools which are made 0039 * specifically to work on that shape type. So, a text shape comes with a tool that 0040 * knows how to address the shape not only by the abstract KoShape class, but also 0041 * by the KoTextShape API and is therefor able to alter the data that that shape 0042 * displays. In this case text. 0043 0044 * Flake natively only has a vector shape. All other types of shapes (including the 0045 * text one used in the example above) are plugins and not part of Flake itself. 0046 * 0047 * 0048 * Use KoShape as a base object for any application-specific graphical 0049 * content, and extend KoShapeContainer for objects that can contain others. 0050 * 0051 * KoShape is the base class for all flake objects. Flake objects extend it 0052 * to allow themselves to be manipulated by the KoToolBase s. The content of such an 0053 * object is independent and based on the model of the data this object represents. 0054 * 0055 * If you want to be a supplier of shape objects; create a library with a KoShapeFactoryBase 0056 * class and install a .desktop service file with the following content: 0057 * 0058 @verbatim 0059 [Desktop Entry] 0060 Encoding=UTF-8 0061 Name=My Flake Shapes Plugin 0062 ServiceTypes=Calligra/Shape 0063 Type=Service 0064 X-KDE-PluginInfo-Name=myflakeshapes 0065 X-KDE-Library=myflakeshapesplugin 0066 X-Flake-MinVersion=27 0067 X-Flake-PluginVersion=27 0068 @endverbatim 0069 * 0070 */ 0071 0072 // DOXYGEN_SET_PROJECT_NAME = Flake 0073 // DOXYGEN_SET_IGNORE_PREFIX = Ko K