Index: src/common/paws/pawstextbox.h =================================================================== --- src/common/paws/pawstextbox.h (revision 5421) +++ src/common/paws/pawstextbox.h (working copy) @@ -188,7 +188,6 @@ void AppendLastMessage( const char* data ); virtual void OnResize(); - virtual void Resize(); virtual bool OnScroll( int direction, pawsScrollBar* widget ); virtual bool OnMouseDown( int button, int modifiers, int x, int y ); @@ -219,7 +218,7 @@ /// Calculates value of the lineHeight attribute void CalcLineHeight(); - csPDelArray adjusted; + csPDelArray messageLines; int lineHeight; size_t maxLines; @@ -229,9 +228,14 @@ pawsScrollBar* scrollBar; private: + void BeforeSetup(); + void AfterSetup(); + pawsScrollBar* GetScrollBar(); static const int INITOFFSET = 20; void WriteMessageLine(MessageLine*& msgLine, csString text, int colour); void WriteMessageSegment(MessageLine*& msgLine, csString text, int colour, int startPosition); + void ResizeMessage(); + void AdjustScrollBar(); csString FindStringThatFits(csString stringBuffer, int canDrawLength); }; Index: src/common/paws/pawscrollbar.cpp =================================================================== --- src/common/paws/pawscrollbar.cpp (revision 5421) +++ src/common/paws/pawscrollbar.cpp (working copy) @@ -132,7 +132,7 @@ attr = node->GetAttribute("tick"); if (attr) tickValue = attr->GetValueAsFloat(); - + // up button settings csRef upNode = node->GetNode("up"); if (upNode) @@ -168,7 +168,7 @@ // down button settings csRef downNode = node->GetNode("down"); - if (upNode) + if (downNode) { attr = downNode->GetAttribute("grey"); if (attr) @@ -265,6 +265,7 @@ { // Create the scroll up/left button upButton = new pawsButton; + upButton->SetName("pawscrollbar::pawsButton::up"); upButton->SetParent( this ); int flags; if (!horizontal) @@ -301,6 +302,7 @@ // Create the scroll down button. downButton = new pawsButton; + downButton->SetName("pawscrollbar::pawsButton::down"); downButton->SetParent( this ); if (!horizontal) { Index: src/common/paws/pawswidget.cpp =================================================================== --- src/common/paws/pawswidget.cpp (revision 5421) +++ src/common/paws/pawswidget.cpp (working copy) @@ -757,6 +757,9 @@ if ( ! LoadAttributes(node) ) return false; + if ( ! LoadChildren(node) ) + return false; + // Call the setup for this widget. if ( !Setup( node ) ) { @@ -767,10 +770,6 @@ //if (name=="ChatWindow") // printf("Chat found."); - if ( ! LoadChildren(node) ) - return false; - - // load scripts after we've loaded all children if (!LoadEventScripts(node)) return false; @@ -850,6 +849,7 @@ } widget = PawsManager::GetSingleton().CreateWidget( factory ); + widget->SetName("pawsWidget::"+factory); CS_ASSERT_MSG("Creating widget from factory name failed.", widget!=NULL); AddChild( widget ); @@ -862,7 +862,6 @@ return false; } } - // Need to load form properties here, because we need to have the children loaded // Get form properties Index: src/common/paws/pawscrollbar.cpp =================================================================== --- src/common/paws/pawscrollbar.cpp (revision 5421) +++ src/common/paws/pawscrollbar.cpp (working copy) @@ -132,7 +132,7 @@ attr = node->GetAttribute("tick"); if (attr) tickValue = attr->GetValueAsFloat(); - + // up button settings csRef upNode = node->GetNode("up"); if (upNode) @@ -168,7 +168,7 @@ // down button settings csRef downNode = node->GetNode("down"); - if (upNode) + if (downNode) { attr = downNode->GetAttribute("grey"); if (attr) @@ -265,6 +265,7 @@ { // Create the scroll up/left button upButton = new pawsButton; + upButton->SetName("pawscrollbar::pawsButton::up"); upButton->SetParent( this ); int flags; if (!horizontal) @@ -301,6 +302,7 @@ // Create the scroll down button. downButton = new pawsButton; + downButton->SetName("pawscrollbar::pawsButton::down"); downButton->SetParent( this ); if (!horizontal) {