summaryrefslogtreecommitdiff
path: root/src/corelib/gfx_constants.pas
blob: f204cbab176431bd0209762fbc2788d43880dc44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{
  Constants used throughout fpGUI will be defined here. This includes
  language constants for localization.
  
  You only need to changes these defines if you want the default fpGUI language
  to be something other than English.
  
  Soon the lang_*.inc files will be auto generated from the actual *.po files.
  At which point only the .po files need to be maintained.
}
unit gfx_constants;

{$mode objfpc}{$H+}

interface

uses
  SysUtils, gfxbase;

resourcestring

{ Define Compiler language symbol (eg: de for German) to include the correct
  language resource file otherwise the Default (English) resource file will
  be used. }

{.$DEFINE de}     // German
{.$DEFINE ru}     // Russian
{.$DEFINE fr}     // French
{.$DEFINE pt}     // Portuguese (Brazil)
{.$DEFINE af}     // Afrikaans
{.$DEFINE it}     // Italian
{.$DEFINE es}     // Spanish



{$IF defined(de)}
  {$I lang_german.inc}
  
{$ELSEIF defined(ru)}
  {$I lang_russian.inc}
  
{$ELSEIF defined(fr)}
  {$I lang_french.inc}
  
{$ELSEIF defined(pt)}
  {$I lang_portuguese.inc}
  
{$ELSEIF defined(af)}
  {$I lang_afrikaans.inc}

{$ELSEIF defined(it)}
  {$I lang_italian.inc}

{$ELSEIF defined(es)}
  {$I lang_spanish.inc}

{$ELSE}
  {$I lang_english.inc}
{$IFEND}


const
  // FPC 2.2.0 and earlier only
  {$if defined(VER2_0) or defined(VER2_2_0)}
    {$IFDEF UNIX}
    AllFilesMask    = '*';
    {$ELSE}
    AllFilesMask    = '*.*';
    {$ENDIF UNIX}
  {$endif}
  

  { Double click support }
  DOUBLECLICK_MS = 320; // the max time between left-clicks for doubleclick
  DOUBLECLICK_DISTANCE = 5; // max distance between points when doing doubleclick

  ONE_MILISEC = 1/MSecsPerDay;
  

{ This is so that when we support LTR and RTL languages, the colon will be
  added at the correct place. }
function fpgAddColon(const AText: TfpgString): TfpgString;


implementation


function fpgAddColon(const AText: TfpgString): TfpgString;
begin
  { TODO : Check language direction and add colon at appropriate end. }
  result := AText + ':';
end;

end.