/*****************************************************************************
* PreferencesWindow.h
*****************************************************************************
- * Copyright (C) 1999, 2000, 2001 VideoLAN
+ * Copyright (C) 1999, 2000, 2001 the VideoLAN team
* $Id$
*
* Authors: Eric Petit <titer@m0k.org>
*
* 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, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef BEOS_PREFERENCES_WINDOW_H
#include <InterfaceKit.h>
#define PREFS_WINDOW_WIDTH 700
-#define PREFS_WINDOW_HEIGHT 600
+#define PREFS_WINDOW_HEIGHT 400
#define PREFS_ITEM_SELECTED 'pris'
#define PREFS_DEFAULTS 'prde'
#define PREFS_APPLY 'prap'
void FrameResized( float width, float height );
};
+class VTextControl : public BTextControl
+{
+ public:
+ VTextControl( BRect frame, const char *name,
+ const char *label, const char *text,
+ BMessage * message, uint32 resizingMode );
+ void FrameResized( float width, float height );
+};
+
class ConfigWidget : public BView
{
public:
ConfigWidget( intf_thread_t * p_intf, BRect rect,
module_config_t * p_item );
+ ~ConfigWidget();
+ bool InitCheck() { return fInitOK; }
void Apply( bool doIt );
private:
intf_thread_t * p_intf;
+ bool fInitOK;
int fType;
+ char * fName;
- BTextControl * fTextControl;
+ VTextControl * fTextControl;
BCheckBox * fCheckBox;
BPopUpMenu * fPopUpMenu;
BMenuField * fMenuField;
~ConfigItem();
int ObjectId() { return fObjectId; }
BBox * Box() { return fBox; }
+ void UpdateScrollBar();
+ void ResetScroll();
void Apply( bool doIt );
- void Pulse();
private:
intf_thread_t * p_intf;
int fType;
char * fHelp;
- BBox * fBox;
- BScrollView * fScroll;
- BView * fView;
+ BBox * fBox;
VTextView * fTextView;
+ BScrollView * fScroll;
+ BView * fView;
};
class PreferencesWindow : public BWindow
virtual void FrameResized( float, float );
void Update();
- void UpdateScrollBar();
- void ApplyChanges( bool doIt );
- void SaveChanges();
+ void Apply( bool doIt );
void ReallyQuit();
module_config_t ** pp_item,
bool stop_after_category );
- BView * fPrefsView;
- BOutlineListView * fOutline;
- BView * fDummyView;
- BScrollView * fConfigScroll;
- ConfigItem * fCurrent;
+ BView * fPrefsView;
+ BOutlineListView * fOutline;
+ BView * fDummyView;
+ ConfigItem * fCurrent;
- intf_thread_t * p_intf;
+ intf_thread_t * p_intf;
};
#endif // BEOS_PREFERENCES_WINDOW_H