Commit 7f4508b3 authored by Eric Petit's avatar Eric Petit

beos/PreferencesWindow*: fixed widgets

parent 31892994
This diff is collapsed.
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <InterfaceKit.h> #include <InterfaceKit.h>
#define PREFS_WINDOW_WIDTH 700 #define PREFS_WINDOW_WIDTH 700
#define PREFS_WINDOW_HEIGHT 600 #define PREFS_WINDOW_HEIGHT 400
#define PREFS_ITEM_SELECTED 'pris' #define PREFS_ITEM_SELECTED 'pris'
#define PREFS_DEFAULTS 'prde' #define PREFS_DEFAULTS 'prde'
#define PREFS_APPLY 'prap' #define PREFS_APPLY 'prap'
...@@ -41,19 +41,28 @@ class VTextView : public BTextView ...@@ -41,19 +41,28 @@ class VTextView : public BTextView
void FrameResized( float width, float height ); 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 class ConfigWidget : public BView
{ {
public: public:
ConfigWidget( intf_thread_t * p_intf, BRect rect, ConfigWidget( intf_thread_t * p_intf, BRect rect,
module_config_t * p_item ); module_config_t * p_item );
bool InitCheck() { return fInitOK; }
void Apply( bool doIt ); void Apply( bool doIt );
private: private:
intf_thread_t * p_intf; intf_thread_t * p_intf;
int fType; bool fInitOK;
VTextControl * fTextControl;
BTextControl * fTextControl;
BCheckBox * fCheckBox; BCheckBox * fCheckBox;
BPopUpMenu * fPopUpMenu; BPopUpMenu * fPopUpMenu;
BMenuField * fMenuField; BMenuField * fMenuField;
...@@ -73,8 +82,9 @@ class ConfigItem : public BStringItem ...@@ -73,8 +82,9 @@ class ConfigItem : public BStringItem
~ConfigItem(); ~ConfigItem();
int ObjectId() { return fObjectId; } int ObjectId() { return fObjectId; }
BBox * Box() { return fBox; } BBox * Box() { return fBox; }
void UpdateScrollBar();
void ResetScroll();
void Apply( bool doIt ); void Apply( bool doIt );
void Pulse();
private: private:
intf_thread_t * p_intf; intf_thread_t * p_intf;
...@@ -85,9 +95,9 @@ class ConfigItem : public BStringItem ...@@ -85,9 +95,9 @@ class ConfigItem : public BStringItem
char * fHelp; char * fHelp;
BBox * fBox; BBox * fBox;
VTextView * fTextView;
BScrollView * fScroll; BScrollView * fScroll;
BView * fView; BView * fView;
VTextView * fTextView;
}; };
class PreferencesWindow : public BWindow class PreferencesWindow : public BWindow
...@@ -103,7 +113,6 @@ class PreferencesWindow : public BWindow ...@@ -103,7 +113,6 @@ class PreferencesWindow : public BWindow
virtual void FrameResized( float, float ); virtual void FrameResized( float, float );
void Update(); void Update();
void UpdateScrollBar();
void ApplyChanges( bool doIt ); void ApplyChanges( bool doIt );
void SaveChanges(); void SaveChanges();
...@@ -117,7 +126,6 @@ class PreferencesWindow : public BWindow ...@@ -117,7 +126,6 @@ class PreferencesWindow : public BWindow
BView * fPrefsView; BView * fPrefsView;
BOutlineListView * fOutline; BOutlineListView * fOutline;
BView * fDummyView; BView * fDummyView;
BScrollView * fConfigScroll;
ConfigItem * fCurrent; ConfigItem * fCurrent;
intf_thread_t * p_intf; intf_thread_t * p_intf;
......
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