Editing Liqbase library overview

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
-
{{out of date}}
+
=liqbase :: the core library=
-
 
+
-
==liqbase :: the core library==
+
'''Note, this document describes a library which is not currently available, however its precursor [[liqbase]] is available for download:'''
'''Note, this document describes a library which is not currently available, however its precursor [[liqbase]] is available for download:'''
Line 10: Line 8:
it will be expanded upon over the coming days.
it will be expanded upon over the coming days.
-
===Rationale===
+
==Rational==
liqbase was born of frustration.
liqbase was born of frustration.
Line 27: Line 25:
At present it is very specifically focused upon the Nokia internet tablet computers though it is compilable and usable within x86 linux as well.
At present it is very specifically focused upon the Nokia internet tablet computers though it is compilable and usable within x86 linux as well.
-
===Why not GTK+ or Qt?===
+
==Why not GTK+ or Qt?==
I looked carefully at GTK+ when I first got my tablet and would have been happy it if it had the required performance, it has (semi) sane construction methods and an expansive library of controls and utility functions.
I looked carefully at GTK+ when I first got my tablet and would have been happy it if it had the required performance, it has (semi) sane construction methods and an expansive library of controls and utility functions.
Line 35: Line 33:
I wanted to do things which I took for granted on my old PDA and have done for years in Visual Basic and found the existing toolkits lacking.
I wanted to do things which I took for granted on my old PDA and have done for years in Visual Basic and found the existing toolkits lacking.
-
===Dependencies===
+
==Dependencies==
liqbase makes use of the following libraries:  
liqbase makes use of the following libraries:  
Line 49: Line 47:
*sqlite3 for the database manipulation
*sqlite3 for the database manipulation
-
graphics are rendered using the XV library using the YUV video format. This is a lower bandwidth video mode which has full resolution Luma, but half resolution Chroma.
+
graphics are rendered using the XV library using the YUV video format.
 +
This is a lower bandwidth video mode which has full resolution Luma, but half resolution Chroma.
-
===Base Classes===
+
 
 +
==Base Classes==
It is being constructed around a core set of interrelated classes
It is being constructed around a core set of interrelated classes
Line 61: Line 61:
*liqsketch a dynamic sketch built up from various strokes and points
*liqsketch a dynamic sketch built up from various strokes and points
*liqcliprect a physical rectangle within an image with direct drawing routines
*liqcliprect a physical rectangle within an image with direct drawing routines
 +
Beyond the core there is a second layer of classes dealing with structured layout and rendering
Beyond the core there is a second layer of classes dealing with structured layout and rendering
Line 66: Line 67:
*liqcell a single unit capable of holding or representing physical or meta data
*liqcell a single unit capable of holding or representing physical or meta data
*liqgraph a special resolution independent graphics interface which a cell uses
*liqgraph a special resolution independent graphics interface which a cell uses
 +
With these classes I will be able to construct the applications started inside liqbase.
With these classes I will be able to construct the applications started inside liqbase.
 +
The classes outlined here existed in some form or other in the old liqbase and I have not yet documented the descendants of the cell class which sit together to form the UI itself.  
The classes outlined here existed in some form or other in the old liqbase and I have not yet documented the descendants of the cell class which sit together to form the UI itself.  
   
   
-
===system class structure===
+
==system class structure==
The system classes created in liqbase follow the same object pattern and contain the following default standard methods:
The system classes created in liqbase follow the same object pattern and contain the following default standard methods:
Line 103: Line 106:
There is no concept of inheritance at this level, however once you have instances of cell classes (described in detail below) they follow generic inheritance rules and can expand.
There is no concept of inheritance at this level, however once you have instances of cell classes (described in detail below) they follow generic inheritance rules and can expand.
-
===Example cell lifespan===
+
 +
==Example cell lifespan==
A usual cycle goes something like this
A usual cycle goes something like this
Line 129: Line 133:
</source>
</source>
-
===Cell inheritance===
+
==Cell inheritance==
The cell class provides a basic unit which everything is built up from. When used in a visual context, it represents a rectangular area on the screen. A cell can also be used as a simple  property holding information intended for its parent. Each cell can hold references to a font, an image and a sketch or even another cell. It can be inherited from other cells which expand its utility and purpose.
The cell class provides a basic unit which everything is built up from. When used in a visual context, it represents a rectangular area on the screen. A cell can also be used as a simple  property holding information intended for its parent. Each cell can hold references to a font, an image and a sketch or even another cell. It can be inherited from other cells which expand its utility and purpose.
-
===Dynamic scaling===
+
==Dynamic scaling==
liqbase is designed to operate in a truly resolution independent manner, after designing a widget according to specifications, it does not matter whether it is run on a lower or higher resolution display as the content will render correctly.
liqbase is designed to operate in a truly resolution independent manner, after designing a widget according to specifications, it does not matter whether it is run on a lower or higher resolution display as the content will render correctly.
Line 139: Line 143:
I have taken special care ensuring the font class operates as expected within a dynamic resolution independent environment. At design time, the operator configures a form to certain dimensions (at 225dpi) and configures font sizes and positions relative to this. The fonts make use of extensive dynamic caching to both improve loading speed and to ensure that the correct glyph is displayed at the correct size as required.  The slight drawback with this approach is that at different scales there is some very slight variation in the exact final font size due to integer only glyph widths.
I have taken special care ensuring the font class operates as expected within a dynamic resolution independent environment. At design time, the operator configures a form to certain dimensions (at 225dpi) and configures font sizes and positions relative to this. The fonts make use of extensive dynamic caching to both improve loading speed and to ensure that the correct glyph is displayed at the correct size as required.  The slight drawback with this approach is that at different scales there is some very slight variation in the exact final font size due to integer only glyph widths.
-
At runtime, the entire screen is situated within the available boundary and rendered accordingly. A landscape layout will run correctly in portrait mode, however it will be displayed at a reduced size to maintain its aspect ratio.
+
At runtime, the entire screen is situated within the available boundary and rendered accordingly.
 +
A landscape layout will run correctly in portrait mode, however it will be displayed at a reduced size to maintain its aspect ratio.
 +
 
-
===Event handlers===
+
==Event handlers==
You can assign event handlers to any cell in liqbase and have a routine called when the event is required.
You can assign event handlers to any cell in liqbase and have a routine called when the event is required.
New events can be dynamically created and utilized as required.
New events can be dynamically created and utilized as required.
-
====Linking handler to cell====
+
===Linking handler to cell===
<source lang="c">
<source lang="c">
Line 152: Line 158:
</source>
</source>
-
====Handler Code====
+
===Handler Code===
<source lang="c">
<source lang="c">
Line 163: Line 169:
</source>
</source>
-
====Using a handler====
+
===Using a handler===
<source lang="c">
<source lang="c">

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)

Templates used on this page: