Implemented *very* basic server-side window creation code
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2904 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ea4ea97733
commit
c0a08539ac
@ -53,13 +53,14 @@ ServerWindow::ServerWindow(BRect rect, const char *string, uint32 wlook,
|
||||
uint32 wfeel, uint32 wflags, ServerApp *winapp, port_id winport, uint32 index)
|
||||
{
|
||||
_title=new BString;
|
||||
_title->SetTo( (string)?string:"Window" );
|
||||
if(string)
|
||||
_title->SetTo(string);
|
||||
_frame=rect;
|
||||
_flags=wflags;
|
||||
_look=wlook;
|
||||
_feel=wfeel;
|
||||
|
||||
_winborder=new WinBorder(_frame,_title->String(),0,wflags,this);
|
||||
_winborder=new WinBorder(_frame,_title->String(),wlook,wfeel,wflags,this);
|
||||
|
||||
// _sender is the monitored window's event port
|
||||
_sender=winport;
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "DisplayDriver.h"
|
||||
#include "Desktop.h"
|
||||
#include "WinBorder.h"
|
||||
#include "AppServer.h" // for new_decorator()
|
||||
|
||||
namespace winborder_private
|
||||
{
|
||||
@ -53,8 +54,8 @@ void set_is_resizing_window(bool state) { winborder_private::is_resizing_window=
|
||||
WinBorder * get_active_winborder(void) { return winborder_private::active_winborder; }
|
||||
void set_active_winborder(WinBorder *win) { winborder_private::active_winborder=win; }
|
||||
|
||||
WinBorder::WinBorder(BRect r, const char *name, int32 resize, int32 flags, ServerWindow *win)
|
||||
: Layer(r,name,resize,flags,win)
|
||||
WinBorder::WinBorder(BRect r, const char *name, int32 look, int32 feel, int32 flags, ServerWindow *win)
|
||||
: Layer(r,name,0,flags,win)
|
||||
{
|
||||
_mbuttons=0;
|
||||
_win=win;
|
||||
@ -67,6 +68,8 @@ WinBorder::WinBorder(BRect r, const char *name, int32 resize, int32 flags, Serve
|
||||
_title=new BString(name);
|
||||
_hresizewin=false;
|
||||
_vresizewin=false;
|
||||
|
||||
_decorator=new_decorator(r,name,look,feel,flags,GetGfxDriver());
|
||||
}
|
||||
|
||||
WinBorder::~WinBorder(void)
|
||||
@ -282,24 +285,24 @@ void WinBorder::MouseUp(int8 *buffer)
|
||||
|
||||
void WinBorder::Draw(BRect update_rect)
|
||||
{
|
||||
/* if(_update && _visible!=NULL)
|
||||
if(_update && _visible!=NULL)
|
||||
_is_updating=true;
|
||||
|
||||
_decorator->Draw(update_rect);
|
||||
|
||||
if(_update && _visible!=NULL)
|
||||
_is_updating=false;
|
||||
*/
|
||||
}
|
||||
|
||||
void WinBorder::RequestDraw(const BRect &r)
|
||||
{
|
||||
_decorator->Draw(r);
|
||||
}
|
||||
|
||||
void WinBorder::RequestDraw(void)
|
||||
{
|
||||
/*
|
||||
//printf("Layer %s::RequestDraw\n",name->String());
|
||||
|
||||
printf("WinBorder %s::RequestDraw\n",_title->String());
|
||||
if(_invalid)
|
||||
{
|
||||
//printf("drew something\n");
|
||||
@ -310,7 +313,6 @@ void WinBorder::RequestDraw(void)
|
||||
_invalid=NULL;
|
||||
_is_dirty=false;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void WinBorder::MoveBy(BPoint pt)
|
||||
|
@ -38,7 +38,7 @@ class DisplayDriver;
|
||||
class WinBorder : public Layer
|
||||
{
|
||||
public:
|
||||
WinBorder(BRect r, const char *name, int32 resize, int32 flags, ServerWindow *win);
|
||||
WinBorder(BRect r, const char *name, int32 look, int32 feel, int32 flags, ServerWindow *win);
|
||||
~WinBorder(void);
|
||||
void RequestDraw(void);
|
||||
void RequestDraw(const BRect &r);
|
||||
|
Loading…
Reference in New Issue
Block a user