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:
parent
03989987d5
commit
48e740c514
14
src/tests/servers/app/textview/Jamfile
Normal file
14
src/tests/servers/app/textview/Jamfile
Normal 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 ;
|
||||
|
35
src/tests/servers/app/textview/main.cpp
Normal file
35
src/tests/servers/app/textview/main.cpp
Normal 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;
|
||||
}
|
5
src/tests/servers/app/textview/run
Executable file
5
src/tests/servers/app/textview/run
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
../../../../../distro/x86.R1/beos/system/servers/app_server &
|
||||
sleep 1s
|
||||
../../../../../tests/servers/app/textview/TextView
|
Loading…
Reference in New Issue
Block a user