Kaydet (Commit) 260810f6 authored tarafından Thomas Lange's avatar Thomas Lange

#98792# HC bitmaps for accessibility

üst 8a44fa70
......@@ -2,9 +2,9 @@
*
* $RCSfile: dialog.hxx,v $
*
* $Revision: 1.11 $
* $Revision: 1.12 $
*
* last change: $Author: tl $ $Date: 2002-04-24 10:09:56 $
* last change: $Author: tl $ $Date: 2002-05-24 12:11:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -289,10 +289,12 @@ class SmCategoryDesc : public Resource
{
XubString Name;
XubString *Strings[4];
Bitmap *Graphics[4];
USHORT Minimum[4];
USHORT Maximum[4];
USHORT Value[4];
Bitmap *Graphics[4]; /* regular bitmaps */
Bitmap *GraphicsH[4]; /* high contrast bitmaps */
USHORT Minimum[4];
USHORT Maximum[4];
USHORT Value[4];
BOOL bIsHighContrast;
public:
SmCategoryDesc(const ResId &rResId, USHORT nCategoryIdx);
......@@ -300,11 +302,16 @@ public:
const XubString & GetName() const { return Name; }
const XubString * GetString(USHORT Index) const { return Strings[Index]; }
const Bitmap * GetGraphic(USHORT Index) const { return Graphics[Index]; }
USHORT GetMinimum(USHORT Index) { return Minimum[Index]; }
USHORT GetMaximum(USHORT Index) { return Maximum[Index]; }
USHORT GetValue(USHORT Index) const { return Value[Index]; }
void SetValue(USHORT Index, USHORT nVal) { Value[Index] = nVal;}
void SetHighContrast( BOOL bVal ) { bIsHighContrast = bVal; }
const Bitmap * GetGraphic(USHORT Index) const
{
return bIsHighContrast ? GraphicsH[Index] : Graphics[Index];
}
};
......@@ -338,12 +345,17 @@ class SmDistanceDialog : public ModalDialog
void SetHelpId(MetricField &rField, ULONG nHelpId);
void SetCategory(USHORT Category);
void ApplyImages();
public:
SmDistanceDialog(Window *pParent, BOOL bFreeRes = TRUE);
~SmDistanceDialog();
void ReadFrom(const SmFormat &rFormat);
void WriteTo (SmFormat &rFormat) /*const*/;
// Window
virtual void DataChanged( const DataChangedEvent &rEvt );
};
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: dialog.cxx,v $
*
* $Revision: 1.20 $
* $Revision: 1.21 $
*
* last change: $Author: vg $ $Date: 2002-05-03 14:35:00 $
* last change: $Author: tl $ $Date: 2002-05-24 12:12:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -750,7 +750,8 @@ static const FieldMinMax pMinMaxData[10][4] =
};
SmCategoryDesc::SmCategoryDesc(const ResId& rResId, USHORT nCategoryIdx) :
Resource(rResId)
Resource(rResId),
bIsHighContrast(FALSE)
{
if (IsAvailableRes(ResId(1).SetRT(RSC_STRING)))
{
......@@ -763,13 +764,15 @@ SmCategoryDesc::SmCategoryDesc(const ResId& rResId, USHORT nCategoryIdx) :
if (IsAvailableRes(ResId(nI2).SetRT(RSC_STRING)))
{
Strings[i] = new XubString(ResId(nI2));
Graphics[i] = new Bitmap(ResId(nI2));
Strings [i] = new XubString(ResId(nI2));
Graphics [i] = new Bitmap(ResId(10*nI2));
GraphicsH[i] = new Bitmap(ResId(10*nI2+1));
}
else
{
Strings[i] = 0;
Graphics[i] = 0;
Strings [i] = 0;
Graphics [i] = 0;
GraphicsH[i] = 0;
}
}
......@@ -1023,6 +1026,8 @@ SmDistanceDialog::SmDistanceDialog(Window *pParent, BOOL bFreeRes)
if (bFreeRes)
FreeResource();
ApplyImages();
// preview like controls should have a 2D look
aBitmap.SetBorderStyle( WINDOW_BORDER_MONO );
......@@ -1035,7 +1040,7 @@ SmDistanceDialog::SmDistanceDialog(Window *pParent, BOOL bFreeRes)
aMenuButton.GetPopupMenu()->SetSelectHdl(LINK(this, SmDistanceDialog, MenuSelectHdl));
aDefaultButton.SetClickHdl(LINK(this, SmDistanceDialog, DefaultButtonClickHdl));
}
}
SmDistanceDialog::~SmDistanceDialog()
......@@ -1044,6 +1049,24 @@ SmDistanceDialog::~SmDistanceDialog()
DELETEZ(Categories[i]);
}
void SmDistanceDialog::ApplyImages()
{
BOOL bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
for (int i = 0; i < NOCATEGORIES; ++i)
{
SmCategoryDesc *pCat = Categories[i];
if (pCat)
pCat->SetHighContrast( bHighContrast );
}
}
void SmDistanceDialog::DataChanged( const DataChangedEvent &rEvt )
{
if ( (rEvt.GetType() == DATACHANGED_SETTINGS) && (rEvt.GetFlags() & SETTINGS_STYLE) )
ApplyImages();
ModalDialog::DataChanged( rEvt );
}
void SmDistanceDialog::ReadFrom(const SmFormat &rFormat)
{
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: smres.src,v $
*
* $Revision: 1.74 $
* $Revision: 1.75 $
*
* last change: $Author: tl $ $Date: 2002-05-24 07:33:10 $
* last change: $Author: tl $ $Date: 2002-05-24 12:12:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -1414,10 +1414,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "~Espacio:";
Text[ thai ] = "~ระยะห่าง";
};
Bitmap 2
Bitmap 20
{
File = "dist11.bmp" ;
};
Bitmap 21
{
File = "dist11_h.bmp" ;
};
String 3
{
Text = "~Zeilenabstand" ;
......@@ -1444,10 +1448,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "~Interlineado:";
Text[ thai ] = "ระยะห่าง~บรรทัด";
};
Bitmap 3
Bitmap 30
{
File = "dist12.bmp" ;
};
Bitmap 31
{
File = "dist12_h.bmp" ;
};
String 4
{
Text = "~Wurzelabstand" ;
......@@ -1474,10 +1482,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "Intervalo de ~raz:";
Text[ thai ] = "ระยะห่าง~ราก";
};
Bitmap 4
Bitmap 40
{
File = "dist13.bmp" ;
};
Bitmap 41
{
File = "dist13_h.bmp" ;
};
};
Resource 2
{
......@@ -1533,10 +1545,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "~Superndice:";
Text[ thai ] = "~ตัวยก";
};
Bitmap 2
Bitmap 20
{
File = "dist21.bmp" ;
};
Bitmap 21
{
File = "dist21_h.bmp" ;
};
String 3
{
Text = "~Tiefstellung" ;
......@@ -1563,10 +1579,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "S~ubndice:";
Text[ thai ] = "ตั~วห้อย";
};
Bitmap 3
Bitmap 30
{
File = "dist22.bmp" ;
};
Bitmap 31
{
File = "dist22_h.bmp" ;
};
};
Resource 3
{
......@@ -1626,10 +1646,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "Altura del ~numerador:";
Text[ thai ] = "เ~ศษ";
};
Bitmap 2
Bitmap 20
{
File = "dist31.bmp" ;
};
Bitmap 21
{
File = "dist31_h.bmp" ;
};
String 3
{
Text = "~Nennertiefe" ;
......@@ -1656,10 +1680,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "~Altura del denominador:";
Text[ thai ] = "~ส่วน";
};
Bitmap 3
Bitmap 30
{
File = "dist32.bmp" ;
};
Bitmap 31
{
File = "dist32_h.bmp" ;
};
};
Resource 4
{
......@@ -1718,10 +1746,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "Longitud ~excesiva:";
Text[ thai ] = "ความยาวเ~กิน";
};
Bitmap 2
Bitmap 20
{
File = "dist41.bmp" ;
};
Bitmap 21
{
File = "dist41_h.bmp" ;
};
String 3
{
/* ### ACHTUNG: Neuer Text in Resource? ~Strichstrke: : ~Strichstrke: */
......@@ -1749,10 +1781,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "Espesor del ~trazo:";
Text[ thai ] = "~น้ำหนัก";
};
Bitmap 3
Bitmap 30
{
File = "dist42.bmp" ;
};
Bitmap 31
{
File = "dist42_h.bmp" ;
};
};
Resource 5
{
......@@ -1811,10 +1847,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "~Altura mxima:";
Text[ thai ] = "ขีดจำกัด~บน";
};
Bitmap 2
Bitmap 20
{
File = "dist51.bmp" ;
};
Bitmap 21
{
File = "dist51_h.bmp" ;
};
String 3
{
Text = "Grenz~tiefe" ;
......@@ -1841,10 +1881,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "Altura ~mnima:";
Text[ thai ] = "ขีดจำกัด~ล่าง";
};
Bitmap 3
Bitmap 30
{
File = "dist52.bmp" ;
};
Bitmap 31
{
File = "dist52_h.bmp" ;
};
};
Resource 6
{
......@@ -1902,10 +1946,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "~Sobredimensin izq./der.:";
Text[ thai ] = "ขนาดเ~กิน (ซ้าย/ขวา)";
};
Bitmap 2
Bitmap 20
{
File = "dist61.bmp" ;
};
Bitmap 21
{
File = "dist61_h.bmp" ;
};
String 3
{
Text = "~Abstand" ;
......@@ -1932,10 +1980,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "~Espacio:";
Text[ thai ] = "~ระยะห่าง";
};
Bitmap 3
Bitmap 30
{
File = "dist62.bmp" ;
};
Bitmap 31
{
File = "dist62_h.bmp" ;
};
String 5
{
Text = "~bergre" ;
......@@ -1962,10 +2014,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "~Sobredimensin:";
Text[ thai ] = "ขนาดเ~กิน";
};
Bitmap 5
Bitmap 50
{
File = "dist61.bmp" ;
};
Bitmap 51
{
File = "dist61_h.bmp" ;
};
};
Resource 7
{
......@@ -2023,10 +2079,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "~Interlineado:";
Text[ thai ] = "ระยะห่าง~บรรทัด";
};
Bitmap 2
Bitmap 20
{
File = "dist71.bmp" ;
};
Bitmap 21
{
File = "dist71_h.bmp" ;
};
String 3
{
Text = "~Spaltenabstand" ;
......@@ -2053,10 +2113,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "Distancia entre ~columnas:";
Text[ thai ] = "ระยะห่าง~คอลัมน์";
};
Bitmap 3
Bitmap 30
{
File = "dist72.bmp" ;
};
Bitmap 31
{
File = "dist72_h.bmp" ;
};
};
Resource 8
{
......@@ -2115,10 +2179,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "Altura ~primaria:";
Text[ thai ] = "ความสูง~ปฐมภูมิ";
};
Bitmap 2
Bitmap 20
{
File = "dist81.bmp" ;
};
Bitmap 21
{
File = "dist81_h.bmp" ;
};
String 3
{
Text = "~Mindestabstand" ;
......@@ -2145,10 +2213,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "Distancia ~mnima:";
Text[ thai ] = "ระยะห่าง~น้อยที่สุด";
};
Bitmap 3
Bitmap 30
{
File = "dist82.bmp" ;
};
Bitmap 31
{
File = "dist82_h.bmp" ;
};
};
Resource 9
{
......@@ -2207,10 +2279,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "~Sobredimensin:";
Text[ thai ] = "ขนาดเ~กิน";
};
Bitmap 2
Bitmap 20
{
File = "dist91.bmp" ;
};
Bitmap 21
{
File = "dist91_h.bmp" ;
};
String 3
{
Text = "~Abstand" ;
......@@ -2237,10 +2313,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "~Espacio:";
Text[ thai ] = "~ระยะห่าง";
};
Bitmap 3
Bitmap 30
{
File = "dist92.bmp" ;
};
Bitmap 31
{
File = "dist92_h.bmp" ;
};
};
Resource 10
{
......@@ -2297,10 +2377,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "~Izquierda:";
Text[ thai ] = "~ซ้าย";
};
Bitmap 2
Bitmap 20
{
File = "dist101.bmp" ;
};
Bitmap 21
{
File = "dist101_h.bmp" ;
};
String 3
{
Text = "~Rechts" ;
......@@ -2327,10 +2411,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "~Derecha:";
Text[ thai ] = "~ขวา";
};
Bitmap 3
Bitmap 30
{
File = "dist102.bmp" ;
};
Bitmap 31
{
File = "dist102_h.bmp" ;
};
String 4
{
Text = "~Oben" ;
......@@ -2357,10 +2445,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "~Arriba:";
Text[ thai ] = "~บน";
};
Bitmap 4
Bitmap 40
{
File = "dist103.bmp" ;
};
Bitmap 41
{
File = "dist103_h.bmp" ;
};
String 5
{
Text = "~Unten" ;
......@@ -2387,10 +2479,14 @@ ModalDialog RID_DISTANCEDIALOG
Text[ catalan ] = "~Abajo:";
Text[ thai ] = "~ล่าง";
};
Bitmap 5
Bitmap 50
{
File = "dist104.bmp" ;
};
Bitmap 51
{
File = "dist104_h.bmp" ;
};
};
Text[ chinese_simplified ] = "间隔";
Text[ russian ] = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment