Difference between revisions of "User:Ericb/Sallayout.hxx"
B michaelsen (talk | contribs) m (moved Sallayout.hxx to User:Ericb/Sallayout.hxx) |
|||
(23 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | ==Content description : classes , structures, etc ...== | |
+ | |||
+ | Several classes are pure virtual classes, and will be linked with architecture part (libvclplug_aqua on native port ) | ||
+ | |||
+ | Classes defined | ||
+ | |||
+ | - SalLayout | ||
+ | It contains the results of a text layout | ||
+ | All text implementations inherit from this class, it is very essential | ||
+ | SalLayout methods: '''InitFonts( )''', '''LayoutText( )''', AdjustLayout( ),'''FillDXArray( )''' DrawBase() , DrawOffset( ), DrawText( ),GetTextBreak( ), | ||
+ | GetNextGlyph( ), GetOutLine( ), GetBoundREct( ), IsSpacingGlyph( ), GetCaretPosition( ), GetDrawPosition( ), GetUnitPerPixels( ), | ||
+ | GetOrientation( ), GetDrawPosition( ) | ||
+ | |||
+ | - ImplLayoutArgs | ||
+ | All the required input to layout a text | ||
+ | ImplLayoutArgs : various '''public''' methods around parameters to provide "Run" methods [FIXME] : not completely sure, needs verification | ||
+ | SetLayoutWidth( ), SetDXArray( ), SetOrientation( ), ResetPos( ), GetNextPos( ), GetNextRun(), NeedFallback( ) | ||
+ | ( three definitions, with two overloaded), PrepareFallback( ) [FIXME] : define fallback properly | ||
+ | Protected : AddRun( ) | ||
+ | Helper functions often used with ImplLayoutArgs : GetVerticalFlags( ), GetVerticalChar( ), GetMirroredChar( ), GetLocalizedChar( ) | ||
+ | |||
+ | - ImplLayoutRuns | ||
+ | Used for managing text runs (e.g. for BiDi, glyph and script fallback) | ||
+ | Consists bascically of indices into the string, which are ordered left to right | ||
+ | ImplLayoutRuns methods: various methods around actions in progress | ||
+ | Clear( ), AddPos( ), AddRun( ), IsEmpty( ), ResetPos( ), NextRun( ), GetRun( ), GetNextPos( ), PosIsInRun( ) | ||
+ | |||
+ | - Generic SalLayout | ||
+ | a container for the results of a layout engine | ||
+ | used when no specialized container for the layout result is available | ||
+ | (e.g. java's TextLayout object or carbon's ATSU layout are specialized) | ||
+ | |||
+ | - MultiSalLyout | ||
+ | a container for multiple SalLayouts which is used for [[Font-FAQ#Glyph_Fallback|glyph fallback]], | ||
+ | it allows mixing of layouts for different fonts and font technologies. | ||
+ | |||
+ | Corresponding implementation : sallayout.cxx | ||
+ | |||
+ | Includes from STLport : list, vector | ||
+ | |||
+ | Other includes : tools.h , dllapi.h | ||
+ | |||
+ | [[Class SalGraphics]] | ||
+ | |||
+ | [[Class ImplFonData]] | ||
+ | |||
+ | [[Class B2DBPolyPolygon]] | ||
+ | |||
+ | [[Layout options (completed)]] | ||
+ | |||
+ | [[Class ImplLayoutRuns]] | ||
+ | |||
+ | [[class ImplLayoutArgs]] | ||
+ | |||
+ | [[Glyphs flags]] | ||
+ | |||
+ | [[class SalLayout]] | ||
+ | |||
+ | [[class MultiSalLayout : inherits of SalLayout ]] | ||
+ | |||
+ | [[Structure GlyphItem]] | ||
+ | |||
+ | [[class GenericSalLayout : inherits of SalLayout ]] | ||
+ | |||
+ | [[Helper functions (used with ImplLayoutArgs]] | ||
+ | |||
+ | [[typedefs]] | ||
+ | |||
+ | == Sources using this header in vcl== | ||
+ | |||
+ | One main file for font services in OpenOffice.org, this header is mainly used in vcl : | ||
+ | |||
+ | |||
+ | ./salatslayout.cxx:#include <sallayout.hxx> | ||
+ | |||
+ | ./source/gdi/outdev.cxx:#include <sallayout.hxx> | ||
+ | |||
+ | ./source/gdi/outdev2.cxx:#include <sallayout.hxx> | ||
+ | |||
+ | ./source/gdi/outdev3.cxx:#include <sallayout.hxx> | ||
+ | |||
+ | ./source/gdi/pdfwriter_impl.cxx:#include <sallayout.hxx> | ||
+ | |||
+ | ./source/gdi/print2.cxx:#include <sallayout.hxx> | ||
+ | |||
+ | ./source/gdi/salgdilayout.cxx:#include <sallayout.hxx> | ||
+ | |||
+ | ./source/gdi/sallayout.cxx:#include <sallayout.hxx> | ||
+ | |||
+ | ./source/glyphs/gcach_layout.cxx:#include <sallayout.hxx> | ||
+ | |||
+ | ./unx/inc/pspgraphics.h:#include <sallayout.hxx> | ||
+ | |||
+ | ./unx/inc/xfont.hxx:#include <sallayout.hxx> | ||
+ | |||
+ | ./unx/source/window/salframe.cxx:#include <sallayout.hxx> | ||
+ | |||
+ | ./win/inc/salgdi.h:#include <sallayout.hxx> | ||
+ | |||
+ | |||
+ | Windows specific : | ||
+ | |||
+ | ./win/source/gdi/salgdi3.cxx:#include <sallayout.hxx> | ||
+ | |||
+ | ./win/source/gdi/winlayout.cxx:#include <sallayout.hxx> | ||
+ | |||
+ | ./win/source/window/salframe.cxx:#include <sallayout.hxx> | ||
+ | |||
+ | ./source/window/window.cxx:#include <sallayout.hxx> | ||
+ | |||
Several approaches are necessary : | Several approaches are necessary : | ||
− | + | '''To be implemented''' | |
− | + | -> same implementation in vcl/aqua directories |
Latest revision as of 11:26, 25 March 2010
Content description : classes , structures, etc ...
Several classes are pure virtual classes, and will be linked with architecture part (libvclplug_aqua on native port )
Classes defined
- SalLayout It contains the results of a text layout All text implementations inherit from this class, it is very essential SalLayout methods: InitFonts( ), LayoutText( ), AdjustLayout( ),FillDXArray( ) DrawBase() , DrawOffset( ), DrawText( ),GetTextBreak( ), GetNextGlyph( ), GetOutLine( ), GetBoundREct( ), IsSpacingGlyph( ), GetCaretPosition( ), GetDrawPosition( ), GetUnitPerPixels( ), GetOrientation( ), GetDrawPosition( )
- ImplLayoutArgs All the required input to layout a text ImplLayoutArgs : various public methods around parameters to provide "Run" methods [FIXME] : not completely sure, needs verification SetLayoutWidth( ), SetDXArray( ), SetOrientation( ), ResetPos( ), GetNextPos( ), GetNextRun(), NeedFallback( ) ( three definitions, with two overloaded), PrepareFallback( ) [FIXME] : define fallback properly Protected : AddRun( ) Helper functions often used with ImplLayoutArgs : GetVerticalFlags( ), GetVerticalChar( ), GetMirroredChar( ), GetLocalizedChar( )
- ImplLayoutRuns Used for managing text runs (e.g. for BiDi, glyph and script fallback) Consists bascically of indices into the string, which are ordered left to right ImplLayoutRuns methods: various methods around actions in progress Clear( ), AddPos( ), AddRun( ), IsEmpty( ), ResetPos( ), NextRun( ), GetRun( ), GetNextPos( ), PosIsInRun( )
- Generic SalLayout a container for the results of a layout engine used when no specialized container for the layout result is available (e.g. java's TextLayout object or carbon's ATSU layout are specialized)
- MultiSalLyout a container for multiple SalLayouts which is used for glyph fallback, it allows mixing of layouts for different fonts and font technologies.
Corresponding implementation : sallayout.cxx
Includes from STLport : list, vector
Other includes : tools.h , dllapi.h
class MultiSalLayout : inherits of SalLayout
class GenericSalLayout : inherits of SalLayout
Helper functions (used with ImplLayoutArgs
Sources using this header in vcl
One main file for font services in OpenOffice.org, this header is mainly used in vcl :
./salatslayout.cxx:#include <sallayout.hxx>
./source/gdi/outdev.cxx:#include <sallayout.hxx>
./source/gdi/outdev2.cxx:#include <sallayout.hxx>
./source/gdi/outdev3.cxx:#include <sallayout.hxx>
./source/gdi/pdfwriter_impl.cxx:#include <sallayout.hxx>
./source/gdi/print2.cxx:#include <sallayout.hxx>
./source/gdi/salgdilayout.cxx:#include <sallayout.hxx>
./source/gdi/sallayout.cxx:#include <sallayout.hxx>
./source/glyphs/gcach_layout.cxx:#include <sallayout.hxx>
./unx/inc/pspgraphics.h:#include <sallayout.hxx>
./unx/inc/xfont.hxx:#include <sallayout.hxx>
./unx/source/window/salframe.cxx:#include <sallayout.hxx>
./win/inc/salgdi.h:#include <sallayout.hxx>
Windows specific :
./win/source/gdi/salgdi3.cxx:#include <sallayout.hxx>
./win/source/gdi/winlayout.cxx:#include <sallayout.hxx>
./win/source/window/salframe.cxx:#include <sallayout.hxx>
./source/window/window.cxx:#include <sallayout.hxx>
Several approaches are necessary :
To be implemented
-> same implementation in vcl/aqua directories