1 /*****************************************************************************
2 * window.h: Window class
3 *****************************************************************************
4 * Copyright (C) 2003 VideoLAN
5 * $Id: window.h,v 1.5 2003/06/22 12:46:49 asmax Exp $
7 * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
8 * Emmanuel Puig <karibu@via.ecp.fr>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
24 *****************************************************************************/
30 //--- GENERAL ---------------------------------------------------------------
36 //---------------------------------------------------------------------------
43 //---------------------------------------------------------------------------
44 // Constants for scrolling
45 #define MOUSE_SCROLL_UP 0
46 #define MOUSE_SCROLL_DOWN 1
48 //---------------------------------------------------------------------------
53 intf_thread_t *p_intf;
86 vector<GenericControl *> ControlList;
89 SkinWindow( intf_thread_t *_p_intf, int x, int y, bool visible,
90 int transition, int normalalpha, int movealpha, bool dragdrop );
93 virtual ~SkinWindow();
96 bool ProcessEvent( Event *evt );
97 virtual bool ProcessOSEvent( Event *evt ) = 0;
100 void MouseUp( int x, int y, int nutton );
101 void MouseDown( int x, int y, int button );
102 void MouseMove( int x, int y, int button );
103 void MouseDblClick( int x, int y, int button );
104 void SkinWindow::MouseScroll( int x, int y, int direction );
106 // Window graphic aspect
107 bool OnStartThemeVisible;
114 void Refresh( int x, int y, int w, int h );
115 void RefreshImage( int x, int y, int w, int h );
116 virtual void RefreshFromImage( int x, int y, int w, int h ) = 0;
118 void Fade( int To, int Time = 1000, unsigned int evt = 0 );
119 bool IsHidden() { return Hidden; };
121 virtual void OSShow( bool show ) = 0;
122 virtual void SetTransparency( int Value = -1 ) = 0;
123 virtual void WindowManualMove() = 0;
124 virtual void WindowManualMoveInit() = 0;
129 void GetSize( int &w, int &h );
130 void GetPos( int &x, int &y );
131 virtual void Move( int left, int top ) = 0;
132 virtual void Size( int width, int height ) = 0;
135 bool ChangeAlpha( int time );
136 void Init( int start, int end, int time );
139 virtual void ChangeToolTipText( string text ) = 0;
142 list<Anchor *> AnchorList;
145 // Get the interface thread
146 intf_thread_t *GetIntf() { return p_intf; }
148 //---------------------------------------------------------------------------