Back to index

nux  3.0.0
test-scrollview.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2011 Inalogic Inc.
00003  *
00004  * This program is free software: you can redistribute it and/or modify it
00005  * under the terms of the GNU General Public License version 3, as published
00006  * by the  Free Software Foundation.
00007  *
00008  * This program is distributed in the hope that it will be useful, but
00009  * WITHOUT ANY WARRANTY; without even the implied warranties of
00010  * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
00011  * PURPOSE.  See the GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * version 3 along with this program.  If not, see
00015  * <http://www.gnu.org/licenses/>
00016  *
00017  * Authored by: Andrea Azzarone <azzaronea@gmail.com>
00018  *
00019  */
00020  
00021 #ifndef TEST_SCROLLVIEW_H
00022 #define TEST_SCROLLVIEW_H
00023 
00024 #include "Nux/ScrollView.h"
00025 #include "Nux/VScrollBar.h"
00026 
00027 class TestScrollView: public nux::ScrollView
00028 {
00029   NUX_DECLARE_OBJECT_TYPE(TestView, ScrollView);
00030 public:
00031   TestScrollView(NUX_FILE_LINE_PROTO);
00032   ~TestScrollView();
00033 
00034   nux::Color GetColor() const;
00035   void ResetEvents();
00036   nux::VScrollBar* GetVScrollbar() {return _vscrollbar;}
00037   
00038   bool registered_scroll_;
00039 
00040 protected:
00041   void Draw(nux::GraphicsEngine &graphics_engine, bool force_draw);
00042   void OnScrolling(int hscroll, int vscroll);
00043   
00044 private:
00045   nux::Color normal_color_;
00046   nux::Color current_color_;
00047 
00048 };
00049 
00050 #endif // TEST_VIEW_H
00051