/* * Author: Andrew Mann * * Copyright (C) 2004 PlaneShift Team (info@planeshift.it, * http://www.planeshift.it) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation (version 2 of the License) * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef PAWS_SCROLL_PANE #define PAWS_SCROLL_PANE #include "paws/pawswidget.h" #define SCROLL_ON_LEFT 0 #define SCROLL_ON_TOP 0 #define SCROLL_ON_RIGHT 1 #define SCROLL_ON_BOTTOM 1 class pawsScrollPane : public pawsWidget { public: pawsScrollPane(PawsManager* manager); virtual ~pawsScrollPane(); // implemented virtual functions from pawsWidgets virtual bool PostSetup(); virtual bool OnScroll( int scrollDirection, pawsScrollBar* widget ); virtual void BringToTop( pawsWidget* widget ); virtual bool Setup( iDocumentNode* node ); virtual bool OnMouseDown( int button, int modifiers, int x, int y ); virtual bool OnMouseUp( int button, int modifiers, int x, int y ); virtual void HandleMouseDrag(); virtual void DrawChildren(); protected: int depth; bool scroll_visible; bool scroll_side; bool scroll_vertical; bool mouse_dragging; csPoint mouse_last_position; pawsScrollBar *pane_scroll; }; CREATE_PAWS_FACTORY( pawsScrollPane ); #endif // #ifndef PAWS_SCROLL_PANE