Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef XAP_DRAW_SYMBOL_H
00022 #define XAP_DRAW_SYMBOL_H
00023
00024
00025
00026
00027
00028 #ifndef UT_TYPES_H
00029 #include "ut_types.h"
00030 #endif
00031 #include "ut_misc.h"
00032
00033 #include "xap_Preview.h"
00034
00035 class GR_Font;
00036
00037 class ABI_EXPORT XAP_Draw_Symbol : public XAP_Preview
00038 {
00039 public:
00040
00041 XAP_Draw_Symbol(GR_Graphics * gc);
00042 virtual ~XAP_Draw_Symbol();
00043
00044
00045 void setSelectedFont(const char *font);
00046 void setFontString();
00047 void setFontStringarea();
00048 void setFontToGC(GR_Graphics *p_gc, UT_uint32 MaxWidthAllowable, UT_uint32 MaxHeightAllowable);
00049 void setFontfont(GR_Font * font);
00050 void setWindowSize(UT_uint32 width, UT_uint32 height);
00051 void setAreaSize(UT_uint32 width, UT_uint32 height);
00052 void setAreaGc(GR_Graphics *);
00053 void setRow(UT_uint32 row);
00054
00055 const char* getSelectedFont();
00056 UT_uint32 getSymbolRows ();
00057
00058
00059
00060 void draw(const UT_Rect *clip=NULL);
00061 void drawarea(UT_UCSChar c, UT_UCSChar p);
00062
00063 UT_UCSChar calcSymbol(UT_uint32 x, UT_uint32 y);
00064 UT_UCSChar calcSymbolFromCoords(UT_uint32 x, UT_uint32 y);
00065 void setCurrent(UT_UCSChar c);
00066 UT_UCSChar getCurrent() { return m_CurrentSymbol; }
00067
00068 void onLeftButtonDown(UT_sint32 x, UT_sint32 y);
00069 void calculatePosition(UT_UCSChar c, UT_uint32 &x, UT_uint32 &y);
00070 GR_Graphics * getGraphics(void){return m_areagc;};
00071
00072 protected:
00073 GR_Graphics * m_areagc;
00074 GR_Font * m_pFont;
00075
00076 UT_uint32 m_drawWidth;
00077 UT_uint32 m_drawHeight;
00078 UT_uint32 m_drawareaWidth;
00079 UT_uint32 m_drawareaHeight;
00080 UT_sint32 m_start_base;
00081 UT_sint32 m_start_nb_char;
00082
00083 UT_UCSChar m_CurrentSymbol;
00084 UT_UCSChar m_PreviousSymbol;
00085
00086 private:
00087
00088 UT_NumberVector m_vCharSet;
00089 UT_String m_stFont;
00090 };
00091
00092 #endif
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105