File: gdk_font.e

package info (click to toggle)
egtk 0.3.5.cvs20020302-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,900 kB
  • ctags: 5,118
  • sloc: ansic: 2,212; makefile: 247; sh: 113
file content (59 lines) | stat: -rw-r--r-- 936 bytes parent folder | download | duplicates (3)
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
-- Copyright (C) 1999 Richie Bielak and others
-- Licensed under Eiffel Forum Freeware License, version 1;
-- (see forum.txt)
--
indexing

	cvs: "$Id: gdk_font.e,v 1.5 2002/02/26 15:58:42 elphick Exp $"

class GDK_FONT

inherit
	
	EGTK_HANDLE
		rename
			handle as font
		redefine
			destroy_object
		end

	GDK_FONT_EXTERNALS
		undefine
			is_equal, copy
		end

	EGTK_NON_PORTABLE
		undefine
			is_equal, copy
		end

creation

	make_from_description,
	make_from_pointer

feature -- Creation
	
	make_from_description (description: STRING) is
			-- Create the font from `description'.
		do
			load (description)
			register(font, Current)
		end

feature

	load (description: STRING) is
			-- Load the font.
		do
			font := gdk_npc.np_gdk_font_load (description)
			font := gdk_font_ref (font)
		end

	destroy_object is
		do
	--		unregister(font)  -- causes a segfault, but I can't see why
			gdk_font_unref (font)
		end
	
end -- GDK_FONT