Tk_ManageGeometry(3)

Tk_ManageGeometry(3)

malloc Home Page Subroutines Index MapWindow


_________________________________________________________________

NAME
       Tk_ManageGeometry  -  arrange  to handle geometry requests
       for a window

SYNOPSIS
       #include <<tk.h>>

       Tk_ManageGeometry(tkwin, mgrPtr, clientData)

ARGUMENTS
       Tk_Window         tkwin        (in)      Token for  window
                                                to be managed.

       Tk_GeomMgr        *mgrPtr      (in)      Pointer  to  data
                                                structure    con-
                                                taining  informa-
                                                tion  about   the
                                                geometry manager,
                                                or NULL to  indi-
                                                cate that tkwin's
                                                geometry
                                                shouldn't be man-
                                                aged     anymore.
                                                The  data  struc-
                                                ture  pointed  to
                                                by mgrPtr must be
                                                static: Tk  keeps
                                                a reference to it
                                                as  long  as  the
                                                window   is  man-
                                                aged.

       ClientData        clientData   (in)      Arbitrary    one-
                                                word   value   to
                                                pass to  geometry
                                                manager     call-
                                                backs.
_________________________________________________________________

DESCRIPTION
       Tk_ManageGeometry arranges for a particular geometry  man-
       ager,  described  by  the  mgrPtr argument, to control the
       geometry of a particular slave window, given by tkwin.  If
       tkwin  was  previously managed by some other geometry man-
       ager, the previous manager loses control in favor  of  the
       new  one.   If mgrPtr is NULL, geometry management is can-
       celled for tkwin.

       The structure pointed to by  mgrPtr  contains  information
       about the geometry manager:
              typedef struct {
                char *name;
                Tk_GeomRequestProc *requestProc;
                Tk_GeomLostSlaveProc *lostSlaveProc;
              } Tk_GeomMgr;
       The  name  field is the textual name for the geometry man-
       ager, such as pack or place;  this value will be  returned
       by the command winfo manager.

       requestProc  is  a  procedure in the geometry manager that
       will be invoked whenever Tk_GeometryRequest is  called  by
       the  slave  to  change  its desired geometry.  requestProc
       should have arguments and  results  that  match  the  type
       Tk_GeomRequestProc:
              typedef void Tk_GeomRequestProc(
                ClientData clientData,
                Tk_Window tkwin);
       The  parameters  to  requestProc  will be identical to the
       corresponding  parameters  passed  to   Tk_ManageGeometry.
       clientData  usually  points to a data structure containing
       application-specific  information  about  how  to   manage
       tkwin's geometry.

       The lostSlaveProc field of mgrPtr points to another proce-
       dure in the geometry manager.  Tk will  invoke  lostSlave-
       Proc  if  some  other  manager  calls Tk_ManageGeometry to
       claim tkwin away from the current geometry manager.  lost-
       SlaveProc  is  not  invoked if Tk_ManageGeometry is called
       with a NULL value for mgrPtr (presumably the current geom-
       etry  manager has made this call, so it already knows that
       the window is no longer managed),  nor  is  it  called  if
       mgrPtr  is  the same as the window's current geometry man-
       ager.  lostSlaveProc should  have  arguments  and  results
       that match the following prototype:
              typedef void Tk_GeomLostSlaveProc(
                ClientData clientData,
                Tk_Window tkwin);
       The  parameters  to lostSlaveProc will be identical to the
       corresponding parameters passed to Tk_ManageGeometry.

KEYWORDS
       callback, geometry, managed, request, unmanaged

malloc Home Page Subroutines Index MapWindow