news download themes documentation links










FbTk Namespace Reference

holds EventHandler interface for X events More...


Classes

class  App
 Main class for applications, every application must create an instance of this class. More...

class  Button
class  ChangeProperty
 helper class for some STL routines More...

class  Color
 Allocates rgb color and pixel value. More...

class  Command
 Interface class for commands. More...

class  Compose_base
class  Directory
 Wrapper class for DIR * routines. More...

class  FbDrawable
 Basic drawing functions for X drawables. More...

class  EventHandler
 interface for X events More...

class  EventManager
class  Font
class  FontImp
class  GContext
 wrapper for X GC More...

class  Image
 loads images More...

class  ImageBase
 common interface for all image classes More...

class  ImageControl
 Holds screen info, color tables and caches textures. More...

struct  ImageControl::Cache
 sqrt lookup table More...

struct  ImageControl::ltCacheEntry
class  ImageXPM
class  KeyUtil
class  Layer
class  LayerItem
 pure interface class, an item in layer More...

class  MacroCommand
 executes a list of commands More...

class  Menu
 Base class for menus. More...

struct  Menu::_menu
class  MenuItem
 An interface for a menu item in Menu. More...

class  MenuTheme
class  MultiButtonMenuItem
 Handles commands for the specified numbers of buttons. More...

class  MultLayers
class  NotCopyable
class  Observer
class  FbPixmap
 a wrapper for X Pixmap More...

class  PixmapWithMask
class  RefCount
 holds a pointer with reference counting, similar to std:auto_ptr More...

class  Resource
 Real resource class. More...

class  Resource_base
 Base class for resources, this is only used in ResourceManager. More...

class  ResourceManager
class  SignalEventHandler
class  SignalHandler
 Handles system signals, singleton. More...

class  SimpleCommand
 a simple command More...

class  Subject
class  TextBox
class  TextButton
 Displays a text on a button. More...

class  Texture
class  TextureRender
 Renders texture to pixmap. More...

class  Theme
 Hold ThemeItems. Use this to create a Theme set. More...

class  ThemeItem
class  ThemeItem_base
 Base class for ThemeItem, holds name and altname. More...

class  ThemeManager
 Singleton theme manager. More...

class  Timer
class  Transparent
 renders to drawable together with an alpha mask More...

class  FbWindow
 Wrapper for X window. More...

class  XFontImp
 regular X font implementation for FbTk More...

struct  XFontImp::BitmapStruct
struct  XFontImp::XRotCharStruct
struct  XFontImp::XRotFontStruct
class  XftFontImp
 Handles Xft font drawing. More...

class  XLayer
class  XLayerItem
class  XmbFontImp
 multibyte font implementation for FbTk More...

class  XrmDatabaseHelper

Enumerations

enum  Justify { LEFT, RIGHT, CENTER }

Functions

template<typename A, typename B> Compose_base< A, B > Compose (const A &a, const B &b)
bool operator== (Window win, const FbWindow &fbwin)
template<> void ThemeItem< MenuTheme::BulletType >::setDefaultValue ()
template<> void ThemeItem< MenuTheme::BulletType >::setFromString (const char *str)
template<> void ThemeItem< MenuTheme::BulletType >::load ()
int doAlignment (int max_width, int bevel, FbTk::Justify justify, const FbTk::Font &font, const char *const text, unsigned int textlen, unsigned int &newlen)
template<> void ThemeItem< FbTk::Justify >::setDefaultValue ()
 specialization for Justify

template<> void ThemeItem< FbTk::Justify >::setFromString (const char *value)
template<> void ThemeItem< FbTk::Justify >::load ()
template<> void ThemeItem< FbTk::Font >::setDefaultValue ()
template<> void ThemeItem< FbTk::Font >::setFromString (const char *str)
template<> void ThemeItem< FbTk::Font >::load ()
template<> void ThemeItem< FbTk::Texture >::load ()
template<> void ThemeItem< FbTk::Texture >::setDefaultValue ()
template<> void ThemeItem< FbTk::Texture >::setFromString (const char *str)
template<> void ThemeItem< FbTk::Color >::setDefaultValue ()
template<> void ThemeItem< FbTk::Color >::setFromString (const char *str)
template<> void ThemeItem< FbTk::Color >::load ()


Detailed Description

holds EventHandler interface for X events

This is a helper for XrmDatabase when database goes out of scope the XrmDatabase variable will be destroyed.


Function Documentation

int FbTk::doAlignment int  max_width,
int  bevel,
FbTk::Justify  justify,
const FbTk::Font font,
const char *const   text,
unsigned int  textlen,
unsigned int &  newlen
 

Aligns the text after max width and bevel

Definition at line 33 of file Text.cc.

References FbTk::Font::textWidth().

00035                                                             {
00036 
00037     if (text == 0 || textlen == 0)
00038         return 0;
00039 
00040     int l = font.textWidth(text, textlen) + bevel;
00041     size_t dlen = textlen;
00042     int dx = bevel;
00043     if (l > max_width) {
00044         for (; dlen > 0; dlen--) {
00045             l = font.textWidth(text, dlen) + bevel;
00046             if (l<=max_width)
00047                 break;
00048         }
00049     }
00050 
00051     newlen = dlen;
00052 
00053     switch (justify) {
00054     case FbTk::RIGHT:
00055         dx = max_width - l - bevel;
00056     break;
00057     case FbTk::CENTER:
00058         dx = (max_width - l)/2;
00059     break;
00060     case FbTk::LEFT:
00061     break;
00062     }
00063     
00064     return dx;
00065 }

Fluxbox CVS-Jan-2003




      



Got comments about the page? Send them to webmaster.
If you have general Fluxbox related questions ask them on our irc channel or mailing lists.

Show Source








Designed by aLEczapKA