summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkManager.h
diff options
context:
space:
mode:
authorculler <culler>2020-11-10 13:59:25 (GMT)
committerculler <culler>2020-11-10 13:59:25 (GMT)
commitd94200fdcf927707b43670e7751208ea902b382e (patch)
treec8f724ce055955eef67c4b799866138c5389715d /generic/ttk/ttkManager.h
parenta49d6e52a72b1f086503ae32cb28b0da62e5fa99 (diff)
parent6133a711414cfb8fcc3a8b52ecf25b59a09e5800 (diff)
downloadtk-d94200fdcf927707b43670e7751208ea902b382e.zip
tk-d94200fdcf927707b43670e7751208ea902b382e.tar.gz
tk-d94200fdcf927707b43670e7751208ea902b382e.tar.bz2
Merge main
Diffstat (limited to 'generic/ttk/ttkManager.h')
-rw-r--r--generic/ttk/ttkManager.h77
1 files changed, 44 insertions, 33 deletions
diff --git a/generic/ttk/ttkManager.h b/generic/ttk/ttkManager.h
index 838e261..07b0ade 100644
--- a/generic/ttk/ttkManager.h
+++ b/generic/ttk/ttkManager.h
@@ -14,54 +14,60 @@ 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().
+ * PlaceContent 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
+ * ContentRemoved() 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.
+ * ContentRequest() 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 */
Tk_GeomMgr tkGeomMgr; /* "real" Tk Geometry Manager */
int (*RequestedSize)(void *managerData, int *widthPtr, int *heightPtr);
- void (*PlaceSlaves)(void *managerData);
- int (*SlaveRequest)(void *managerData, TkSizeT slaveIndex, int w, int h);
- void (*SlaveRemoved)(void *managerData, TkSizeT slaveIndex);
+ void (*PlaceContent)(void *managerData);
+ int (*ContentRequest)(void *managerData, TkSizeT index, int w, int h);
+ void (*ContentRemoved)(void *managerData, TkSizeT 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_LostSlaveProc Ttk_LostContentProc
+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 *, TkSizeT position, Tk_Window, void *slaveData);
+#define Ttk_InsertSlave Ttk_InsertContent
+MODULE_SCOPE void Ttk_InsertContent(
+ Ttk_Manager *, TkSizeT position, Tk_Window, void *clientData);
-MODULE_SCOPE void Ttk_ForgetSlave(Ttk_Manager *, TkSizeT slaveIndex);
+#define Ttk_ForgetSlave Ttk_ForgetContent
+MODULE_SCOPE void Ttk_ForgetContent(Ttk_Manager *, TkSizeT index);
-MODULE_SCOPE void Ttk_ReorderSlave(Ttk_Manager *, TkSizeT fromIndex, TkSizeT toIndex);
- /* Rearrange slave positions */
+#define Ttk_ReorderSlave Ttk_ReorderContent
+MODULE_SCOPE void Ttk_ReorderContent(Ttk_Manager *, TkSizeT fromIndex, TkSizeT toIndex);
+ /* Rearrange content window positions */
-MODULE_SCOPE void Ttk_PlaceSlave(
- Ttk_Manager *, TkSizeT slaveIndex, int x, int y, int width, int height);
- /* Position and map the slave */
+#define Ttk_PlaceSlave Ttk_PlaceContent
+MODULE_SCOPE void Ttk_PlaceContent(
+ Ttk_Manager *, TkSizeT index, int x, int y, int width, int height);
+ /* Position and map the content window */
-MODULE_SCOPE void Ttk_UnmapSlave(Ttk_Manager *, TkSizeT slaveIndex);
- /* Unmap the slave */
+#define Ttk_UnmapSlave Ttk_UnmapContent
+MODULE_SCOPE void Ttk_UnmapContent(Ttk_Manager *, TkSizeT 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 TkSizeT Ttk_SlaveIndex(Ttk_Manager *, Tk_Window);
- /* Returns: index in slave array of specified window, -1 if not found */
+#define Ttk_SlaveIndex Ttk_ContentIndex
+MODULE_SCOPE TkSizeT Ttk_ContentIndex(Ttk_Manager *, Tk_Window);
+ /* Returns: index in content array of specified window, TCL_INDEX_NONE if not found */
-MODULE_SCOPE int Ttk_GetSlaveIndexFromObj(
+#define Ttk_GetSlaveIndexFromObj Ttk_GetContentIndexFromObj
+MODULE_SCOPE int Ttk_GetContentIndexFromObj(
Tcl_Interp *, Ttk_Manager *, Tcl_Obj *, TkSizeT *indexPtr);
/* Accessor functions:
*/
-MODULE_SCOPE TkSizeT Ttk_NumberSlaves(Ttk_Manager *);
- /* Returns: number of managed slaves */
+#define Ttk_NumberSlaves Ttk_NumberContent
+MODULE_SCOPE TkSizeT Ttk_NumberContent(Ttk_Manager *);
+ /* Returns: number of managed content windows */
-MODULE_SCOPE void *Ttk_SlaveData(Ttk_Manager *, TkSizeT slaveIndex);
- /* Returns: client data associated with slave */
+#define Ttk_SlaveData Ttk_ContentData
+MODULE_SCOPE void *Ttk_ContentData(Ttk_Manager *, TkSizeT index);
+ /* Returns: client data associated with content window */
-MODULE_SCOPE Tk_Window Ttk_SlaveWindow(Ttk_Manager *, TkSizeT slaveIndex);
- /* Returns: slave window */
+#define Ttk_SlaveWindow Ttk_ContentWindow
+MODULE_SCOPE Tk_Window Ttk_ContentWindow(Ttk_Manager *, TkSizeT 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 */