1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-28 19:05:51 +01:00

changed panel to use boxes

This commit is contained in:
kojima
2001-01-09 16:45:14 +00:00
parent 35c5908565
commit 22eb14c9d5
8 changed files with 117 additions and 55 deletions

View File

@@ -47,6 +47,16 @@ static W_ViewDelegate delegate = {
static void resizedParent(void *self, WMNotification *notif)
{
WMView *view = (WMView*)WMGetNotificationObject(notif);
WMSize size = WMGetViewSize(view);
WMResizeWidget((WMWidget*)self, size.width, size.height);
}
WMBox*
WMCreateBox(WMWidget *parent)
{
@@ -213,6 +223,16 @@ WMSetBoxHorizontal(WMBox *box, Bool flag)
}
void
WMSetBoxExpandsToParent(WMBox *box)
{
WMAddNotificationObserver(resizedParent, box,
WMViewSizeDidChangeNotification,
W_VIEW(box)->parent);
WMSetViewNotifySizeChanges(W_VIEW(box)->parent, True);
}
static void
destroyBox(Box *bPtr)
{