You can subscribe to this list here.
2003 |
Jan
(30) |
Feb
(20) |
Mar
(151) |
Apr
(86) |
May
(23) |
Jun
(25) |
Jul
(107) |
Aug
(141) |
Sep
(55) |
Oct
(85) |
Nov
(65) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(22) |
Feb
(18) |
Mar
(3) |
Apr
(16) |
May
(69) |
Jun
(3) |
Jul
(1) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(6) |
Dec
(1) |
2005 |
Jan
(2) |
Feb
(16) |
Mar
|
Apr
|
May
|
Jun
(47) |
Jul
(1) |
Aug
|
Sep
(6) |
Oct
(4) |
Nov
|
Dec
(34) |
2006 |
Jan
(39) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
(4) |
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2008 |
Jan
|
Feb
|
Mar
(26) |
Apr
(1) |
May
(1) |
Jun
|
Jul
(5) |
Aug
(2) |
Sep
(8) |
Oct
(8) |
Nov
(22) |
Dec
(30) |
2009 |
Jan
(10) |
Feb
(13) |
Mar
(14) |
Apr
(14) |
May
(32) |
Jun
(25) |
Jul
(36) |
Aug
(10) |
Sep
(2) |
Oct
|
Nov
|
Dec
(10) |
2010 |
Jan
(9) |
Feb
(4) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
(4) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: <br...@us...> - 2004-06-11 09:37:09
|
Update of /cvsroot/htoolkit/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15757 Modified Files: hsql.pkg.in Log Message: Added newline at end of file. Without it, configure on Solaris will leave out the curly bracket at the end. Index: hsql.pkg.in =================================================================== RCS file: /cvsroot/htoolkit/HSQL/hsql.pkg.in,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** hsql.pkg.in 4 Jan 2004 13:14:55 -0000 1.3 --- hsql.pkg.in 11 Jun 2004 09:36:57 -0000 1.4 *************** *** 15,17 **** framework_dirs = [], extra_frameworks = [] ! } \ No newline at end of file --- 15,17 ---- framework_dirs = [], extra_frameworks = [] ! } |
From: <kr_...@us...> - 2004-05-31 20:45:49
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26746/src/cbits/GTK Modified Files: Splitter.c Log Message: Bugfix Index: Splitter.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Splitter.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Splitter.c 29 May 2004 23:00:19 -0000 1.1 --- Splitter.c 31 May 2004 20:45:33 -0000 1.2 *************** *** 15,22 **** --- 15,24 ---- gtk_widget_show_all(panes[0]); gtk_paned_add1(GTK_PANED(paned), panes[0]); + gtk_container_child_set(GTK_CONTAINER(paned), panes[0], "shrink", FALSE, NULL); panes[1] = create_generic_window(); gtk_widget_show_all(panes[1]); gtk_paned_add2(GTK_PANED(paned), panes[1]); + gtk_container_child_set(GTK_CONTAINER(paned), panes[1], "shrink", FALSE, NULL); port_layout_put(PORT_LAYOUT(GTK_BIN(window)->child), paned); *************** *** 37,42 **** void osGetSplitterRange(WindowHandle splitter, int *range) { ! range[0] = 0; ! range[1] = GTK_IS_HPANED(splitter) ? splitter->allocation.width : splitter->allocation.height; } --- 39,44 ---- void osGetSplitterRange(WindowHandle splitter, int *range) { ! range[0] = GTK_PANED(splitter)->min_position; ! range[1] = GTK_PANED(splitter)->max_position; } |
From: <kr_...@us...> - 2004-05-31 19:46:25
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13445/src/cbits/Win32 Modified Files: Splitter.c Log Message: bugfix Index: Splitter.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Splitter.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Splitter.c 31 May 2004 19:31:30 -0000 1.3 --- Splitter.c 31 May 2004 19:46:14 -0000 1.4 *************** *** 79,83 **** { pData = malloc(sizeof(SplitterData)); ! pData->nSplitterPos = 100; pData->bInDragMode = FALSE; --- 79,83 ---- { pData = malloc(sizeof(SplitterData)); ! pData->nSplitterPos = SPLIT_LINE_SIZE/2; pData->bInDragMode = FALSE; *************** *** 233,241 **** RECT rect; GetClientRect(splitter, &rect); ! range[0] = 0; if (GetWindowLong(splitter, GWL_STYLE) & CCS_VERT) ! range[1] = rect.bottom-rect.top; else ! range[1] = rect.right-rect.left; } --- 233,241 ---- RECT rect; GetClientRect(splitter, &rect); ! range[0] = SPLIT_LINE_SIZE/2; if (GetWindowLong(splitter, GWL_STYLE) & CCS_VERT) ! range[1] = (rect.bottom-rect.top)-SPLIT_LINE_SIZE/2; else ! range[1] = (rect.right-rect.left)-SPLIT_LINE_SIZE/2; } |
From: <kr_...@us...> - 2004-05-31 19:31:40
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10288/src/cbits/Win32 Modified Files: Splitter.c Log Message: Completed Splitter control for Windows Index: Splitter.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Splitter.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Splitter.c 29 May 2004 23:00:20 -0000 1.2 --- Splitter.c 31 May 2004 19:31:30 -0000 1.3 *************** *** 2,9 **** #include "Internals.h" #include "Handlers_stub.h" ! typedef struct { int nSplitterPos; HWND hCtrl1, hCtrl2; } SplitterData; --- 2,11 ---- #include "Internals.h" #include "Handlers_stub.h" + #include <windowsx.h> ! typedef struct { int nSplitterPos; + BOOL bInDragMode; HWND hCtrl1, hCtrl2; } SplitterData; *************** *** 44,51 **** --- 46,75 ---- if (pData->hCtrl2) MoveWindow(pData->hCtrl2, rects[2].left, rects[2].top, rects[2].right-rects[2].left, rects[2].bottom-rects[2].top, TRUE); + + InvalidateRect(hWnd, NULL, TRUE); + } + + static void UpdateSplitterPos(HWND hWnd, SplitterData *pData, int pos) + { + RECT rect; + int nMaxPos; + + GetClientRect(hWnd, &rect); + if (GetWindowLong(hWnd, GWL_STYLE) & CCS_VERT) + nMaxPos = rect.bottom-rect.top; + else + nMaxPos = rect.right-rect.left; + + if (pos > SPLIT_LINE_SIZE/2 && pos < nMaxPos-SPLIT_LINE_SIZE/2) + { + pData->nSplitterPos = pos; + RelayoutPanes(hWnd, pData); + } } LRESULT CALLBACK HSplitterFunction(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { + POINT pos; + RECT rects[3]; SplitterData *pData = (SplitterData *) GetWindowLong(hWnd, GWL_USERDATA); *************** *** 56,64 **** pData = malloc(sizeof(SplitterData)); pData->nSplitterPos = 100; pData->hCtrl1 = CreateWindow( "HCOMPOUND", NULL, ! WS_CHILD | WS_BORDER | WS_HSCROLL | WS_VSCROLL, 0,0,0,0, hWnd, --- 80,89 ---- pData = malloc(sizeof(SplitterData)); pData->nSplitterPos = 100; + pData->bInDragMode = FALSE; pData->hCtrl1 = CreateWindow( "HCOMPOUND", NULL, ! WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL, 0,0,0,0, hWnd, *************** *** 70,74 **** "HCOMPOUND", NULL, ! WS_CHILD | WS_BORDER | WS_HSCROLL | WS_VSCROLL, 0,0,0,0, hWnd, --- 95,99 ---- "HCOMPOUND", NULL, ! WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL, 0,0,0,0, hWnd, *************** *** 87,91 **** case WM_PAINT: { - RECT rects[3]; PAINTSTRUCT ps; HDC hDC = BeginPaint(hWnd, &ps); --- 112,115 ---- *************** *** 122,129 **** break; case WM_ERASEBKGND: ! return NULL; case WM_SIZE: RelayoutPanes(hWnd, pData); break; } --- 146,198 ---- break; case WM_ERASEBKGND: ! return (LRESULT) NULL; case WM_SIZE: RelayoutPanes(hWnd, pData); break; + case WM_LBUTTONDOWN: + pos.x = GET_X_LPARAM(lParam); + pos.y = GET_Y_LPARAM(lParam); + CalcPaneRects(hWnd, pData, rects); + + if (PtInRect(&rects[0],pos)) + { + pData->bInDragMode = TRUE; + SetCapture(hWnd); + + if (GetWindowLong(hWnd, GWL_STYLE) & CCS_VERT) + SetCursor(LoadCursor(NULL, IDC_SIZENS)); + else + SetCursor(LoadCursor(NULL, IDC_SIZEWE)); + } + break; + case WM_LBUTTONUP: + ReleaseCapture(); + break; + case WM_MOUSEMOVE: + pos.x = GET_X_LPARAM(lParam); + pos.y = GET_Y_LPARAM(lParam); + CalcPaneRects(hWnd, pData, rects); + + if (pData->bInDragMode) + { + if (GetWindowLong(hWnd, GWL_STYLE) & CCS_VERT) + UpdateSplitterPos(hWnd, pData, pos.y); + else + UpdateSplitterPos(hWnd, pData, pos.x); + } + + if (PtInRect(&rects[0],pos)) + { + if (GetWindowLong(hWnd, GWL_STYLE) & CCS_VERT) + SetCursor(LoadCursor(NULL, IDC_SIZENS)); + else + SetCursor(LoadCursor(NULL, IDC_SIZEWE)); + } + else + SetCursor(LoadCursor(NULL, IDC_ARROW)); + break; + case WM_CAPTURECHANGED: + pData->bInDragMode = FALSE; + break; } *************** *** 147,153 **** ); ! pData = (SplitterData *) GetWindowLong(splitter, GWL_USERDATA); panes[0] = pData->hCtrl1; ! panes[2] = pData->hCtrl2; return checkWindow(hSplitter, "HSPLITTER"); --- 216,222 ---- ); ! pData = (SplitterData *) GetWindowLong(hSplitter, GWL_USERDATA); panes[0] = pData->hCtrl1; ! panes[1] = pData->hCtrl2; return checkWindow(hSplitter, "HSPLITTER"); *************** *** 162,173 **** void osGetSplitterRange(WindowHandle splitter, int *range) { } void osSetSplitterPosition(WindowHandle splitter, int pos) { } int osGetSplitterPosition(WindowHandle splitter) { ! return 0; } --- 231,252 ---- void osGetSplitterRange(WindowHandle splitter, int *range) { + RECT rect; + GetClientRect(splitter, &rect); + range[0] = 0; + if (GetWindowLong(splitter, GWL_STYLE) & CCS_VERT) + range[1] = rect.bottom-rect.top; + else + range[1] = rect.right-rect.left; } void osSetSplitterPosition(WindowHandle splitter, int pos) { + SplitterData *pData = (SplitterData *) GetWindowLong(splitter, GWL_USERDATA); + UpdateSplitterPos(splitter, pData, pos); } int osGetSplitterPosition(WindowHandle splitter) { ! SplitterData *pData = (SplitterData *) GetWindowLong(splitter, GWL_USERDATA); ! return pData->nSplitterPos; } |
From: <br...@us...> - 2004-05-31 12:30:26
|
Update of /cvsroot/htoolkit/HSQL/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23609/src Modified Files: HSQL.hsc Log Message: Parse SqlTimeStamp values like SqlDateTime values, since only MySQL uses SqlTimeStamp, and it returns them on the same format as SqlDateTime. Index: HSQL.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL.hsc,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** HSQL.hsc 27 Apr 2004 19:27:12 -0000 1.13 --- HSQL.hsc 31 May 2004 12:30:15 -0000 1.14 *************** *** 359,363 **** return (mkClockTime year month day hour minutes seconds (tz*3600)) ! fromSqlValue SqlDateTime s = f_read getDateTime s where getDateTime :: ReadP ClockTime --- 359,366 ---- return (mkClockTime year month day hour minutes seconds (tz*3600)) ! -- The only driver which seems to report the type as SqlTimeStamp seems ! -- to be the MySQL driver. MySQL (at least 4.1) uses the same format for datetime and ! -- timestamp columns. ! fromSqlValue t s | t == SqlDateTime || t == SqlTimeStamp = f_read getDateTime s where getDateTime :: ReadP ClockTime *************** *** 376,391 **** return (mkClockTime year month day hour minutes seconds currTZ) - fromSqlValue SqlTimeStamp s = - let - [year,month,day,hour,minutes,seconds] = parts [4,2,2,2,2,2] s - - parts [] xs = [] - parts (ix:ixs) xs = part ix 0 xs - where - part 0 n xs = n : parts ixs xs - part k n (x:xs) = part (k-1) (n*10 + (ord x - ord '0')) xs - in - Just (mkClockTime year month day hour minutes seconds currTZ) - fromSqlValue _ _ = Nothing --- 379,382 ---- |
From: <kr_...@us...> - 2004-05-29 23:00:56
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26069/gio/src/Graphics/UI/GIO Modified Files: Controls.hs Log Message: Complete support for splitters under Linux. The windows versions still isn't ready Index: Controls.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Controls.hs,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** Controls.hs 15 May 2004 06:47:45 -0000 1.44 --- Controls.hs 29 May 2004 23:00:09 -0000 1.45 *************** *** 112,126 **** -- * CompoundControl , CompoundControl, compoundControl ! -- * Notebook -- | A notebook control is analogous to the dividers in a real notebook. ! -- By using a notebook control, an application can define multiple pages for ! -- the same area of a window or dialog box. Each page is represented from -- 'NotebookPage' type and is created from 'notebookPageAt' or 'notebookPage' -- function. , Notebook, notebook, labelsPosition, selectedPage , NotebookPage, notebookPageAt, notebookPage ! ! -- * Splitter , Splitter, hSplitter, vSplitter ) where --- 112,126 ---- -- * CompoundControl , CompoundControl, compoundControl ! -- * Notebook -- | A notebook control is analogous to the dividers in a real notebook. ! -- By using a notebook control, an application can define multiple pages for ! -- the same area of a window or dialog box. Each page is represented from -- 'NotebookPage' type and is created from 'notebookPageAt' or 'notebookPage' -- function. , Notebook, notebook, labelsPosition, selectedPage , NotebookPage, notebookPageAt, notebookPage ! ! -- * Splitter , Splitter, hSplitter, vSplitter ) where *************** *** 144,148 **** | pos == 0 = v : xs | otherwise = x : insertAt (pos-1) v xs ! removeAt :: Int -> [a] -> [a] removeAt pos [] = [] --- 144,148 ---- | pos == 0 = v : xs | otherwise = x : insertAt (pos-1) v xs ! removeAt :: Int -> [a] -> [a] removeAt pos [] = [] *************** *** 436,440 **** return lb ! -- | Create a selection checklist control. A "checklist control" -- displays a list of items where each item in the list has a -- check box next to it. The checklist control is a similar to the --- 436,440 ---- return lb ! -- | Create a selection checklist control. A "checklist control" -- displays a list of items where each item in the list has a -- check box next to it. The checklist control is a similar to the *************** *** 659,663 **** set r props return r ! -- | Create a vertical slider control. vslider :: Container w => [Prop Slider] -> w -> IO Slider --- 659,663 ---- set r props return r ! -- | Create a vertical slider control. vslider :: Container w => [Prop Slider] -> w -> IO Slider *************** *** 679,683 **** instance Control Slider where pack = stdPack sparent shandle Port.getSliderRequestSize ! instance Valued Slider Int where value = selectedPos --- 679,683 ---- instance Control Slider where pack = stdPack sparent shandle Port.getSliderRequestSize ! instance Valued Slider Int where value = selectedPos *************** *** 789,800 **** , vbufferMode :: Var BufferMode , vpaint :: Var PaintFunction ! , vlayout :: Var Layout } -- | Create a compound control compoundControl :: Container w => [Prop CompoundControl] -> w -> IO CompoundControl ! compoundControl props w ! = do c <- do cchandle <- Port.createCompoundControl (hwindow w) ! vpaint <- newVar (\_ _ _ -> return ()) vautosize <- newVar True vlayout <- newVar empty --- 789,805 ---- , vbufferMode :: Var BufferMode , vpaint :: Var PaintFunction ! , vlayout :: Var Layout } -- | Create a compound control compoundControl :: Container w => [Prop CompoundControl] -> w -> IO CompoundControl ! compoundControl props w = do ! c <- Port.createCompoundControl (hwindow w) >>= compoundControlFromHandle (hwindow w) ! set c props ! return c ! ! compoundControlFromHandle :: WindowHandle -> WindowHandle -> IO CompoundControl ! compoundControlFromHandle hwnd hctrl ! = do c <- do vpaint <- newVar (\_ _ _ -> return ()) vautosize <- newVar True vlayout <- newVar empty *************** *** 802,811 **** vpen <- newVar windowPen vbufferMode<- newVar UnBuffered ! return (CompoundControl cchandle (hwindow w) vdomain vautosize vpen vbufferMode vpaint vlayout) recolorCompound c set c [on relayout =:: relayoutCompound] -- just by setting a dummy paint function, we will at least intialize the canvas properly on a repaint set c [on paint =: (\_ _ _ -> return ())] - set c props return c --- 807,815 ---- vpen <- newVar windowPen vbufferMode<- newVar UnBuffered ! return (CompoundControl hctrl hwnd vdomain vautosize vpen vbufferMode vpaint vlayout) recolorCompound c set c [on relayout =:: relayoutCompound] -- just by setting a dummy paint function, we will at least intialize the canvas properly on a repaint set c [on paint =: (\_ _ _ -> return ())] return c *************** *** 1071,1109 **** { splhandle :: !WindowHandle , splparent :: !WindowHandle - , spllayout :: !(Var Layout) } -- | Create a horizontal splitter control. ! hSplitter :: Container w => [Prop Splitter] -> w -> IO Splitter ! hSplitter props w ! = do spl <- do hsplitter <- Port.createHorzSplitter (hwindow w) ! layoutRef <- newVar empty ! return (Splitter hsplitter (hwindow w) layoutRef) ! set spl props ! return spl ! -- | Create a horizontal splitter control. ! vSplitter :: Container w => [Prop Splitter] -> w -> IO Splitter ! vSplitter props w ! = do spl <- do hsplitter <- Port.createVertSplitter (hwindow w) ! layoutRef <- newVar empty ! return (Splitter hsplitter (hwindow w) layoutRef) ! set spl props ! return spl instance Control Splitter where pack = stdPack splparent splhandle Port.getSplitterRequestSize ! instance Container Splitter where ! layout = writeAttr "layout" (\w c -> do ! let new_lay = pack c ! old_lay <- getVar (spllayout w) ! updateControlsVisibility old_lay new_lay ! case extractControls new_lay of ! [(_,hc1),(_,hc2)] -> Port.setSplitterChildren (splhandle w) hc1 hc2 ! _ -> ioError (userError "The layout of the splitter can include only two controls") ! setVar (spllayout w) new_lay) ! autosize = readAttr "autosize" (\w -> return True) ! layoutSize = readAttr "layoutSize" (\w -> getVar (spllayout w) >>= getLayoutSize) ! relayout = newStdEvent splhandle Port.getContainerReLayoutHandler Port.setContainerReLayoutHandler Port.setContainerReLayoutDefHandler ! hwindow = splhandle --- 1075,1104 ---- { splhandle :: !WindowHandle , splparent :: !WindowHandle } -- | Create a horizontal splitter control. ! hSplitter :: Container w => [Prop Splitter] -> w -> IO (Splitter, CompoundControl, CompoundControl) ! hSplitter props w = do ! (hsplitter, hpane1, hpane2) <- Port.createHorzSplitter (hwindow w) ! let spl = Splitter hsplitter (hwindow w) ! pane1 <- compoundControlFromHandle hsplitter hpane1 ! pane2 <- compoundControlFromHandle hsplitter hpane2 ! set spl props ! return (spl,pane1,pane2) ! -- | Create a horizontal splitter control. ! vSplitter :: Container w => [Prop Splitter] -> w -> IO (Splitter, CompoundControl, CompoundControl) ! vSplitter props w = do ! (hsplitter, hpane1, hpane2) <- Port.createVertSplitter (hwindow w) ! let spl = Splitter hsplitter (hwindow w) ! pane1 <- compoundControlFromHandle hsplitter hpane1 ! pane2 <- compoundControlFromHandle hsplitter hpane2 ! set spl props ! return (spl,pane1,pane2) instance Control Splitter where pack = stdPack splparent splhandle Port.getSplitterRequestSize ! instance RangedSelect Splitter where ! range = readAttr "range" (Port.getSplitterRange . splhandle) ! selectedPos = newStdAttr splhandle Port.getSplitterPosition Port.setSplitterPosition |
From: <kr_...@us...> - 2004-05-29 23:00:56
|
Update of /cvsroot/htoolkit/port/src/Port In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26069/port/src/Port Modified Files: Controls.hs Log Message: Complete support for splitters under Linux. The windows versions still isn't ready Index: Controls.hs =================================================================== RCS file: /cvsroot/htoolkit/port/src/Port/Controls.hs,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** Controls.hs 15 May 2004 06:45:45 -0000 1.30 --- Controls.hs 29 May 2004 23:00:10 -0000 1.31 *************** *** 1,3 **** ! {-# OPTIONS -fglasgow-exts -#include Button.h -#include CheckBox.h -#include EditBox.h -#include DateEntry.h -#include Label.h -#include ListBox.h -#include PopUp.h -#include RadioBox.h -#include Window.h -#include ProgressBar.h -#include Slider.h -#include Notebook.h -#include GroupBox.h -#include TrackBar.h #-} ----------------------------------------------------------------------------------------- {-| Module : Controls --- 1,3 ---- ! {-# OPTIONS -fglasgow-exts -#include Button.h -#include CheckBox.h -#include EditBox.h -#include DateEntry.h -#include Label.h -#include ListBox.h -#include PopUp.h -#include RadioBox.h -#include Window.h -#include ProgressBar.h -#include Slider.h -#include Notebook.h -#include GroupBox.h -#include TrackBar.h -#include Splitter.h #-} ----------------------------------------------------------------------------------------- {-| Module : Controls *************** *** 34,38 **** * CompoundControl ! * GroupBox --- 34,38 ---- * CompoundControl ! * GroupBox *************** *** 122,126 **** , createHorzSplitter, createVertSplitter , getSplitterRequestSize ! , setSplitterChildren ) where --- 122,127 ---- , createHorzSplitter, createVertSplitter , getSplitterRequestSize ! , getSplitterRange ! , getSplitterPosition, setSplitterPosition ) where *************** *** 135,139 **** ----------------------------------------------------------------------------------------- ! -- Generic -----------------------------------------------------------------------------------------} -- | Change the position and size of a control. --- 136,140 ---- ----------------------------------------------------------------------------------------- ! -- Generic -----------------------------------------------------------------------------------------} -- | Change the position and size of a control. *************** *** 341,345 **** foreign import ccall "osCreateListBox" createListBox :: WindowHandle -> Bool -> IO WindowHandle ! -- | Create a new checklist box. A "checklist box" displays a list of -- items where each item in the list has a check box next to it. -- The check list box is a similar to the normal list box with multi --- 342,346 ---- foreign import ccall "osCreateListBox" createListBox :: WindowHandle -> Bool -> IO WindowHandle ! -- | Create a new checklist box. A "checklist box" displays a list of -- items where each item in the list has a check box next to it. -- The check list box is a similar to the normal list box with multi *************** *** 619,627 **** ----------------------------------------------------------------------------------------- ! -- | Create a new horizontal splitter control. ! foreign import ccall "osCreateHorzSplitter" createHorzSplitter :: WindowHandle -> IO WindowHandle ! -- | Create a new vertical splitter control. ! foreign import ccall "osCreateVertSplitter" createVertSplitter :: WindowHandle -> IO WindowHandle getSplitterRequestSize :: WindowHandle -> IO Size --- 620,642 ---- ----------------------------------------------------------------------------------------- ! -- | Create a new horizontal or vertical splitter control. ! createHorzSplitter :: WindowHandle -- ^ The handle of the parent ! -> IO (WindowHandle,WindowHandle,WindowHandle) -- ^ The first handle in the tripple are the Splitter handle and the next ! -- two are the handles of first and second panes ! createHorzSplitter hwnd = allocaArray 2 $ \cpanes -> do ! hspl <- osCreateSplitter hwnd False cpanes ! [pane1,pane2] <- peekArray 2 cpanes ! return (hspl,pane1,pane2) ! -- | Create a new horizontal or vertical splitter control. ! createVertSplitter :: WindowHandle -- ^ The handle of the parent ! -> IO (WindowHandle,WindowHandle,WindowHandle) -- ^ The first handle in the tripple are the Splitter handle and the next ! -- two are the handles of first and second panes ! createVertSplitter hwnd = allocaArray 2 $ \cpanes -> do ! hspl <- osCreateSplitter hwnd True cpanes ! [pane1,pane2] <- peekArray 2 cpanes ! return (hspl,pane1,pane2) ! ! foreign import ccall osCreateSplitter :: WindowHandle -> Bool -> Ptr WindowHandle -> IO WindowHandle getSplitterRequestSize :: WindowHandle -> IO Size *************** *** 629,631 **** foreign import ccall osGetSplitterReqSize :: WindowHandle -> Ptr CInt -> IO () ! foreign import ccall "osSetSplitterChildren" setSplitterChildren :: WindowHandle -> WindowHandle -> WindowHandle -> IO () --- 644,654 ---- foreign import ccall osGetSplitterReqSize :: WindowHandle -> Ptr CInt -> IO () ! getSplitterRange :: WindowHandle -> IO (Int, Int) ! getSplitterRange hwnd = allocaArray 2 $ \ptr -> do ! pos <- osGetSplitterRange hwnd ptr ! [min,max] <- peekArray 2 ptr ! return (fromCInt min, fromCInt max) ! foreign import ccall osGetSplitterRange :: WindowHandle -> Ptr CInt -> IO () ! ! foreign import ccall "osSetSplitterPosition" setSplitterPosition :: WindowHandle -> Int -> IO () ! foreign import ccall "osGetSplitterPosition" getSplitterPosition :: WindowHandle -> IO Int |
From: <kr_...@us...> - 2004-05-29 23:00:32
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26069/port/src/cbits/GTK Modified Files: Internals.h Window.c Added Files: Splitter.c Log Message: Complete support for splitters under Linux. The windows versions still isn't ready --- NEW FILE: Splitter.c --- #include "Splitter.h" #include "Internals.h" #include "Handlers_stub.h" WindowHandle osCreateSplitter(WindowHandle window, BOOL isVert, /* out */ WindowHandle *panes) { GtkWidget *paned; if (isVert) paned = gtk_vpaned_new(); else paned = gtk_hpaned_new(); panes[0] = create_generic_window(); gtk_widget_show_all(panes[0]); gtk_paned_add1(GTK_PANED(paned), panes[0]); panes[1] = create_generic_window(); gtk_widget_show_all(panes[1]); gtk_paned_add2(GTK_PANED(paned), panes[1]); port_layout_put(PORT_LAYOUT(GTK_BIN(window)->child), paned); return paned; } void osGetSplitterReqSize(WindowHandle splitter, int *res) { GtkRequisition requisition; gtk_widget_size_request(splitter, &requisition); res[0] = requisition.width; res[1] = requisition.height; } void osGetSplitterRange(WindowHandle splitter, int *range) { range[0] = 0; range[1] = GTK_IS_HPANED(splitter) ? splitter->allocation.width : splitter->allocation.height; } void osSetSplitterPosition(WindowHandle splitter, int pos) { gtk_paned_set_position(GTK_PANED(splitter), pos); } int osGetSplitterPosition(WindowHandle splitter) { return gtk_paned_get_position(GTK_PANED(splitter)); } Index: Internals.h =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Internals.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Internals.h 12 May 2004 20:42:34 -0000 1.8 --- Internals.h 29 May 2004 23:00:10 -0000 1.9 *************** *** 58,60 **** --- 58,62 ---- void osForceContainerReLayout(GtkWidget *widget); + WindowHandle create_generic_window(); + #endif Index: Window.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Window.c,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** Window.c 7 May 2004 07:57:10 -0000 1.45 --- Window.c 29 May 2004 23:00:19 -0000 1.46 *************** *** 166,170 **** } ! static WindowHandle create_generic_window() { GtkWidget *layout, *sw; --- 166,170 ---- } ! WindowHandle create_generic_window() { GtkWidget *layout, *sw; |
From: <kr_...@us...> - 2004-05-29 23:00:30
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26069/port/src/cbits/Win32 Modified Files: Splitter.c Log Message: Complete support for splitters under Linux. The windows versions still isn't ready Index: Splitter.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Splitter.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Splitter.c 17 May 2004 06:19:52 -0000 1.1 --- Splitter.c 29 May 2004 23:00:20 -0000 1.2 *************** *** 1,3 **** ! #include "Splitter.h" #include "Internals.h" #include "Handlers_stub.h" --- 1,3 ---- ! #include "Splitter.h" #include "Internals.h" #include "Handlers_stub.h" *************** *** 18,34 **** rects[2] = rects[0]; ! if (GetWindowLong(hWnd, GWL_STYLE) & CCS_VERT) ! { ! rects[0].top = pData->nSplitterPos-(SPLIT_LINE_SIZE-2)/2; ! rects[0].bottom = pData->nSplitterPos+(SPLIT_LINE_SIZE-2)/2; ! rects[1].bottom = pData->nSplitterPos-SPLIT_LINE_SIZE/2; ! rects[2].top = pData->nSplitterPos+SPLIT_LINE_SIZE/2; ! } ! else ! { ! rects[0].left = pData->nSplitterPos-(SPLIT_LINE_SIZE-2)/2; ! rects[0].right = pData->nSplitterPos+(SPLIT_LINE_SIZE-2)/2; ! rects[1].right = pData->nSplitterPos-SPLIT_LINE_SIZE/2; ! rects[2].left = pData->nSplitterPos+SPLIT_LINE_SIZE/2; } } --- 18,34 ---- rects[2] = rects[0]; ! if (GetWindowLong(hWnd, GWL_STYLE) & CCS_VERT) ! { ! rects[0].top = pData->nSplitterPos-(SPLIT_LINE_SIZE-2)/2; ! rects[0].bottom = pData->nSplitterPos+(SPLIT_LINE_SIZE-2)/2; ! rects[1].bottom = pData->nSplitterPos-SPLIT_LINE_SIZE/2; ! rects[2].top = pData->nSplitterPos+SPLIT_LINE_SIZE/2; ! } ! else ! { ! rects[0].left = pData->nSplitterPos-(SPLIT_LINE_SIZE-2)/2; ! rects[0].right = pData->nSplitterPos+(SPLIT_LINE_SIZE-2)/2; ! rects[1].right = pData->nSplitterPos-SPLIT_LINE_SIZE/2; ! rects[2].left = pData->nSplitterPos+SPLIT_LINE_SIZE/2; } } *************** *** 56,63 **** pData = malloc(sizeof(SplitterData)); pData->nSplitterPos = 100; ! pData->hCtrl1 = NULL; ! pData->hCtrl2 = NULL; SetWindowLong(hWnd, GWL_USERDATA, (LONG) pData); } break; --- 56,83 ---- pData = malloc(sizeof(SplitterData)); pData->nSplitterPos = 100; ! ! pData->hCtrl1 = CreateWindow( ! "HCOMPOUND", ! NULL, ! WS_CHILD | WS_BORDER | WS_HSCROLL | WS_VSCROLL, ! 0,0,0,0, ! hWnd, ! NULL, ! ghModule, ! NULL ! ); ! pData->hCtrl2 = CreateWindow( ! "HCOMPOUND", ! NULL, ! WS_CHILD | WS_BORDER | WS_HSCROLL | WS_VSCROLL, ! 0,0,0,0, ! hWnd, ! NULL, ! ghModule, ! NULL ! ); SetWindowLong(hWnd, GWL_USERDATA, (LONG) pData); + RelayoutPanes(hWnd, pData); } break; *************** *** 69,102 **** RECT rects[3]; PAINTSTRUCT ps; ! HDC hDC = BeginPaint(hWnd, &ps); ! ! CalcPaneRects(hWnd, pData, rects); ! ! FillRect(hDC, &rects[0], GetSysColorBrush(COLOR_BTNFACE)); ! ! if (GetWindowLong(hWnd, GWL_STYLE) & CCS_VERT) ! { ! MoveToEx(hDC, rects[0].left, rects[0].top-1, NULL); ! LineTo(hDC, rects[0].right, rects[0].top-1); ! ! MoveToEx(hDC, rects[0].left, rects[0].bottom+1, NULL); ! LineTo(hDC, rects[0].right, rects[0].bottom+1); ! } ! else ! { ! MoveToEx(hDC, rects[0].left-1, rects[0].top, NULL); ! LineTo(hDC, rects[0].left-1, rects[0].bottom); ! ! MoveToEx(hDC, rects[0].right+1, rects[0].top, NULL); ! LineTo(hDC, rects[0].right+1, rects[0].bottom); ! } ! ! if (!pData->hCtrl1) ! FillRect(hDC, &rects[1], GetSysColorBrush(COLOR_BTNFACE)); ! ! if (!pData->hCtrl2) ! FillRect(hDC, &rects[2], GetSysColorBrush(COLOR_BTNFACE)); ! ! EndPaint(hWnd, &ps); } break; --- 89,122 ---- RECT rects[3]; PAINTSTRUCT ps; ! HDC hDC = BeginPaint(hWnd, &ps); ! ! CalcPaneRects(hWnd, pData, rects); ! ! FillRect(hDC, &rects[0], GetSysColorBrush(COLOR_BTNFACE)); ! ! if (GetWindowLong(hWnd, GWL_STYLE) & CCS_VERT) ! { ! MoveToEx(hDC, rects[0].left, rects[0].top-1, NULL); ! LineTo(hDC, rects[0].right, rects[0].top-1); ! ! MoveToEx(hDC, rects[0].left, rects[0].bottom+1, NULL); ! LineTo(hDC, rects[0].right, rects[0].bottom+1); ! } ! else ! { ! MoveToEx(hDC, rects[0].left-1, rects[0].top, NULL); ! LineTo(hDC, rects[0].left-1, rects[0].bottom); ! ! MoveToEx(hDC, rects[0].right+1, rects[0].top, NULL); ! LineTo(hDC, rects[0].right+1, rects[0].bottom); ! } ! ! if (!pData->hCtrl1) ! FillRect(hDC, &rects[1], GetSysColorBrush(COLOR_BTNFACE)); ! ! if (!pData->hCtrl2) ! FillRect(hDC, &rects[2], GetSysColorBrush(COLOR_BTNFACE)); ! ! EndPaint(hWnd, &ps); } break; *************** *** 111,122 **** } ! WindowHandle osCreateHorzSplitter(WindowHandle window) ! { HWND hSplitter; hSplitter = CreateWindow( "HSPLITTER", NULL, ! WS_CHILD | WS_TABSTOP, 0,0,0,0, window, --- 131,143 ---- } ! WindowHandle osCreateSplitter(WindowHandle window, BOOL isVert, /* out */ WindowHandle *panes) ! { HWND hSplitter; + SplitterData *pData; hSplitter = CreateWindow( "HSPLITTER", NULL, ! WS_CHILD | WS_TABSTOP | (isVert ? CCS_VERT : 0), 0,0,0,0, window, *************** *** 125,148 **** NULL ); - return checkWindow(hSplitter, "HSPLITTER"); - } - - WindowHandle osCreateVertSplitter(WindowHandle window) - { - HWND hSplitter; ! hSplitter = CreateWindow( ! "HSPLITTER", ! NULL, ! WS_CHILD | WS_TABSTOP | CCS_VERT, ! 0,0,0,0, ! window, ! NULL, ! ghModule, ! NULL ! ); ! return checkWindow(hSplitter, "HSPLITTER"); ! } ! void osGetSplitterReqSize(WindowHandle splitter, int *res) { --- 146,157 ---- NULL ); ! pData = (SplitterData *) GetWindowLong(splitter, GWL_USERDATA); ! panes[0] = pData->hCtrl1; ! panes[2] = pData->hCtrl2; ! ! return checkWindow(hSplitter, "HSPLITTER"); ! } ! void osGetSplitterReqSize(WindowHandle splitter, int *res) { *************** *** 151,160 **** } ! void osSetSplitterChildren(WindowHandle splitter, WindowHandle child1, WindowHandle child2) { ! SplitterData *pData = (SplitterData *) GetWindowLong(splitter, GWL_USERDATA); ! pData->hCtrl1 = child1; ! pData->hCtrl2 = child2; ! RelayoutPanes(splitter, pData); ! InvalidateRect(splitter,NULL,TRUE); } --- 160,173 ---- } ! void osGetSplitterRange(WindowHandle splitter, int *range) { ! } ! ! void osSetSplitterPosition(WindowHandle splitter, int pos) ! { ! } ! ! int osGetSplitterPosition(WindowHandle splitter) ! { ! return 0; } |
From: <kr_...@us...> - 2004-05-29 23:00:30
|
Update of /cvsroot/htoolkit/port/src/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26069/port/src/include Modified Files: Splitter.h Log Message: Complete support for splitters under Linux. The windows versions still isn't ready Index: Splitter.h =================================================================== RCS file: /cvsroot/htoolkit/port/src/include/Splitter.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Splitter.h 17 May 2004 06:19:52 -0000 1.1 --- Splitter.h 29 May 2004 23:00:21 -0000 1.2 *************** *** 1,11 **** ! #ifndef SPLITTER_H ! #define SPLITTER_H ! ! #include "Types.h" ! ! WindowHandle osCreateHorzSplitter(WindowHandle window); ! WindowHandle osCreateVertSplitter(WindowHandle window); ! void osGetSplitterReqSize(WindowHandle splitter, int *res); ! void osSetSplitterChildren(WindowHandle splitter, WindowHandle child1, WindowHandle child2); ! ! #endif --- 1,12 ---- ! #ifndef SPLITTER_H ! #define SPLITTER_H ! ! #include "Types.h" ! ! WindowHandle osCreateSplitter(WindowHandle window, BOOL isVert, /* out */ WindowHandle *panes); ! void osGetSplitterReqSize(WindowHandle splitter, int *res); ! void osGetSplitterRange(WindowHandle splitter, int *range); ! void osSetSplitterPosition(WindowHandle splitter, int pos); ! int osGetSplitterPosition(WindowHandle splitter); ! ! #endif |
From: <kr_...@us...> - 2004-05-29 22:27:59
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21328/src/cbits/GTK Modified Files: Slider.c Log Message: bugfix Index: Slider.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Slider.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Slider.c 8 Oct 2003 22:21:57 -0000 1.4 --- Slider.c 29 May 2004 22:27:50 -0000 1.5 *************** *** 56,60 **** GtkAdjustment *adjustment = gtk_range_get_adjustment(GTK_RANGE(slider)); *minPos = adjustment->lower; ! *minPos = adjustment->upper; } --- 56,60 ---- GtkAdjustment *adjustment = gtk_range_get_adjustment(GTK_RANGE(slider)); *minPos = adjustment->lower; ! *maxPos = adjustment->upper; } |
From: <kr_...@us...> - 2004-05-25 21:00:30
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25989/src/cbits/Win32 Modified Files: ToolBar.c Log Message: bugfix Index: ToolBar.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/ToolBar.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** ToolBar.c 16 May 2004 08:20:40 -0000 1.23 --- ToolBar.c 25 May 2004 21:00:19 -0000 1.24 *************** *** 893,897 **** int osGetToolItemPos(ToolHandle toolItem) { ! return SendMessage(toolItem->hToolBar, TB_COMMANDTOINDEX, toolItem->action->id, 0); } --- 893,911 ---- int osGetToolItemPos(ToolHandle toolItem) { ! int i, nButtons; ! TBBUTTON tbb; ! ! nButtons = (int) SendMessage(toolItem->hToolBar, TB_BUTTONCOUNT, 0, 0); ! ! for (i = 0; i < nButtons; i++) ! { ! if (SendMessage(toolItem->hToolBar, TB_GETBUTTON, i, (LPARAM)&tbb) && (tbb.fsStyle & TBSTYLE_SEP) == 0) ! { ! if (((ToolHandle *) tbb.dwData) == toolItem) ! return i; ! } ! } ! ! return -1; } |
From: <kr_...@us...> - 2004-05-25 20:52:49
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24466/src/cbits/Win32 Modified Files: Frame.c Log Message: bugfix Index: Frame.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Frame.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** Frame.c 25 May 2004 20:40:40 -0000 1.30 --- Frame.c 25 May 2004 20:52:40 -0000 1.31 *************** *** 141,144 **** --- 141,152 ---- osDestroyAllActions(); + // destroy all popup menus + while (pData->pActionsMap->popupMenus) + osDestroyMenu(pData->pActionsMap->popupMenus); + + // destroy all menus from the menu bar + while (pData->pActionsMap->menus) + osDestroyMenu(pData->pActionsMap->menus); + // clear StatusBar context stack while (pData->statusContexts) |
From: <kr_...@us...> - 2004-05-25 20:41:03
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22085/src/cbits/GTK Modified Files: Action.c Util.c Log Message: Proper destroying of action handles Index: Action.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Action.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Action.c 16 May 2004 07:59:03 -0000 1.2 --- Action.c 25 May 2004 20:40:39 -0000 1.3 *************** *** 119,128 **** }; - void destroy_all_actions() - { - while (first_action) - osDestroyAction(first_action); - } - ActionHandle osCreateAction() { --- 119,122 ---- *************** *** 410,411 **** --- 404,411 ---- free(action); } + + void osDestroyAllActions() + { + while (first_action) + osDestroyAction(first_action); + } Index: Util.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Util.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Util.c 12 May 2004 20:42:34 -0000 1.21 --- Util.c 25 May 2004 20:40:40 -0000 1.22 *************** *** 100,104 **** { gtk_main(); ! destroy_all_actions(); handleProcessDestroy(); free(gAppTitle); gAppTitle = NULL; --- 100,104 ---- { gtk_main(); ! osDestroyAllActions(); handleProcessDestroy(); free(gAppTitle); gAppTitle = NULL; |
From: <kr_...@us...> - 2004-05-25 20:41:03
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22085/src/cbits/Win32 Modified Files: Action.c ActionsMap.c Frame.c Menu.c Log Message: Proper destroying of action handles Index: Action.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Action.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Action.c 16 May 2004 07:59:02 -0000 1.4 --- Action.c 25 May 2004 20:40:40 -0000 1.5 *************** *** 259,262 **** --- 259,299 ---- { FrameData *pFrameData = (FrameData *) GetWindowLong(ghWndFrame,GWL_USERDATA); + + while (action->toolProxies) + osDestroyToolItem(action->toolProxies); + + while (action->menuProxies) + osDestroyMenu(action->menuProxies); + + handleActionDestroy(action); + deleteActionHandle(pFrameData->pActionsMap, action); } + + void osDestroyAllActions() + { + FrameData *pFrameData = (FrameData *) GetWindowLong(ghWndFrame,GWL_USERDATA); + + for (;;) + { + int i; + ActionHandle action; + + for (i = 0; i < HASH_TABLE_SIZE; i++) + { + action = pFrameData->pActionsMap->HashTable[i]; + if (action) + break; + } + + if (!action) + break; + + + while (action) + { + osDestroyAction(action); + action = pFrameData->pActionsMap->HashTable[i]; + } + } + } Index: ActionsMap.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/ActionsMap.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ActionsMap.c 14 May 2004 23:01:39 -0000 1.1 --- ActionsMap.c 25 May 2004 20:40:40 -0000 1.2 *************** *** 107,112 **** ActionHandle child, *prev; - handleActionDestroy(action); - nHash = (action->id >> 4) % HASH_TABLE_SIZE; prev = &(pMap->HashTable[nHash]); --- 107,110 ---- Index: Frame.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Frame.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Frame.c 16 May 2004 07:55:08 -0000 1.29 --- Frame.c 25 May 2004 20:40:40 -0000 1.30 *************** *** 139,146 **** return 0; case WM_DESTROY: ! handleProcessDestroy(); ! free(pData->lpszAppName); ! free(pData->lpszAppVersion); ! deleteActionsMap(pData->pActionsMap); // clear StatusBar context stack --- 139,143 ---- return 0; case WM_DESTROY: ! osDestroyAllActions(); // clear StatusBar context stack *************** *** 169,172 **** --- 166,175 ---- pData->last_indicator = NULL; + handleProcessDestroy(); + + free(pData->lpszAppName); + free(pData->lpszAppVersion); + deleteActionsMap(pData->pActionsMap); + free(pData); PostQuitMessage(0); Index: Menu.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Menu.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Menu.c 14 May 2004 23:01:39 -0000 1.20 --- Menu.c 25 May 2004 20:40:41 -0000 1.21 *************** *** 142,145 **** --- 142,150 ---- FrameData *pFrameData = (FrameData *) GetWindowLong(ghWndFrame,GWL_USERDATA); + while (handle->children) + osDestroyMenu(handle->children); + + handleMenuDestroy(handle); + if (handle->type != MENU_POPUP) { |
From: <kr_...@us...> - 2004-05-25 20:40:50
|
Update of /cvsroot/htoolkit/port/src/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22085/src/include Modified Files: Action.h Log Message: Proper destroying of action handles Index: Action.h =================================================================== RCS file: /cvsroot/htoolkit/port/src/include/Action.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Action.h 12 May 2004 20:42:34 -0000 1.1 --- Action.h 25 May 2004 20:40:41 -0000 1.2 *************** *** 23,26 **** --- 23,27 ---- void osGetActionAccel(ActionHandle action, int *key, unsigned int *mods); void osDestroyAction(ActionHandle action); + void osDestroyAllActions(); #endif |
From: <kr_...@us...> - 2004-05-17 06:20:01
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv352/cbits/Win32 Added Files: Splitter.c Log Message: Add missing files --- NEW FILE: Splitter.c --- #include "Splitter.h" #include "Internals.h" #include "Handlers_stub.h" typedef struct { int nSplitterPos; HWND hCtrl1, hCtrl2; } SplitterData; #define SPLIT_LINE_SIZE 6 static void CalcPaneRects(HWND hWnd, SplitterData *pData, RECT *rects) { GetClientRect(hWnd, &rects[0]); rects[1] = rects[0]; rects[2] = rects[0]; if (GetWindowLong(hWnd, GWL_STYLE) & CCS_VERT) { rects[0].top = pData->nSplitterPos-(SPLIT_LINE_SIZE-2)/2; rects[0].bottom = pData->nSplitterPos+(SPLIT_LINE_SIZE-2)/2; rects[1].bottom = pData->nSplitterPos-SPLIT_LINE_SIZE/2; rects[2].top = pData->nSplitterPos+SPLIT_LINE_SIZE/2; } else { rects[0].left = pData->nSplitterPos-(SPLIT_LINE_SIZE-2)/2; rects[0].right = pData->nSplitterPos+(SPLIT_LINE_SIZE-2)/2; rects[1].right = pData->nSplitterPos-SPLIT_LINE_SIZE/2; rects[2].left = pData->nSplitterPos+SPLIT_LINE_SIZE/2; } } static void RelayoutPanes(HWND hWnd, SplitterData *pData) { RECT rects[3]; CalcPaneRects(hWnd, pData, rects); if (pData->hCtrl1) MoveWindow(pData->hCtrl1, rects[1].left, rects[1].top, rects[1].right-rects[1].left, rects[1].bottom-rects[1].top, TRUE); if (pData->hCtrl2) MoveWindow(pData->hCtrl2, rects[2].left, rects[2].top, rects[2].right-rects[2].left, rects[2].bottom-rects[2].top, TRUE); } LRESULT CALLBACK HSplitterFunction(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { SplitterData *pData = (SplitterData *) GetWindowLong(hWnd, GWL_USERDATA); switch (uMsg) { case WM_CREATE: { pData = malloc(sizeof(SplitterData)); pData->nSplitterPos = 100; pData->hCtrl1 = NULL; pData->hCtrl2 = NULL; SetWindowLong(hWnd, GWL_USERDATA, (LONG) pData); } break; case WM_DESTROY: free(pData); break; case WM_PAINT: { RECT rects[3]; PAINTSTRUCT ps; HDC hDC = BeginPaint(hWnd, &ps); CalcPaneRects(hWnd, pData, rects); FillRect(hDC, &rects[0], GetSysColorBrush(COLOR_BTNFACE)); if (GetWindowLong(hWnd, GWL_STYLE) & CCS_VERT) { MoveToEx(hDC, rects[0].left, rects[0].top-1, NULL); LineTo(hDC, rects[0].right, rects[0].top-1); MoveToEx(hDC, rects[0].left, rects[0].bottom+1, NULL); LineTo(hDC, rects[0].right, rects[0].bottom+1); } else { MoveToEx(hDC, rects[0].left-1, rects[0].top, NULL); LineTo(hDC, rects[0].left-1, rects[0].bottom); MoveToEx(hDC, rects[0].right+1, rects[0].top, NULL); LineTo(hDC, rects[0].right+1, rects[0].bottom); } if (!pData->hCtrl1) FillRect(hDC, &rects[1], GetSysColorBrush(COLOR_BTNFACE)); if (!pData->hCtrl2) FillRect(hDC, &rects[2], GetSysColorBrush(COLOR_BTNFACE)); EndPaint(hWnd, &ps); } break; case WM_ERASEBKGND: return NULL; case WM_SIZE: RelayoutPanes(hWnd, pData); break; } return DefWindowProc(hWnd, uMsg, wParam, lParam); } WindowHandle osCreateHorzSplitter(WindowHandle window) { HWND hSplitter; hSplitter = CreateWindow( "HSPLITTER", NULL, WS_CHILD | WS_TABSTOP, 0,0,0,0, window, NULL, ghModule, NULL ); return checkWindow(hSplitter, "HSPLITTER"); } WindowHandle osCreateVertSplitter(WindowHandle window) { HWND hSplitter; hSplitter = CreateWindow( "HSPLITTER", NULL, WS_CHILD | WS_TABSTOP | CCS_VERT, 0,0,0,0, window, NULL, ghModule, NULL ); return checkWindow(hSplitter, "HSPLITTER"); } void osGetSplitterReqSize(WindowHandle splitter, int *res) { res[0] = 100; res[1] = 100; } void osSetSplitterChildren(WindowHandle splitter, WindowHandle child1, WindowHandle child2) { SplitterData *pData = (SplitterData *) GetWindowLong(splitter, GWL_USERDATA); pData->hCtrl1 = child1; pData->hCtrl2 = child2; RelayoutPanes(splitter, pData); InvalidateRect(splitter,NULL,TRUE); } |
From: <kr_...@us...> - 2004-05-17 06:20:01
|
Update of /cvsroot/htoolkit/port/src/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv352/include Added Files: Splitter.h Log Message: Add missing files --- NEW FILE: Splitter.h --- #ifndef SPLITTER_H #define SPLITTER_H #include "Types.h" WindowHandle osCreateHorzSplitter(WindowHandle window); WindowHandle osCreateVertSplitter(WindowHandle window); void osGetSplitterReqSize(WindowHandle splitter, int *res); void osSetSplitterChildren(WindowHandle splitter, WindowHandle child1, WindowHandle child2); #endif |
From: <kr_...@us...> - 2004-05-16 08:20:50
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30230/src/cbits/Win32 Modified Files: ToolBar.c Log Message: bugfix Index: ToolBar.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/ToolBar.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ToolBar.c 16 May 2004 07:36:51 -0000 1.22 --- ToolBar.c 16 May 2004 08:20:40 -0000 1.23 *************** *** 827,831 **** tbb.fsState = action->enabled ? TBSTATE_ENABLED : 0; tbb.dwData = (DWORD)btn; - tbb.iString = action->short_title; switch (btn->action->type) --- 827,830 ---- *************** *** 845,848 **** --- 844,851 ---- } + tbb.iString = (INT_PTR) action->short_title; + if (action->short_title) + tbb.fsStyle |= BTNS_SHOWTEXT; + if (pos > 0) SendMessage(toolBar,TB_INSERTBUTTON,pos,(LPARAM)&tbb); |
From: <kr_...@us...> - 2004-05-16 07:59:13
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26621/src/cbits/Win32 Modified Files: Action.c Log Message: Fix memory leaks Index: Action.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Action.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Action.c 16 May 2004 07:55:08 -0000 1.3 --- Action.c 16 May 2004 07:59:02 -0000 1.4 *************** *** 127,130 **** --- 127,131 ---- void osSetActionTip(ActionHandle action, char *text) { + free(action->tooltip); action->tooltip = strdup(text); } *************** *** 137,140 **** --- 138,142 ---- void osSetActionText(ActionHandle action, char *text) { + free(action->title); action->title = strdup(text); } *************** *** 149,152 **** --- 151,155 ---- ToolHandle tool; + free(action->short_title); action->short_title = (text && *text) ? strdup(text) : NULL; |
From: <kr_...@us...> - 2004-05-16 07:59:13
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26621/src/cbits/GTK Modified Files: Action.c Log Message: Fix memory leaks Index: Action.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Action.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Action.c 12 May 2004 20:42:34 -0000 1.1 --- Action.c 16 May 2004 07:59:03 -0000 1.2 *************** *** 239,243 **** --- 239,245 ---- GtkWidget *proxy; + free(action->tooltip); action->tooltip = strdup(text); + for (list = action->proxies; list != NULL; list=list->next) { *************** *** 263,267 **** --- 265,271 ---- char *short_text; + free(action->title); action->title = strdup(text); + text = toMnemonicString(action->title); short_text = toMnemonicString(action->short_title); *************** *** 290,294 **** --- 294,300 ---- GtkWidget *proxy; + free(action->short_title); action->short_title = (text && *text) ? strdup(text) : NULL; + text = toMnemonicString(action->short_title ? action->short_title : action->title); for (list = action->proxies; list != NULL; list=list->next) |
From: <kr_...@us...> - 2004-05-16 07:55:17
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26018/src/cbits/Win32 Modified Files: Action.c Frame.c Log Message: Enable/Disable menu items Index: Action.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Action.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Action.c 16 May 2004 07:36:51 -0000 1.2 --- Action.c 16 May 2004 07:55:08 -0000 1.3 *************** *** 98,101 **** --- 98,103 ---- { ToolHandle tool; + MenuHandle menu; + FrameData *pFrameData = (FrameData *) GetWindowLong(ghWndFrame,GWL_USERDATA); action->enabled = enabled; *************** *** 108,111 **** --- 110,121 ---- tool = tool->nextInAction; } + + menu = action->menuProxies; + while (menu) + { + EnableMenuItem(getParentHMENU(menu), getMenuPos(pFrameData->pActionsMap, menu), (enabled ? MF_ENABLED : MF_GRAYED) | MF_BYPOSITION); + + menu = menu->nextInAction; + } } Index: Frame.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Frame.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Frame.c 15 May 2004 15:00:32 -0000 1.28 --- Frame.c 16 May 2004 07:55:08 -0000 1.29 *************** *** 381,390 **** osDrawBitmap(pt.x, pt.y, action->bitmap, &canvas); ! // Draw bounding frame ! if (action->checked) ! DrawEdge(lpDIS->hDC,&rcFrame,BDR_SUNKENINNER,BF_RECT); ! else ! if (lpDIS->itemState & ODS_SELECTED) ! DrawEdge(lpDIS->hDC,&rcFrame,BDR_RAISEDINNER,BF_RECT); } else --- 381,393 ---- osDrawBitmap(pt.x, pt.y, action->bitmap, &canvas); ! if (action->enabled) ! { ! // Draw bounding frame ! if (action->checked) ! DrawEdge(lpDIS->hDC,&rcFrame,BDR_SUNKENINNER,BF_RECT); ! else ! if (lpDIS->itemState & ODS_SELECTED) ! DrawEdge(lpDIS->hDC,&rcFrame,BDR_RAISEDINNER,BF_RECT); ! } } else *************** *** 419,425 **** SelectObject(lpDIS->hDC, hFillBrush); ! MaskBlt(lpDIS->hDC, ! rcFrame.left, ! rcFrame.top, rcFrame.right-rcFrame.left, rcFrame.bottom-rcFrame.top, --- 422,428 ---- SelectObject(lpDIS->hDC, hFillBrush); ! MaskBlt(lpDIS->hDC, ! rcFrame.left, ! rcFrame.top, rcFrame.right-rcFrame.left, rcFrame.bottom-rcFrame.top, *************** *** 437,441 **** rc.left+=Spacing; ! if (lpDIS->itemState & ODS_GRAYED) { // This will give it a disable text look --- 440,444 ---- rc.left+=Spacing; ! if (!action->enabled) { // This will give it a disable text look |
From: <kr_...@us...> - 2004-05-16 07:37:00
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22736/src/cbits/Win32 Modified Files: ToolBar.c Action.c Log Message: Set the title of the tool buttons Index: ToolBar.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/ToolBar.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ToolBar.c 14 May 2004 23:01:41 -0000 1.21 --- ToolBar.c 16 May 2004 07:36:51 -0000 1.22 *************** *** 800,803 **** --- 800,804 ---- { TBBUTTON tbb; + TBADDBITMAP tbab; ToolHandle btn; *************** *** 812,817 **** action->toolProxies = btn; - TBADDBITMAP tbab; - if (action->bitmap) { --- 813,816 ---- *************** *** 828,832 **** tbb.fsState = action->enabled ? TBSTATE_ENABLED : 0; tbb.dwData = (DWORD)btn; ! tbb.iString = 0; switch (btn->action->type) --- 827,831 ---- tbb.fsState = action->enabled ? TBSTATE_ENABLED : 0; tbb.dwData = (DWORD)btn; ! tbb.iString = action->short_title; switch (btn->action->type) Index: Action.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Action.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Action.c 14 May 2004 23:01:39 -0000 1.1 --- Action.c 16 May 2004 07:36:51 -0000 1.2 *************** *** 127,133 **** void osSetActionText(ActionHandle action, char *text) { ToolHandle tool; ! action->title = strdup(text); tool = action->toolProxies; --- 127,143 ---- void osSetActionText(ActionHandle action, char *text) { + action->title = strdup(text); + } + + char *osGetActionText(ActionHandle action) + { + return strdup(action->title); + } + + void osSetActionShortText(ActionHandle action, char *text) + { ToolHandle tool; ! action->short_title = (text && *text) ? strdup(text) : NULL; tool = action->toolProxies; *************** *** 153,166 **** } - char *osGetActionText(ActionHandle action) - { - return strdup(action->title); - } - - void osSetActionShortText(ActionHandle action, char *text) - { - action->short_title = (text && *text) ? strdup(text) : NULL; - } - char *osGetActionShortText(ActionHandle action) { --- 163,166 ---- |
From: <kr_...@us...> - 2004-05-15 15:00:44
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2244/src/cbits/Win32 Modified Files: Frame.c Log Message: Drawing Check/Radio menu bullets Index: Frame.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Frame.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Frame.c 14 May 2004 23:01:39 -0000 1.27 --- Frame.c 15 May 2004 15:00:32 -0000 1.28 *************** *** 381,388 **** osDrawBitmap(pt.x, pt.y, action->bitmap, &canvas); - // Draw bounding frame ! if (lpDIS->itemState & ODS_SELECTED) ! DrawEdge(lpDIS->hDC,&rcFrame,BDR_RAISEDINNER,BF_RECT); } --- 381,436 ---- osDrawBitmap(pt.x, pt.y, action->bitmap, &canvas); // Draw bounding frame ! if (action->checked) ! DrawEdge(lpDIS->hDC,&rcFrame,BDR_SUNKENINNER,BF_RECT); ! else ! if (lpDIS->itemState & ODS_SELECTED) ! DrawEdge(lpDIS->hDC,&rcFrame,BDR_RAISEDINNER,BF_RECT); ! } ! else ! { ! if (action->checked) ! { ! HDC hMemDC; ! HBITMAP hBmp; ! RECT rc; ! ! hMemDC = CreateCompatibleDC(lpDIS->hDC); ! hBmp = CreateCompatibleBitmap(hMemDC, ! rcFrame.right-rcFrame.left, rcFrame.bottom-rcFrame.top); ! ! SelectObject(hMemDC, hBmp); ! ! rc.left = 0; ! rc.top = 0; ! rc.right = rcFrame.right-rcFrame.left; ! rc.bottom= rcFrame.bottom-rcFrame.top; ! ! switch (action->type) ! { ! case ACTION_CHECK: ! DrawFrameControl(hMemDC, &rc, DFC_MENU, DFCS_MENUCHECK); ! break; ! case ACTION_RADIO: ! DrawFrameControl(hMemDC, &rc, DFC_MENU, DFCS_MENUBULLET); ! break; ! } ! ! SelectObject(lpDIS->hDC, hFillBrush); ! ! MaskBlt(lpDIS->hDC, ! rcFrame.left, ! rcFrame.top, ! rcFrame.right-rcFrame.left, ! rcFrame.bottom-rcFrame.top, ! hMemDC, ! 0, 0, ! hBmp, ! 0, 0, ! MAKEROP4(SRCAND, (lpDIS->itemState & ODS_SELECTED) ? WHITENESS : BLACKNESS)); ! ! DeleteObject(hBmp); ! DeleteDC(hMemDC); ! } } |
From: <kr_...@us...> - 2004-05-15 06:47:58
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9734/src/Graphics/UI/GIO Modified Files: Controls.hs Layout.hs Log Message: Initial support for Splitter Index: Controls.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Controls.hs,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** Controls.hs 25 Nov 2003 15:57:48 -0000 1.43 --- Controls.hs 15 May 2004 06:47:45 -0000 1.44 *************** *** 121,124 **** --- 121,127 ---- , Notebook, notebook, labelsPosition, selectedPage , NotebookPage, notebookPageAt, notebookPage + + -- * Splitter + , Splitter, hSplitter, vSplitter ) where *************** *** 1060,1061 **** --- 1063,1109 ---- instance HasIcon NotebookPage where icon = newStdAttr pghandle Port.getNotebookPageBitmap Port.setNotebookPageBitmap + + -------------------------------------------------------------------- + -- Splitter + -------------------------------------------------------------------- + -- | A Splitter control. + data Splitter = Splitter + { splhandle :: !WindowHandle + , splparent :: !WindowHandle + , spllayout :: !(Var Layout) + } + + -- | Create a horizontal splitter control. + hSplitter :: Container w => [Prop Splitter] -> w -> IO Splitter + hSplitter props w + = do spl <- do hsplitter <- Port.createHorzSplitter (hwindow w) + layoutRef <- newVar empty + return (Splitter hsplitter (hwindow w) layoutRef) + set spl props + return spl + + -- | Create a horizontal splitter control. + vSplitter :: Container w => [Prop Splitter] -> w -> IO Splitter + vSplitter props w + = do spl <- do hsplitter <- Port.createVertSplitter (hwindow w) + layoutRef <- newVar empty + return (Splitter hsplitter (hwindow w) layoutRef) + set spl props + return spl + + instance Control Splitter where + pack = stdPack splparent splhandle Port.getSplitterRequestSize + + instance Container Splitter where + layout = writeAttr "layout" (\w c -> do + let new_lay = pack c + old_lay <- getVar (spllayout w) + updateControlsVisibility old_lay new_lay + case extractControls new_lay of + [(_,hc1),(_,hc2)] -> Port.setSplitterChildren (splhandle w) hc1 hc2 + _ -> ioError (userError "The layout of the splitter can include only two controls") + setVar (spllayout w) new_lay) + autosize = readAttr "autosize" (\w -> return True) + layoutSize = readAttr "layoutSize" (\w -> getVar (spllayout w) >>= getLayoutSize) + relayout = newStdEvent splhandle Port.getContainerReLayoutHandler Port.setContainerReLayoutHandler Port.setContainerReLayoutDefHandler + hwindow = splhandle Index: Layout.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Layout.hs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Layout.hs 19 Oct 2003 10:06:31 -0000 1.10 --- Layout.hs 15 May 2004 06:47:45 -0000 1.11 *************** *** 123,126 **** --- 123,127 ---- , layoutInRect , updateControlsVisibility + , extractControls ) where *************** *** 433,437 **** (Size w h) = rectSize r ! parents = [hwnd | (Control hwnd _ _) <- extractControls layout] parent = head parents --- 434,438 ---- (Size w h) = rectSize r ! parents = map fst (extractControls layout) parent = head parents *************** *** 447,461 **** mapM_ (\c -> Port.setControlVisible c True ) (new_controls \\ old_controls) where ! old_controls = [hwnd | (Control _ hwnd _) <- extractControls old_lay] ! new_controls = [hwnd | (Control _ hwnd _) <- extractControls new_lay] ! ! extractControls :: Layout -> [Layout] extractControls lay = case lay of ! Grid lss -> concat (map (concat . map extractControls) lss) ! Changer f l -> extractControls l ! Empty -> [] ! Control _ h _ -> [lay] --- 448,465 ---- mapM_ (\c -> Port.setControlVisible c True ) (new_controls \\ old_controls) where ! old_controls = map snd (extractControls old_lay) ! new_controls = map snd (extractControls new_lay) ! -- | The 'extractControls' function extracts the list of all controls ! -- which are included in the given 'Layout'. Each control is reperesented ! -- with a tuple of two handles. The first handle is the handle of its parent ! -- and the second is the handle of the control itself. ! extractControls :: Layout -> [(WindowHandle,WindowHandle)] extractControls lay = case lay of ! Grid lss -> concat (map (concat . map extractControls) lss) ! Changer f l -> extractControls l ! Empty -> [] ! Control hp hc _ -> [(hp,hc)] |