~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to docs/gtk4ex/fxbitmaps.pp

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Unit fxbitmaps;
2
 
 
3
 
{$mode objfpc}
4
 
 
5
 
Interface
6
 
 
7
 
uses glib,gdk,gtk;
8
 
 
9
 
Const 
10
 
  DeleteXpmHeight=16;
11
 
  DeleteXpmColors=2;
12
 
  DeleteXpmArraySize=DeleteXpmHeight+DeleteXpmColors+1;
13
 
  DeleteXpm : Array[1..DeleteXpmArraySize] of Pchar = (
14
 
    '16 16 2 1',        { 16x16 bitmap using 2 colors, 1 char per color}
15
 
    '. c #000000',      { First color: Black  }
16
 
    '# c None',         { Second color : Transparent}
17
 
    '################', { The bitmap }
18
 
    '################',
19
 
    '##...#########.#',
20
 
    '##....######..##',
21
 
    '###....####..###',
22
 
    '#####...##..####',
23
 
    '######.....#####',
24
 
    '#######...######',
25
 
    '######.....#####',
26
 
    '#####...##..####',
27
 
    '####...####..###',
28
 
    '###...######.###',
29
 
    '##....#######.##',
30
 
    '##...###########',
31
 
    '###.##########.#',
32
 
    '################'
33
 
    );
34
 
 
35
 
  PropertiesXpmHeight = 16;
36
 
  PropertiesXpmColors = 4;
37
 
  PropertiesXpmArraySize = PropertiesXpmHeight+PropertiesXpmColors+1;
38
 
  PropertiesXpm : Array [1..PropertiesXpmArraySize] of PChar = (
39
 
    '16 16 4 1',        { 16x16 bitmap using 2 colors, 1 char per color}
40
 
    '. c #000000',      { First color : Black }
41
 
    '# c #000080',      { Second color : Light Blue }
42
 
    'a c None',         { Third color : Transparent }
43
 
    'b c #f8fcf8',      { Last color : greyish }
44
 
    'aaaaaaaaaaaaaaaa',
45
 
    'aaaaaaa......a##',
46
 
    'aaaaaa.aaaaaa.##',
47
 
    'aaaaa.a.aaaaaa##',
48
 
    '.....a.a.aaaaa##',
49
 
    '.bb.a.a.a.aaa.##',
50
 
    '.b.a.b.a.a...a##',
51
 
    '.b..bbb.a.b.aaaa',
52
 
    '.bbbbbbb.bb.aaaa',
53
 
    '.bbbbbbbbbb.aaaa',
54
 
    '.b..b.....b.aaaa',
55
 
    '.bbbbbbbbbb.aaaa',
56
 
    '.b..b.....b.aaaa',
57
 
    '.bbbbbbbbbb.aaaa',
58
 
    '............aaaa',
59
 
    'aaaaaaaaaaaaaaaa'
60
 
);
61
 
 
62
 
function CreateWidgetFromXPM (Window : PGtkWidget; Data : PPChar) : PgtkWidget;
63
 
 
64
 
Implementation
65
 
 
66
 
function CreateWidgetFromXPM (Window : PGtkWidget; Data : PPChar) : PGtkWidget;
67
 
 
68
 
Var
69
 
  mask   : PGdkBitmap;
70
 
  pixmap : PGdkPixMap;
71
 
 
72
 
begin
73
 
  pixmap:=gdk_pixmap_create_from_xpm_d(window^.window,@mask,nil,ppgchar(Data));
74
 
  Result:=gtk_pixmap_new(Pixmap,Mask);
75
 
  gtk_widget_show(Result);
76
 
end;
77
 
 
78
 
end.