Added a test for BTextView within our app_server

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12543 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2005-05-02 23:15:13 +00:00
parent 03989987d5
commit 48e740c514
3 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,14 @@
SubDir OBOS_TOP src tests servers app textview ;
UseHeaders [ FDirName os app ] ;
UseHeaders [ FDirName os interface ] ;
SimpleTest TextView :
main.cpp
# for running natively under R5:
# : be ;
# for running in the Haiku app_server under R5:
: libopenbeos.so ;
# for running on Haiku:
# : libbe.so ;

View File

@ -0,0 +1,35 @@
#include <Application.h>
#include <TextView.h>
#include <Window.h>
class window : public BWindow {
public:
window() : BWindow(BRect(10, 10, 300, 300), "BTextView test", B_DOCUMENT_WINDOW, B_ASYNCHRONOUS_CONTROLS)
{
BTextView *textview = new BTextView(Bounds(), "textview", Bounds(), B_WILL_DRAW);
AddChild(textview);
textview->MakeFocus();
}
};
class application : public BApplication {
public:
application()
:BApplication("application/x-vnd.test")
{
}
virtual void ReadyToRun()
{
(new window())->Show();
}
};
int main()
{
application app;
app.Run();
return 0;
}

View File

@ -0,0 +1,5 @@
#!/bin/sh
../../../../../distro/x86.R1/beos/system/servers/app_server &
sleep 1s
../../../../../tests/servers/app/textview/TextView