diff options
Diffstat (limited to 'generic/ttk/ttkManager.h')
-rw-r--r-- | generic/ttk/ttkManager.h | 75 |
1 files changed, 43 insertions, 32 deletions
diff --git a/generic/ttk/ttkManager.h b/generic/ttk/ttkManager.h index 07fcea1..d487dea 100644 --- a/generic/ttk/ttkManager.h +++ b/generic/ttk/ttkManager.h @@ -14,16 +14,16 @@ typedef struct TtkManager_ Ttk_Manager; /* * Geometry manager specification record: * - * RequestedSize computes the requested size of the master window. + * RequestedSize computes the requested size of the container window. * - * PlaceSlaves sets the position and size of all managed slaves - * by calling Ttk_PlaceSlave(). + * PlaceSlaves sets the position and size of all managed content windows + * by calling Ttk_PlaceContent(). * - * SlaveRemoved() is called immediately before a slave is removed. - * NB: the associated slave window may have been destroyed when this + * SlaveRemoved() is called immediately before a content window is removed. + * NB: the associated content window may have been destroyed when this * routine is called. * - * SlaveRequest() is called when a slave requests a size change. + * SlaveRequest() is called when a content window requests a size change. * It should return 1 if the request should propagate, 0 otherwise. */ typedef struct { /* Manager hooks */ @@ -31,37 +31,43 @@ typedef struct { /* Manager hooks */ int (*RequestedSize)(void *managerData, int *widthPtr, int *heightPtr); void (*PlaceSlaves)(void *managerData); - int (*SlaveRequest)(void *managerData, int slaveIndex, int w, int h); - void (*SlaveRemoved)(void *managerData, int slaveIndex); + int (*SlaveRequest)(void *managerData, int index, int w, int h); + void (*SlaveRemoved)(void *managerData, int index); } Ttk_ManagerSpec; /* * Default implementations for Tk_GeomMgr hooks: */ -MODULE_SCOPE void Ttk_GeometryRequestProc(ClientData, Tk_Window slave); -MODULE_SCOPE void Ttk_LostSlaveProc(ClientData, Tk_Window slave); +#define Ttk_LostContentProc Ttk_LostSlaveProc +MODULE_SCOPE void Ttk_GeometryRequestProc(ClientData, Tk_Window window); +MODULE_SCOPE void Ttk_LostContentProc(ClientData, Tk_Window window); /* * Public API: */ MODULE_SCOPE Ttk_Manager *Ttk_CreateManager( - Ttk_ManagerSpec *, void *managerData, Tk_Window masterWindow); + Ttk_ManagerSpec *, void *managerData, Tk_Window window); MODULE_SCOPE void Ttk_DeleteManager(Ttk_Manager *); -MODULE_SCOPE void Ttk_InsertSlave( - Ttk_Manager *, int position, Tk_Window, void *slaveData); +#define Ttk_InsertContent Ttk_InsertSlave +MODULE_SCOPE void Ttk_InsertContent( + Ttk_Manager *, int position, Tk_Window, void *data); -MODULE_SCOPE void Ttk_ForgetSlave(Ttk_Manager *, int slaveIndex); +#define Ttk_ForgetContent Ttk_ForgetSlave +MODULE_SCOPE void Ttk_ForgetContent(Ttk_Manager *, int index); -MODULE_SCOPE void Ttk_ReorderSlave(Ttk_Manager *, int fromIndex, int toIndex); - /* Rearrange slave positions */ +#define Ttk_ReorderContent Ttk_ReorderSlave +MODULE_SCOPE void Ttk_ReorderContent(Ttk_Manager *, int fromIndex, int toIndex); + /* Rearrange content window positions */ -MODULE_SCOPE void Ttk_PlaceSlave( - Ttk_Manager *, int slaveIndex, int x, int y, int width, int height); - /* Position and map the slave */ +#define Ttk_PlaceContent Ttk_PlaceSlave +MODULE_SCOPE void Ttk_PlaceContent( + Ttk_Manager *, int index, int x, int y, int width, int height); + /* Position and map the content window */ -MODULE_SCOPE void Ttk_UnmapSlave(Ttk_Manager *, int slaveIndex); - /* Unmap the slave */ +#define Ttk_UnmapContent Ttk_UnmapSlave +MODULE_SCOPE void Ttk_UnmapContent(Ttk_Manager *, int index); + /* Unmap the content window */ MODULE_SCOPE void Ttk_ManagerSizeChanged(Ttk_Manager *); MODULE_SCOPE void Ttk_ManagerLayoutChanged(Ttk_Manager *); @@ -69,24 +75,29 @@ MODULE_SCOPE void Ttk_ManagerLayoutChanged(Ttk_Manager *); /* Utilities: */ -MODULE_SCOPE int Ttk_SlaveIndex(Ttk_Manager *, Tk_Window); - /* Returns: index in slave array of specified window, -1 if not found */ +#define Ttk_ContentIndex Ttk_SlaveIndex +MODULE_SCOPE int Ttk_ContentIndex(Ttk_Manager *, Tk_Window); + /* Returns: index in content array of specified window, -1 if not found */ -MODULE_SCOPE int Ttk_GetSlaveIndexFromObj( +#define Ttk_GetContentIndexFromObj Ttk_GetSlaveIndexFromObj +MODULE_SCOPE int Ttk_GetContentIndexFromObj( Tcl_Interp *, Ttk_Manager *, Tcl_Obj *, int *indexPtr); /* Accessor functions: */ -MODULE_SCOPE int Ttk_NumberSlaves(Ttk_Manager *); - /* Returns: number of managed slaves */ +#define Ttk_NumberContent Ttk_NumberSlaves +MODULE_SCOPE int Ttk_NumberContent(Ttk_Manager *); + /* Returns: number of managed content windows */ -MODULE_SCOPE void *Ttk_SlaveData(Ttk_Manager *, int slaveIndex); - /* Returns: client data associated with slave */ +#define Ttk_ContentData Ttk_SlaveData +MODULE_SCOPE void *Ttk_ContentData(Ttk_Manager *, int index); + /* Returns: client data associated with content window */ -MODULE_SCOPE Tk_Window Ttk_SlaveWindow(Ttk_Manager *, int slaveIndex); - /* Returns: slave window */ +#define Ttk_ContentWindow Ttk_SlaveWindow +MODULE_SCOPE Tk_Window Ttk_ContentWindow(Ttk_Manager *, int index); + /* Returns: content window */ -MODULE_SCOPE int Ttk_Maintainable(Tcl_Interp *, Tk_Window slave, Tk_Window master); - /* Returns: 1 if master can manage slave; 0 otherwise leaving error msg */ +MODULE_SCOPE int Ttk_Maintainable(Tcl_Interp *, Tk_Window content, Tk_Window container); + /* Returns: 1 if container can manage content; 0 otherwise leaving error msg */ #endif /* _TTKMANAGER */ |