Commit d073ae07 authored by Eric Petit's avatar Eric Petit

* enhanced BeOS preferences window (post-processing, brightness,

   contrast, hue and saturation are adjustable)
parent 434b2322
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* InterfaceWindow.cpp: beos interface * InterfaceWindow.cpp: beos interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: InterfaceWindow.cpp,v 1.7 2002/10/30 06:12:27 titer Exp $ * $Id: InterfaceWindow.cpp,v 1.8 2002/11/23 15:00:54 titer Exp $
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -77,7 +77,15 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name, ...@@ -77,7 +77,15 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name,
p_playlist, p_playlist,
this, this,
p_intf ); p_intf );
fPreferencesWindow = new PreferencesWindow( BRect( 100, 400, 500, 595 ), BScreen *p_screen = new BScreen();
BRect screen_rect = p_screen->Frame();
delete p_screen;
BRect window_rect;
window_rect.Set( ( screen_rect.right - PREFS_WINDOW_WIDTH ) / 2,
( screen_rect.bottom - PREFS_WINDOW_HEIGHT ) / 2,
( screen_rect.right + PREFS_WINDOW_WIDTH ) / 2,
( screen_rect.bottom + PREFS_WINDOW_HEIGHT ) / 2 );
fPreferencesWindow = new PreferencesWindow( window_rect,
"Preferences", "Preferences",
p_intf ); p_intf );
......
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* PreferencesWindow.h * PreferencesWindow.h
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: PreferencesWindow.h,v 1.1 2002/10/28 17:18:18 titer Exp $ * $Id: PreferencesWindow.h,v 1.2 2002/11/23 15:00:54 titer Exp $
* *
* Authors: Eric Petit <titer@videolan.org> * Authors: Eric Petit <titer@videolan.org>
* *
...@@ -26,8 +26,12 @@ ...@@ -26,8 +26,12 @@
#include <Window.h> #include <Window.h>
#define PREFS_WINDOW_WIDTH 400
#define PREFS_WINDOW_HEIGHT 280
#define PREFS_OK 'prok' #define PREFS_OK 'prok'
#define PREFS_CANCEL 'prca' #define PREFS_CANCEL 'prca'
#define PREFS_DEFAULTS 'prde'
#define SLIDER_UPDATE 'slup' #define SLIDER_UPDATE 'slup'
class PreferencesWindow : public BWindow class PreferencesWindow : public BWindow
...@@ -37,19 +41,26 @@ class PreferencesWindow : public BWindow ...@@ -37,19 +41,26 @@ class PreferencesWindow : public BWindow
const char* name, const char* name,
intf_thread_t *p_interface ); intf_thread_t *p_interface );
virtual ~PreferencesWindow(); virtual ~PreferencesWindow();
virtual bool QuitRequested();
virtual void MessageReceived(BMessage *message); virtual void MessageReceived(BMessage *message);
virtual void FrameResized(float width, float height);
void ReallyQuit(); void ReallyQuit();
private: private:
void CancelChanges(); void SetDefaults();
void ApplyChanges(); void ApplyChanges();
intf_thread_t * p_intf; BView * p_prefs_view;
BView * p_preferences_view; BTabView * p_tabview;
BView * p_ffmpeg_view;
BView * p_adjust_view;
BTab * p_ffmpeg_tab;
BTab * p_adjust_tab;
BSlider * p_pp_slider; BSlider * p_pp_slider;
BSlider * p_lum_slider; BSlider * p_contrast_slider;
BSlider * p_brightness_slider;
BSlider * p_hue_slider;
BSlider * p_saturation_slider;
BStringView * p_restart_string; BStringView * p_restart_string;
intf_thread_t * p_intf;
}; };
#endif // BEOS_PREFERENCES_WINDOW_H #endif // BEOS_PREFERENCES_WINDOW_H
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment