home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / tk3.3b1 / doc / SetClass.3 < prev    next >
Encoding:
Text File  |  1993-04-01  |  2.8 KB  |  75 lines

  1. '\"
  2. '\" Copyright (c) 1990 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/wish/man/RCS/SetClass.3,v 1.7 93/04/01 09:41:57 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. .so man.macros
  24. .HS Tk_SetClass tkc
  25. .BS
  26. .SH NAME
  27. Tk_SetClass, Tk_Class \- set or retrieve a window's class
  28. .SH SYNOPSIS
  29. .nf
  30. \fB#include <tk.h>\fR
  31. .sp
  32. \fBTk_SetClass\fR(\fItkwin, class\fR)
  33. .sp
  34. Tk_Uid
  35. \fBTk_Class\fR(\fItkwin\fR)
  36. .SH ARGUMENTS
  37. .AS Tk_Window parent
  38. .AP Tk_Window tkwin in
  39. Token for window.
  40. .AP char *class in
  41. New class name for window.
  42. .BE
  43.  
  44. .SH DESCRIPTION
  45. .PP
  46. \fBTk_SetClass\fR is called to associate a class with a particular
  47. window.  The \fIclass\fR string identifies the type of the
  48. window;  all windows with the same general class of behavior
  49. (button, menu, etc.) should have the same class.  By
  50. convention all class names start with a capital letter, and
  51. there exists a Tcl command with the same name as
  52. each class (except all in lower-case) which can be used to
  53. create and manipulate windows of that class.
  54. A window's class string is initialized to NULL
  55. when the window is created.
  56. .PP
  57. For main windows, Tk automatically propagates the name and class
  58. to the WM_CLASS property used by window managers.  This happens
  59. either when a main window is actually created (e.g. in
  60. \fBTk_MakeWindowExist\fR), or when \fBTk_SetClass\fR
  61. is called, whichever occurs later.  If a main window has not been
  62. assigned a class then Tk will not set the WM_CLASS property for
  63. the window.
  64. .PP
  65. \fBTk_Class\fR is a macro that returns the
  66. current value of \fItkwin\fR's class.  The value is returned
  67. as a Tk_Uid, which may be used just like a string pointer but also has
  68. the properties of a unique identfier (see the manual entry for
  69. \fBTk_GetUid\fR for details).
  70. If \fItkwin\fR has not yet been given a class, then
  71. \fBTk_Class\fR will return NULL.
  72.  
  73. .SH KEYWORDS
  74. class, unique identifier, window, window manager
  75.