1Tk_SetClass(3)               Tk Library Procedures              Tk_SetClass(3)
2
3
4
5______________________________________________________________________________
6

NAME

8       Tk_SetClass, Tk_Class - set or retrieve a window's class
9

SYNOPSIS

11       #include <tk.h>
12
13       Tk_SetClass(tkwin, class)
14
15       Tk_Uid
16       Tk_Class(tkwin)
17

ARGUMENTS

19       Tk_Window tkwin (in)           Token for window.
20
21       char *class (in)               New class name for window.
22______________________________________________________________________________
23

DESCRIPTION

25       Tk_SetClass  is  called  to associate a class with a particular window.
26       The class string identifies the type of the window;  all  windows  with
27       the same general class of behavior (button, menu, etc.) should have the
28       same class.  By convention all class names start with a capital letter,
29       and there exists a Tcl command with the same name as each class (except
30       all in lower-case) which can be used to create and  manipulate  windows
31       of that class.  A window's class string is initialized to NULL when the
32       window is created.
33
34       For main windows, Tk automatically propagates the name and class to the
35       WM_CLASS  property used by window managers.  This happens either when a
36       main window is actually created (e.g. in Tk_MakeWindowExist),  or  when
37       Tk_SetClass  is  called,  whichever occurs later.  If a main window has
38       not been assigned a class then Tk will not set  the  WM_CLASS  property
39       for the window.
40
41       Tk_Class  is  a  macro that returns the current value of tkwin's class.
42       The value is returned as a Tk_Uid, which may be used just like a string
43       pointer  but  also  has  the properties of a unique identifier (see the
44       manual entry for Tk_GetUid for details).  If tkwin  has  not  yet  been
45       given a class, then Tk_Class will return NULL.
46

KEYWORDS

48       class, unique identifier, window, window manager
49
50
51
52Tk                                                              Tk_SetClass(3)
Impressum