GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

in need for a little help writing a custom widget

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
MacSlow
Familiar Face


Joined: 21 Sep 2005
Posts: 17
Location: Aachen, Germany

PostPosted: Sun Oct 02, 2005 9:09 am    Post subject: in need for a little help writing a custom widget Reply with quote

Greetings everybody!

I need help with drawing handle-styles for paned-handles. Take a look here to get an idea of the problem at hand. I wonder what maybe wrong with my handle-drawing code, which look like this:

Code: (Plaintext)
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

GtkStateType state;

if (gtk_widget_is_focus (widget))
    state = GTK_STATE_SELECTED;
else if (xpaned->handle_prelit)
    state = GTK_STATE_PRELIGHT;
else
    state = GTK_WIDGET_STATE (widget);

gtk_paint_handle (widget->style,
                widget->window,
                state,
                GTK_SHADOW_NONE,
                &xpaned->handle_pos_east,
                widget,
                "xpaned",
                xpaned->handle_pos_east.x,
                xpaned->handle_pos_east.y,
                xpaned->handle_pos_east.height,
                xpaned->handle_pos_east.width,
                GTK_ORIENTATION_HORIZONTAL);

gtk_paint_handle (widget->style,
                widget->window,
                state,
                GTK_SHADOW_NONE,
                &xpaned->handle_pos_west,
                widget,
                "xpaned",
                xpaned->handle_pos_west.x,
                xpaned->handle_pos_west.y,
                xpaned->handle_pos_west.height,
                xpaned->handle_pos_west.width,
                GTK_ORIENTATION_HORIZONTAL);

gtk_paint_handle (widget->style,
                widget->window,
                state,
                GTK_SHADOW_NONE,
                &xpaned->handle_pos_north,
                widget,
                "xpaned",
                xpaned->handle_pos_north.x,
                xpaned->handle_pos_north.y,
                xpaned->handle_pos_north.height,
                xpaned->handle_pos_north.width,
                GTK_ORIENTATION_VERTICAL);

gtk_paint_handle (widget->style,
                widget->window,
                state,
                GTK_SHADOW_NONE,
                &xpaned->handle_pos_south,
                widget,
                "xpaned",
                xpaned->handle_pos_south.x,
                xpaned->handle_pos_south.y,
                xpaned->handle_pos_south.height,
                xpaned->handle_pos_south.width,
                GTK_ORIENTATION_VERTICAL);

gtk_paint_handle (widget->style,
                widget->window,
                state,
                GTK_SHADOW_NONE,
                &xpaned->handle_pos_middle,
                widget,
                "xpaned",
                xpaned->handle_pos_middle.x,
                xpaned->handle_pos_middle.y,
                xpaned->handle_pos_middle.height,
                xpaned->handle_pos_middle.width,
                GTK_ORIENTATION_HORIZONTAL);


Thanks in advance for your time and kind advice!

Best regards...

MacSlow
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP