made team monitor resizable
fix build of TeamMonitorTest app git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17220 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -44,7 +44,7 @@ extern "C" void _kshutdown_(bool reboot);
|
|||||||
TMWindow::TMWindow()
|
TMWindow::TMWindow()
|
||||||
: BWindow(BRect(0, 0, 350, 300), "Team Monitor",
|
: BWindow(BRect(0, 0, 350, 300), "Team Monitor",
|
||||||
B_TITLED_WINDOW_LOOK, B_MODAL_ALL_WINDOW_FEEL,
|
B_TITLED_WINDOW_LOOK, B_MODAL_ALL_WINDOW_FEEL,
|
||||||
B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS,
|
B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS,
|
||||||
B_ALL_WORKSPACES),
|
B_ALL_WORKSPACES),
|
||||||
fQuitting(false)
|
fQuitting(false)
|
||||||
{
|
{
|
||||||
@@ -66,8 +66,8 @@ TMWindow::TMWindow()
|
|||||||
point.y = (screenFrame.Height() - Bounds().Height()) / 2;
|
point.y = (screenFrame.Height() - Bounds().Height()) / 2;
|
||||||
|
|
||||||
if (screenFrame.Contains(point))
|
if (screenFrame.Contains(point))
|
||||||
MoveTo(point);
|
MoveTo(point);
|
||||||
|
SetSizeLimits(Bounds().Width(), Bounds().Width()*2, Bounds().Height(), Bounds().Height()*2);
|
||||||
Unlock();
|
Unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,11 +139,11 @@ TMView::TMView(BRect bounds, const char* name, uint32 resizeFlags,
|
|||||||
BFont font = be_plain_font;
|
BFont font = be_plain_font;
|
||||||
|
|
||||||
fListView = new BListView(rect, "teams", B_SINGLE_SELECTION_LIST,
|
fListView = new BListView(rect, "teams", B_SINGLE_SELECTION_LIST,
|
||||||
B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP);
|
B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP_BOTTOM);
|
||||||
fListView->SetSelectionMessage(new BMessage(TM_SELECTED_TEAM));
|
fListView->SetSelectionMessage(new BMessage(TM_SELECTED_TEAM));
|
||||||
|
|
||||||
BScrollView *scrollView = new BScrollView("scroll_teams", fListView,
|
BScrollView *scrollView = new BScrollView("scroll_teams", fListView,
|
||||||
B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP, 0, false, true, B_FANCY_BORDER);
|
B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP_BOTTOM, 0, false, true, B_FANCY_BORDER);
|
||||||
AddChild(scrollView);
|
AddChild(scrollView);
|
||||||
|
|
||||||
rect.left = 10;
|
rect.left = 10;
|
||||||
@@ -152,7 +152,7 @@ TMView::TMView(BRect bounds, const char* name, uint32 resizeFlags,
|
|||||||
rect.right = rect.left + font.StringWidth("Kill Application") + 20;
|
rect.right = rect.left + font.StringWidth("Kill Application") + 20;
|
||||||
|
|
||||||
fKillButton = new BButton(rect, "kill", "Kill Application",
|
fKillButton = new BButton(rect, "kill", "Kill Application",
|
||||||
new BMessage(TM_KILL_APPLICATION), B_FOLLOW_LEFT | B_FOLLOW_TOP);
|
new BMessage(TM_KILL_APPLICATION), B_FOLLOW_LEFT | B_FOLLOW_BOTTOM);
|
||||||
AddChild(fKillButton);
|
AddChild(fKillButton);
|
||||||
fKillButton->SetEnabled(false);
|
fKillButton->SetEnabled(false);
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ TMView::TMView(BRect bounds, const char* name, uint32 resizeFlags,
|
|||||||
rect.bottom = rect.top - 8;
|
rect.bottom = rect.top - 8;
|
||||||
rect.top = fKillButton->Frame().bottom + 8;
|
rect.top = fKillButton->Frame().bottom + 8;
|
||||||
rect.right = bounds.right - 10;
|
rect.right = bounds.right - 10;
|
||||||
fDescView = new TMDescView(rect, B_FOLLOW_ALL);
|
fDescView = new TMDescView(rect, B_FOLLOW_LEFT_RIGHT | B_FOLLOW_BOTTOM);
|
||||||
AddChild(fDescView);
|
AddChild(fDescView);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
SubDir HAIKU_TOP src tests add-ons input_server ;
|
SubDir HAIKU_TOP src tests add-ons input_server ;
|
||||||
|
|
||||||
|
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||||
|
|
||||||
SubDirHdrs $(HAIKU_TOP) src add-ons input_server devices keyboard ;
|
SubDirHdrs $(HAIKU_TOP) src add-ons input_server devices keyboard ;
|
||||||
UsePrivateHeaders input ;
|
UsePrivateHeaders input tracker ;
|
||||||
|
|
||||||
SimpleTest TeamMonitorTest :
|
SimpleTest TeamMonitorTest :
|
||||||
TeamMonitorTest.cpp
|
TeamMonitorTest.cpp
|
||||||
@@ -13,3 +15,4 @@ SimpleTest TeamMonitorTest :
|
|||||||
SEARCH on [ FGristFiles
|
SEARCH on [ FGristFiles
|
||||||
TMWindow.cpp TMListItem.cpp
|
TMWindow.cpp TMListItem.cpp
|
||||||
] = [ FDirName $(HAIKU_TOP) src add-ons input_server devices keyboard ] ;
|
] = [ FDirName $(HAIKU_TOP) src add-ons input_server devices keyboard ] ;
|
||||||
|
|
||||||
|
|||||||
@@ -6,11 +6,16 @@
|
|||||||
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
|
|
||||||
|
#include "KeyboardInputDevice.h"
|
||||||
#include "TMWindow.h"
|
#include "TMWindow.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
FILE *KeyboardInputDevice::sLogFile = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user