diff options
author | Thomas Lange <tl@openoffice.org> | 2002-05-24 06:33:10 +0000 |
---|---|---|
committer | Thomas Lange <tl@openoffice.org> | 2002-05-24 06:33:10 +0000 |
commit | 042d50d218b01b1a9672004f6b5e5c7467e8e6e0 (patch) | |
tree | 490b471ecc3fe461770e43aef2249f6d199fb100 /starmath | |
parent | 5d96fac945ba394406a9f95d6ebfcbcbb41e329c (diff) |
#98791# Highcontrast bitmaps for accessibility
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/toolbox.hxx | 10 | ||||
-rw-r--r-- | starmath/source/dialog.hrc | 23 | ||||
-rw-r--r-- | starmath/source/smres.src | 711 | ||||
-rw-r--r-- | starmath/source/toolbox.cxx | 51 | ||||
-rw-r--r-- | starmath/source/toolbox.hrc | 91 |
5 files changed, 535 insertions, 351 deletions
diff --git a/starmath/inc/toolbox.hxx b/starmath/inc/toolbox.hxx index 629bd25b99..d7bad33262 100644 --- a/starmath/inc/toolbox.hxx +++ b/starmath/inc/toolbox.hxx @@ -2,9 +2,9 @@ * * $RCSfile: toolbox.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: tl $ $Date: 2002-04-24 13:24:47 $ + * last change: $Author: tl $ $Date: 2002-05-24 07:30:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -78,6 +78,7 @@ #include "config.hxx" #endif +#include "dialog.hrc" #define NUM_TBX_CATEGORIES 9 @@ -88,11 +89,15 @@ protected: ToolBox aToolBoxCat; ToolBox *pToolBoxCmd; ToolBox *vToolBoxCategories[NUM_TBX_CATEGORIES]; + ImageList *aImageLists [NUM_TBX_CATEGORIES + 1]; /* regular */ + ImageList *aImageListsH[NUM_TBX_CATEGORIES + 1]; /* high contrast */ USHORT nActiveCategory; virtual BOOL Close(); virtual void GetFocus(); + void ApplyImageLists(); + DECL_LINK( CategoryClickHdl, ToolBox* ); DECL_LINK( CmdSelectHdl, ToolBox* ); @@ -104,6 +109,7 @@ public: // Window virtual void StateChanged( StateChangedType nStateChange ); + virtual void DataChanged( const DataChangedEvent &rEvt ); void AdjustPosition(const Point &rPoint); void SetCategory(USHORT nCategory); diff --git a/starmath/source/dialog.hrc b/starmath/source/dialog.hrc index 9c465f10c3..0a57655793 100644 --- a/starmath/source/dialog.hrc +++ b/starmath/source/dialog.hrc @@ -2,9 +2,9 @@ * * $RCSfile: dialog.hrc,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: tl $ $Date: 2001-07-17 08:28:20 $ + * last change: $Author: tl $ $Date: 2002-05-24 07:31:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -59,20 +59,27 @@ * ************************************************************************/ +#ifndef _DIALOG_HRC_ +#define _DIALOG_HRC_ + + #define FL_PRINTOPTIONS 10 -#define CB_TITLEROW 11 +#define CB_TITLEROW 11 #define CB_EQUATION_TEXT 12 -#define CB_FRAME 13 +#define CB_FRAME 13 #define FL_PRINT_FORMAT 20 #define RB_ORIGINAL_SIZE 21 #define RB_FIT_TO_PAGE 22 -#define RB_ZOOM 23 -#define MF_ZOOM 24 +#define RB_ZOOM 23 +#define MF_ZOOM 24 #define FL_MISC_OPTIONS 30 #define CB_IGNORE_SPACING 31 -#define FT_FONTS_SUBSET 110 -#define LB_FONTS_SUBSET 111 +#define FT_FONTS_SUBSET 110 +#define LB_FONTS_SUBSET 111 + + +#endif diff --git a/starmath/source/smres.src b/starmath/source/smres.src index ba1b8decfc..0aedb36c4a 100644 --- a/starmath/source/smres.src +++ b/starmath/source/smres.src @@ -2,9 +2,9 @@ * * $RCSfile: smres.src,v $ * - * $Revision: 1.73 $ + * $Revision: 1.74 $ * - * last change: $Author: rt $ $Date: 2002-05-16 14:55:16 $ + * last change: $Author: tl $ $Date: 2002-05-24 07:33:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -66,8 +66,10 @@ #include <svx/globlmn.hrc> #include "starmath.hrc" #include "dialog.hrc" +#include "toolbox.hrc" #define IMAGE_STDBTN_COLOR Color { Red = 0xC000; Green = 0xC000; Blue = 0xC000; } +#define IMAGE_STDBTN_COLOR_HC Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; } #define MN_SUB_TOOLBAR 32 @@ -4580,37 +4582,7 @@ FloatingWindow RID_TOOLBOXWINDOW SVLook = TRUE ; Hide = TRUE ; LineCount = 4 ; - ItemImageList = ImageList - { - ImageBitmap = Bitmap - { - FILE = "un_op.bmp" ; - }; - MaskColor = IMAGE_STDBTN_COLOR ; - IdList = - { - RID_PLUSX ; - RID_MINUSX ; - RID_PLUSMINUSX ; - RID_MINUSPLUSX ; - RID_XPLUSY ; - RID_XCDOTY ; - RID_XTIMESY ; - RID_XSYMTIMESY ; - RID_XMINUSY ; - RID_XOVERY ; - RID_XDIVY ; - RID_XSYMDIVIDEY ; - RID_NEGX ; - RID_XANDY ; - RID_XORY ; - RID_XCIRCY ; - }; - IdCount = - { - 16 ; - }; - }; + ItemList = { ToolBoxItem @@ -5100,42 +5072,6 @@ FloatingWindow RID_TOOLBOXWINDOW SVLook = TRUE ; Hide = TRUE ; LineCount = 5 ; - ItemImageList = ImageList - { - ImageBitmap = Bitmap - { - FILE = "bi_op.bmp" ; - }; - MaskColor = IMAGE_STDBTN_COLOR ; - IdList = - { - RID_XEQY ; - RID_XNEQY ; - RID_XEQUIVY ; - RID_XORTHOY ; - RID_XLTY ; - RID_XGTY ; - RID_XAPPROXY ; - RID_XPARALLELY ; - RID_XLESLANTY ; - RID_XGESLANTY ; - RID_XSIMEQY ; - RID_XPROPY ; - RID_XLEY ; - RID_XGEY ; - RID_XSIMY ; - RID_XTOWARDY ; - RID_XDIVIDESY ; - RID_XNDIVIDESY; - RID_DLARROW ; - RID_DLRARROW ; - RID_DRARROW ; - }; - IdCount = - { - 21 ; - }; - }; ItemList = { ToolBoxItem @@ -5784,43 +5720,6 @@ FloatingWindow RID_TOOLBOXWINDOW SVLook = TRUE ; Hide = TRUE ; LineCount = 5 ; - ItemImageList = ImageList - { - ImageBitmap = Bitmap - { - FILE = "op_er.bmp" ; - }; - MaskColor = IMAGE_STDBTN_COLOR ; - IdList = - { - RID_XINY ; - RID_XNOTINY ; - RID_XOWNSY ; - RID_XINTERSECTIONY ; - RID_XUNIONY ; - RID_XSETMINUSY ; - RID_XSLASHY ; - RID_XSUBSETY ; - RID_XSUBSETEQY ; - RID_XSUPSETY ; - RID_XSUPSETEQY ; - RID_XNSUBSETY ; - RID_XNSUBSETEQY ; - RID_XNSUPSETY ; - RID_XNSUPSETEQY ; - RID_EMPTYSET ; - RID_ALEPH ; - RID_SETN ; - RID_SETZ ; - RID_SETQ ; - RID_SETR ; - RID_SETC ; - }; - IdCount = - { - 22 ; - }; - }; ItemList = { ToolBoxItem @@ -6500,46 +6399,6 @@ FloatingWindow RID_TOOLBOXWINDOW SVLook = TRUE ; Hide = TRUE ; LineCount = 5 ; - ItemImageList = ImageList - { - ImageBitmap = Bitmap - { - FILE = "fu_nc.bmp" ; - }; - MaskColor = IMAGE_STDBTN_COLOR ; - IdList = - { - RID_ABSX ; - RID_FACTX ; - RID_SQRTX ; - RID_NROOTXY ; - RID_EX ; - RID_LNX ; - RID_EXPX ; - RID_LOGX ; - RID_SINX ; - RID_COSX ; - RID_TANX ; - RID_COTX ; - RID_SINHX ; - RID_COSHX ; - RID_TANHX ; - RID_COTHX ; - RID_ARCSINX ; - RID_ARCCOSX ; - RID_ARCTANX ; - RID_ARCCOTX ; - RID_ARSINHX ; - RID_ARCOSHX ; - RID_ARTANHX ; - RID_ARCOTHX ; - RID_RSUPX ; - }; - IdCount = - { - 25 ; - }; - }; ItemList = { ToolBoxItem @@ -7295,34 +7154,6 @@ FloatingWindow RID_TOOLBOXWINDOW SVLook = TRUE ; Hide = TRUE ; LineCount = 3 ; - ItemImageList = ImageList - { - ImageBitmap = Bitmap - { - FILE = "fo_rm.bmp" ; - }; - MaskColor = IMAGE_STDBTN_COLOR ; - IdList = - { - RID_LIMX ; - RID_SUMX ; - RID_PRODX ; - RID_COPRODX ; - RID_INTX ; - RID_IINTX ; - RID_IIINTX ; - RID_LINTX ; - RID_LLINTX ; - RID_LLLINTX ; - RID_FROMXTOY ; - RID_FROMX ; - RID_TOX ; - }; - IdCount = - { - 13 ; - }; - }; ItemList = { ToolBoxItem @@ -7729,44 +7560,6 @@ FloatingWindow RID_TOOLBOXWINDOW SVLook = TRUE ; Hide = TRUE ; LineCount = 5 ; - ItemImageList = ImageList - { - ImageBitmap = Bitmap - { - FILE = "at_tr.bmp" ; - }; - MaskColor = IMAGE_STDBTN_COLOR ; - IdList = - { - RID_ACUTEX ; - RID_GRAVEX ; - RID_CHECKX ; - RID_BREVEX ; - RID_BARX ; - RID_VECX ; - RID_HATX ; - RID_TILDEX ; - RID_CIRCLEX ; - RID_DOTX ; - RID_DDOTX ; - RID_DDDOTX ; - RID_OVERLINEX ; - RID_UNDERLINEX ; - RID_OVERSTRIKEX ; - RID_PHANTOMX ; - RID_BOLDX ; - RID_ITALX ; - RID_SIZEXY ; - RID_FONTXY ; - RID_WIDEHATX ; - RID_WIDETILDEX ; - RID_WIDEVECX ; - }; - IdCount = - { - 23 ; - }; - }; ItemList = { ToolBoxItem @@ -8469,40 +8262,6 @@ FloatingWindow RID_TOOLBOXWINDOW SVLook = TRUE ; Hide = TRUE ; LineCount = 5 ; - ItemImageList = ImageList - { - ImageBitmap = Bitmap - { - FILE = "al_gn.bmp" ; - }; - MaskColor = IMAGE_STDBTN_COLOR ; - IdList = - { - RID_LRPARENTX ; - RID_LRBRACKETX ; - RID_LRANGLEX ; - RID_LRBRACEX ; - RID_LRLINEX ; - RID_LRDLINEX ; - RID_LMRANGLEXY ; - RID_LRGROUPX ; - RID_SLRPARENTX ; - RID_SLRBRACKETX ; - RID_SLRANGLEX ; - RID_SLRBRACEX ; - RID_SLRLINEX ; - RID_SLRDLINEX ; - RID_SLMRANGLEXY ; - RID_LRDBRACKETX ; - RID_SLRDBRACKETX ; - RID_XOVERBRACEY ; - RID_XUNDERBRACEY ; - }; - IdCount = - { - 19 ; - }; - }; ItemList = { ToolBoxItem @@ -9087,36 +8846,6 @@ FloatingWindow RID_TOOLBOXWINDOW SVLook = TRUE ; Hide = TRUE ; LineCount = 3 ; - ItemImageList = ImageList - { - ImageBitmap = Bitmap - { - FILE = "co_lr.bmp" ; - }; - MaskColor = IMAGE_STDBTN_COLOR ; - IdList = - { - RID_NEWLINE ; - RID_SBLANK ; - RID_BLANK ; - RID_BINOMXY ; - RID_STACK ; - RID_MATRIX ; - RID_ALIGNLX ; - RID_ALIGNCX ; - RID_ALIGNRX ; - RID_RSUBX ; - RID_RSUPX ; - RID_LSUBX ; - RID_LSUPX ; - RID_CSUBX ; - RID_CSUPX ; - }; - IdCount = - { - 15 ; - }; - }; ItemList = { ToolBoxItem @@ -9574,40 +9303,6 @@ FloatingWindow RID_TOOLBOXWINDOW SVLook = TRUE ; Hide = TRUE ; LineCount = 4 ; - ItemImageList = ImageList - { - ImageBitmap = Bitmap - { - FILE = "mi_sc.bmp" ; - }; - MaskColor = IMAGE_STDBTN_COLOR ; - IdList = - { - RID_INFINITY ; - RID_PARTIAL ; - RID_NABLA ; - RID_EXISTS ; - RID_FORALL ; - RID_HBAR; - RID_LAMBDABAR ; - RID_RE ; - RID_IM ; - RID_WP ; - RID_LEFTARROW ; - RID_RIGHTARROW ; - RID_UPARROW ; - RID_DOWNARROW ; - RID_DOTSLOW ; - RID_DOTSAXIS ; - RID_DOTSVERT ; - RID_DOTSUP ; - RID_DOTSDOWN ; - }; - IdCount = - { - 19 ; - }; - }; ItemList = { ToolBoxItem @@ -10187,30 +9882,6 @@ FloatingWindow RID_TOOLBOXWINDOW Size = MAP_APPFONT ( 65 , 38 ) ; SVLook = TRUE ; LineCount = 2 ; - ItemImageList = ImageList - { - ImageBitmap = Bitmap - { - FILE = "im_g.bmp" ; // image-list bitmap - }; - MaskColor = IMAGE_STDBTN_COLOR ; - IdList = - { - RID_UNBINOPS_CAT ; - RID_RELATIONS_CAT ; - RID_SETOPERATIONS_CAT ; - RID_FUNCTIONS_CAT ; - RID_OPERATORS_CAT ; - RID_ATTRIBUTES_CAT ; - RID_MISC_CAT ; - RID_BRACKETS_CAT ; - RID_FORMAT_CAT ; - }; - IdCount = - { - 9 ; - }; - }; ItemList = { ToolBoxItem @@ -10506,6 +10177,378 @@ FloatingWindow RID_TOOLBOXWINDOW Text[ catalan ] = "Selección"; Text[ finnish ] = "Valinta"; Text[ thai ] = "เลืà¸à¸"; + +#define UNOP_IDLIST \ + IdList = \ + { \ + RID_PLUSX ; \ + RID_MINUSX ; \ + RID_PLUSMINUSX ; \ + RID_MINUSPLUSX ; \ + RID_XPLUSY ; \ + RID_XCDOTY ; \ + RID_XTIMESY ; \ + RID_XSYMTIMESY ; \ + RID_XMINUSY ; \ + RID_XOVERY ; \ + RID_XDIVY ; \ + RID_XSYMDIVIDEY ; \ + RID_NEGX ; \ + RID_XANDY ; \ + RID_XORY ; \ + RID_XCIRCY ; \ + }; \ + IdCount = { 16 ; }; + + ImageList IL_UNOP + { + ImageBitmap = Bitmap { File = "un_op.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR ; + UNOP_IDLIST + }; + ImageList ILH_UNOP + { + ImageBitmap = Bitmap { File = "unh_op.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + UNOP_IDLIST + }; + +#define BIOP_IDLIST \ + IdList = \ + { \ + RID_XEQY ; \ + RID_XNEQY ; \ + RID_XEQUIVY ; \ + RID_XORTHOY ; \ + RID_XLTY ; \ + RID_XGTY ; \ + RID_XAPPROXY ; \ + RID_XPARALLELY ; \ + RID_XLESLANTY ; \ + RID_XGESLANTY ; \ + RID_XSIMEQY ; \ + RID_XPROPY ; \ + RID_XLEY ; \ + RID_XGEY ; \ + RID_XSIMY ; \ + RID_XTOWARDY ; \ + RID_XDIVIDESY ; \ + RID_XNDIVIDESY; \ + RID_DLARROW ; \ + RID_DLRARROW ; \ + RID_DRARROW ; \ + }; \ + IdCount ={ 21 ; }; + + ImageList IL_BIOP + { + ImageBitmap = Bitmap { File = "bi_op.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR ; + BIOP_IDLIST + }; + ImageList ILH_BIOP + { + ImageBitmap = Bitmap { File = "bih_op.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + BIOP_IDLIST + }; + +#define OPER_IDLIST \ + IdList = \ + { \ + RID_XINY ; \ + RID_XNOTINY ; \ + RID_XOWNSY ; \ + RID_XINTERSECTIONY ; \ + RID_XUNIONY ; \ + RID_XSETMINUSY ; \ + RID_XSLASHY ; \ + RID_XSUBSETY ; \ + RID_XSUBSETEQY ; \ + RID_XSUPSETY ; \ + RID_XSUPSETEQY ; \ + RID_XNSUBSETY ; \ + RID_XNSUBSETEQY ; \ + RID_XNSUPSETY ; \ + RID_XNSUPSETEQY ; \ + RID_EMPTYSET ; \ + RID_ALEPH ; \ + RID_SETN ; \ + RID_SETZ ; \ + RID_SETQ ; \ + RID_SETR ; \ + RID_SETC ; \ + }; \ + IdCount = { 22 ; }; + + ImageList IL_OPER + { + ImageBitmap = Bitmap { File = "op_er.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR ; + OPER_IDLIST + }; + ImageList ILH_OPER + { + ImageBitmap = Bitmap { File = "oph_er.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + OPER_IDLIST + }; + +#define FUNC_IDLIST \ + IdList = \ + { \ + RID_ABSX ; \ + RID_FACTX ; \ + RID_SQRTX ; \ + RID_NROOTXY ; \ + RID_EX ; \ + RID_LNX ; \ + RID_EXPX ; \ + RID_LOGX ; \ + RID_SINX ; \ + RID_COSX ; \ + RID_TANX ; \ + RID_COTX ; \ + RID_SINHX ; \ + RID_COSHX ; \ + RID_TANHX ; \ + RID_COTHX ; \ + RID_ARCSINX ; \ + RID_ARCCOSX ; \ + RID_ARCTANX ; \ + RID_ARCCOTX ; \ + RID_ARSINHX ; \ + RID_ARCOSHX ; \ + RID_ARTANHX ; \ + RID_ARCOTHX ; \ + RID_RSUPX ; \ + }; \ + IdCount = { 25 ; }; + + ImageList IL_FUNC + { + ImageBitmap = Bitmap { File = "fu_nc.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR ; + FUNC_IDLIST + }; + ImageList ILH_FUNC + { + ImageBitmap = Bitmap { File = "fuh_nc.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + FUNC_IDLIST + }; + +#define FORM_IDLIST \ + IdList = \ + { \ + RID_LIMX ; \ + RID_SUMX ; \ + RID_PRODX ; \ + RID_COPRODX ; \ + RID_INTX ; \ + RID_IINTX ; \ + RID_IIINTX ; \ + RID_LINTX ; \ + RID_LLINTX ; \ + RID_LLLINTX ; \ + RID_FROMXTOY ; \ + RID_FROMX ; \ + RID_TOX ; \ + }; \ + IdCount = { 13 ; }; + + ImageList IL_FORM + { + ImageBitmap = Bitmap { File = "fo_rm.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR ; + FORM_IDLIST + }; + ImageList ILH_FORM + { + ImageBitmap = Bitmap { File = "foh_rm.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + FORM_IDLIST + }; + +#define ATTR_IDLIST \ + IdList = \ + { \ + RID_ACUTEX ; \ + RID_GRAVEX ; \ + RID_CHECKX ; \ + RID_BREVEX ; \ + RID_BARX ; \ + RID_VECX ; \ + RID_HATX ; \ + RID_TILDEX ; \ + RID_CIRCLEX ; \ + RID_DOTX ; \ + RID_DDOTX ; \ + RID_DDDOTX ; \ + RID_OVERLINEX ; \ + RID_UNDERLINEX ; \ + RID_OVERSTRIKEX ; \ + RID_PHANTOMX ; \ + RID_BOLDX ; \ + RID_ITALX ; \ + RID_SIZEXY ; \ + RID_FONTXY ; \ + RID_WIDEHATX ; \ + RID_WIDETILDEX ; \ + RID_WIDEVECX ; \ + }; \ + IdCount = { 23 ; }; + + ImageList IL_ATTR + { + ImageBitmap = Bitmap { File = "at_tr.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR ; + ATTR_IDLIST + }; + ImageList ILH_ATTR + { + ImageBitmap = Bitmap { File = "ath_tr.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + ATTR_IDLIST + }; + +#define ALGN_IDLIST \ + IdList = \ + { \ + RID_LRPARENTX ; \ + RID_LRBRACKETX ; \ + RID_LRANGLEX ; \ + RID_LRBRACEX ; \ + RID_LRLINEX ; \ + RID_LRDLINEX ; \ + RID_LMRANGLEXY ; \ + RID_LRGROUPX ; \ + RID_SLRPARENTX ; \ + RID_SLRBRACKETX ; \ + RID_SLRANGLEX ; \ + RID_SLRBRACEX ; \ + RID_SLRLINEX ; \ + RID_SLRDLINEX ; \ + RID_SLMRANGLEXY ; \ + RID_LRDBRACKETX ; \ + RID_SLRDBRACKETX ; \ + RID_XOVERBRACEY ; \ + RID_XUNDERBRACEY ; \ + }; \ + IdCount = { 19 ; }; + + ImageList IL_ALGN + { + ImageBitmap = Bitmap { File = "al_gn.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR ; + ALGN_IDLIST + }; + ImageList ILH_ALGN + { + ImageBitmap = Bitmap { File = "alh_gn.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + ALGN_IDLIST + }; + +#define COLR_IDLIST \ + IdList = \ + { \ + RID_NEWLINE ; \ + RID_SBLANK ; \ + RID_BLANK ; \ + RID_BINOMXY ; \ + RID_STACK ; \ + RID_MATRIX ; \ + RID_ALIGNLX ; \ + RID_ALIGNCX ; \ + RID_ALIGNRX ; \ + RID_RSUBX ; \ + RID_RSUPX ; \ + RID_LSUBX ; \ + RID_LSUPX ; \ + RID_CSUBX ; \ + RID_CSUPX ; \ + }; \ + IdCount = { 15 ; }; + + ImageList IL_COLR + { + ImageBitmap = Bitmap { File = "co_lr.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR ; + COLR_IDLIST + }; + ImageList ILH_COLR + { + ImageBitmap = Bitmap { File = "coh_lr.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + COLR_IDLIST + }; + +#define MISC_IDLIST \ + IdList = \ + { \ + RID_INFINITY ; \ + RID_PARTIAL ; \ + RID_NABLA ; \ + RID_EXISTS ; \ + RID_FORALL ; \ + RID_HBAR; \ + RID_LAMBDABAR ; \ + RID_RE ; \ + RID_IM ; \ + RID_WP ; \ + RID_LEFTARROW ; \ + RID_RIGHTARROW ; \ + RID_UPARROW ; \ + RID_DOWNARROW ; \ + RID_DOTSLOW ; \ + RID_DOTSAXIS ; \ + RID_DOTSVERT ; \ + RID_DOTSUP ; \ + RID_DOTSDOWN ; \ + }; \ + IdCount = { 19 ; }; + + ImageList IL_MISC + { + ImageBitmap = Bitmap { File = "mi_sc.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR ; + MISC_IDLIST + }; + ImageList ILH_MISC + { + ImageBitmap = Bitmap { File = "mih_sc.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + MISC_IDLIST + }; + +#define IMG_IDLIST \ + IdList = \ + { \ + RID_UNBINOPS_CAT ; \ + RID_RELATIONS_CAT ; \ + RID_SETOPERATIONS_CAT ; \ + RID_FUNCTIONS_CAT ; \ + RID_OPERATORS_CAT ; \ + RID_ATTRIBUTES_CAT ; \ + RID_MISC_CAT ; \ + RID_BRACKETS_CAT ; \ + RID_FORMAT_CAT ; \ + }; \ + IdCount = { 9 ; }; + + ImageList IL_IMG + { + ImageBitmap = Bitmap { File = "im_g.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR ; + IMG_IDLIST + }; + ImageList ILH_IMG + { + ImageBitmap = Bitmap { File = "imh_g.bmp" ; }; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + IMG_IDLIST + }; }; diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx index 130538bc68..5222168e67 100644 --- a/starmath/source/toolbox.cxx +++ b/starmath/source/toolbox.cxx @@ -2,9 +2,9 @@ * * $RCSfile: toolbox.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: tl $ $Date: 2002-04-24 13:24:37 $ + * last change: $Author: tl $ $Date: 2002-05-24 07:32:37 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -76,6 +76,9 @@ #ifndef _SFXIMGMGR_HXX //autogen #include <sfx2/imgmgr.hxx> #endif +#ifndef _SV_WRKWIN_HXX //autogen +#include <vcl/wrkwin.hxx> +#endif #ifndef TOOLBOX_HXX #include "toolbox.hxx" @@ -83,10 +86,10 @@ #ifndef _STARMATH_HRC #include "starmath.hrc" #endif -#include "view.hxx" -#ifndef _SV_WRKWIN_HXX //autogen -#include <vcl/wrkwin.hxx> +#ifndef _TOOLBOX_HRC_ +#include "toolbox.hrc" #endif +#include "view.hxx" @@ -106,7 +109,8 @@ SmToolBoxWindow::SmToolBoxWindow(SfxBindings *pBindings, aToolBoxCat.SetClickHdl(LINK(this, SmToolBoxWindow, CategoryClickHdl)); pImgMan->RegisterToolBox( &aToolBoxCat ); - for (int i = 0; i < NUM_TBX_CATEGORIES; i++) + int i; + for (i = 0; i < NUM_TBX_CATEGORIES; i++) { ToolBox *pBox = new ToolBox(this, ResId (i+1)); pImgMan->RegisterToolBox( pBox ); @@ -115,7 +119,18 @@ SmToolBoxWindow::SmToolBoxWindow(SfxBindings *pBindings, } pToolBoxCmd = vToolBoxCategories [0]; + // get ImageList + for (i = 0; i < NUM_TBX_CATEGORIES; i++) + { + aImageLists [i] = new ImageList( SmResId(IL_UNOP + 2*i) ); + aImageListsH[i] = new ImageList( SmResId(ILH_UNOP + 2*i) ); + } + aImageLists [NUM_TBX_CATEGORIES] = new ImageList( SmResId(IL_IMG) ); + aImageListsH[NUM_TBX_CATEGORIES] = new ImageList( SmResId(ILH_IMG) ); + FreeResource(); + + ApplyImageLists(); } SmToolBoxWindow::~SmToolBoxWindow() @@ -123,14 +138,36 @@ SmToolBoxWindow::~SmToolBoxWindow() SfxImageManager *pImgMan = GetBindings().GetImageManager(); pImgMan->ReleaseToolBox( &aToolBoxCat ); - for (int i = 0; i < NUM_TBX_CATEGORIES; i++) + int i; + for (i = 0; i < NUM_TBX_CATEGORIES; i++) { ToolBox *pBox = vToolBoxCategories[i]; pImgMan->ReleaseToolBox( pBox ); delete pBox; } + for (i = 0; i < NUM_TBX_CATEGORIES + 1; ++i) + { + delete aImageLists[i]; + delete aImageListsH[i]; + } +} + +void SmToolBoxWindow::ApplyImageLists() +{ + BOOL bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + ImageList ** const &rImgList = bHighContrast ? aImageListsH : aImageLists; + for (int i = 0; i < NUM_TBX_CATEGORIES; ++i) + vToolBoxCategories[i]->SetImageList( *rImgList[i] ); + aToolBoxCat.SetImageList( *rImgList[NUM_TBX_CATEGORIES] ); } +void SmToolBoxWindow::DataChanged( const DataChangedEvent &rEvt ) +{ + if ( (rEvt.GetType() == DATACHANGED_SETTINGS) && (rEvt.GetFlags() & SETTINGS_STYLE) ) + ApplyImageLists(); + + SfxFloatingWindow::DataChanged( rEvt ); +} void SmToolBoxWindow::StateChanged( StateChangedType nStateChange ) { diff --git a/starmath/source/toolbox.hrc b/starmath/source/toolbox.hrc new file mode 100644 index 0000000000..9ca8762a5b --- /dev/null +++ b/starmath/source/toolbox.hrc @@ -0,0 +1,91 @@ +/************************************************************************* + * + * $RCSfile: toolbox.hrc,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: tl $ $Date: 2002-05-24 07:27:55 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef _TOOLBOX_HRC_ +#define _TOOLBOX_HRC_ + + +// defines for ImageList's +//! order and numbering is important +#define IL_UNOP 1 +#define ILH_UNOP 2 +#define IL_BIOP 3 +#define ILH_BIOP 4 +#define IL_OPER 5 +#define ILH_OPER 6 +#define IL_FUNC 7 +#define ILH_FUNC 8 +#define IL_FORM 9 +#define ILH_FORM 10 +#define IL_ATTR 11 +#define ILH_ATTR 12 +#define IL_ALGN 13 +#define ILH_ALGN 14 +#define IL_COLR 15 +#define ILH_COLR 16 +#define IL_MISC 17 +#define ILH_MISC 18 +#define IL_IMG 19 +#define ILH_IMG 20 + + +#endif + |