diff options
author | jenglish <jenglish@flightlab.com> | 2007-11-25 18:11:10 (GMT) |
---|---|---|
committer | jenglish <jenglish@flightlab.com> | 2007-11-25 18:11:10 (GMT) |
commit | 37a492a973a6293e2324e7a9d66dee21daf1d033 (patch) | |
tree | 22175f1ab591c35a78f6f7b5914368ecf10d3186 /generic/ttk/ttkManager.c | |
parent | 81e551c563bf0c2e7ba07e4b6f207bbae50242df (diff) | |
download | tk-37a492a973a6293e2324e7a9d66dee21daf1d033.zip tk-37a492a973a6293e2324e7a9d66dee21daf1d033.tar.gz tk-37a492a973a6293e2324e7a9d66dee21daf1d033.tar.bz2 |
Internal Ttk_Manager API updates; Fixed [Bug 1343984];
Added [$nb hide] method; [$nb add] on already-managed windows
no longer throws an error, can be used to re-add a hidden tab.
Updated docs and test suite.
Diffstat (limited to 'generic/ttk/ttkManager.c')
-rw-r--r-- | generic/ttk/ttkManager.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/generic/ttk/ttkManager.c b/generic/ttk/ttkManager.c index 3c9d51c..0df6a89 100644 --- a/generic/ttk/ttkManager.c +++ b/generic/ttk/ttkManager.c @@ -1,4 +1,4 @@ -/* $Id: ttkManager.c,v 1.4 2007/06/09 21:45:44 jenglish Exp $ +/* $Id: ttkManager.c,v 1.5 2007/11/25 18:11:12 jenglish Exp $ * * Copyright 2005, Joe English. Freely redistributable. * @@ -287,7 +287,7 @@ static void RemoveSlave(Ttk_Manager *mgr, int index) /* Notify manager: */ - mgr->managerSpec->SlaveRemoved(mgr, index); + mgr->managerSpec->SlaveRemoved(mgr->managerData, index); /* Remove from array: */ @@ -317,7 +317,15 @@ static void RemoveSlave(Ttk_Manager *mgr, int index) void Ttk_GeometryRequestProc(ClientData clientData, Tk_Window slaveWindow) { Ttk_Manager *mgr = clientData; - ScheduleUpdate(mgr, MGR_RESIZE_REQUIRED); + int slaveIndex = Ttk_SlaveIndex(mgr, slaveWindow); + int reqWidth = Tk_ReqWidth(slaveWindow); + int reqHeight= Tk_ReqHeight(slaveWindow); + + if (mgr->managerSpec->SlaveRequest( + mgr->managerData, slaveIndex, reqWidth, reqHeight)) + { + ScheduleUpdate(mgr, MGR_RESIZE_REQUIRED); + } } void Ttk_LostSlaveProc(ClientData clientData, Tk_Window slaveWindow) @@ -404,10 +412,6 @@ int Ttk_NumberSlaves(Ttk_Manager *mgr) { return mgr->nSlaves; } -void *Ttk_ManagerData(Ttk_Manager *mgr) -{ - return mgr->managerData; -} void *Ttk_SlaveData(Ttk_Manager *mgr, int slaveIndex) { return mgr->slaves[slaveIndex]->slaveData; |