added font sensitivity and resources

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4236 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
shatty 2003-08-06 20:26:07 +00:00
parent bc0ea15dd4
commit a847fe8446
3 changed files with 108 additions and 7 deletions

View File

@ -1,6 +1,6 @@
SubDir OBOS_TOP src prefs scrollbar ;
#AddResources Time : Time.rsrc ;
AddResources ScrollBar : ScrollBar.rdef ;
Preference ScrollBar : ScrollBar.cpp ;

View File

@ -20,7 +20,7 @@ int main(int, char**)
return 0;
}
ScrollBarApp::ScrollBarApp():BApplication("application/x-vnd.scrollbarpref")
ScrollBarApp::ScrollBarApp():BApplication("application/x-vnd.obos.scroll-bar")
{
BWindow* myWindow = new BWindow( BRect(50,50,398,325), "Scroll Bar", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE );
BBox* bigBox = new BBox( BRect(0,0,348,275), NULL, B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP, B_PLAIN_BORDER );
@ -29,16 +29,24 @@ ScrollBarApp::ScrollBarApp():BApplication("application/x-vnd.scrollbarpref")
BBox* arrowstyleBox = new BBox( BRect( 12, 7, 169, 119) );
arrowstyleBox->SetLabel( "Arrow Style" );
BStringView* doubleStringView = new BStringView( BRect(25,20,60,38), "doubleStringView", "Double:" );
char * doubleLabel = "Double:";
float doubleWidth = mainView->StringWidth(doubleLabel);
BStringView* doubleStringView = new BStringView( BRect(25,20,25+doubleWidth,38), "doubleStringView", doubleLabel );
BView* doublearrowView = new BView( BRect(24,38,157,58), "doublearrowView", B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW );
BStringView* singleStringView = new BStringView( BRect(25,60,60,87), "singleStringView", "Single:" );
char * singleLabel = "Single:";
float singleWidth = mainView->StringWidth(singleLabel);
BStringView* singleStringView = new BStringView( BRect(25,60,25+singleWidth,87), "singleStringView", singleLabel );
BView* singlearrowView = new BView( BRect(24,87,157,107), "singlearrowView", B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW );
BBox* knobtypeBox = new BBox( BRect( 180, 7, 338, 119) );
knobtypeBox->SetLabel( "Knob Type" );
BStringView* proportionalStringView = new BStringView( BRect(193,20,260,38), "proportionalStringView", "Proportional:" );
char * proportionalLabel = "Proportional:";
float proportionalWidth = mainView->StringWidth(proportionalLabel);
BStringView* proportionalStringView = new BStringView( BRect(193,20,193+proportionalWidth,38), "proportionalStringView", proportionalLabel );
BView* proportionalknobView = new BView( BRect(192,38,326,58), "proportionalknobView", B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW );
BStringView* fixedStringView = new BStringView( BRect(193,60,250,87), "fixedStringView", "Fixed:" );
char * fixedLabel = "Fixed:";
float fixedWidth = mainView->StringWidth(fixedLabel);
BStringView* fixedStringView = new BStringView( BRect(193,60,193+fixedWidth,87), "fixedStringView", fixedLabel );
BView* fixedknobView = new BView( BRect(192,87,326,107), "fixedknobView", B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW );
@ -80,4 +88,4 @@ ScrollBarApp::ScrollBarApp():BApplication("application/x-vnd.scrollbarpref")
mainView->AddChild( revertButton );
myWindow->Show();
}
}

View File

@ -0,0 +1,93 @@
/*
** /boot/develop/obos/current/src/prefs/scrollbar/ScrollBar.rdef
**
** Automatically generated by BResourceParser on
** Wednesday, August 06, 2003 at 13:18:26.
**
*/
resource(1, "BEOS:APP_FLAGS") (#'APPF') $"00000000";
resource(1, "BEOS:APP_VERSION") #'APPV' array {
$"0500000000000000000000000500000001000000523500000000000000000000"
$"0000000000000000000000000000000000000000000000000000000000000000"
$"000000000000000000000000000000000000000042654F53203520C2A9313939"
$"312D3230303020426520496E636F72706F726174656400000000000000000000"
$"0000000000000000000000000000000000000000000000000000000000000000"
$"0000000000000000000000000000000000000000000000000000000000000000"
$"0000000000000000000000000000000000000000000000000000000000000000"
$"0000000000000000000000000000000000000000000000000000000000000000"
$"0000000000000000000000000000000000000000000000000000000000000000"
$"0000000000000000000000000000000000000000000000000000000000000000"
$"0000000000000000000000000000000000000080050000000000000000000000"
$"0500000001000000523500000000000000000000000000000000000000000000"
$"0000000000000000000000000000000000000000000000000000000000000000"
$"000000000000000042654F53203520C2A9313939312D3230303020426520496E"
$"636F72706F726174656400000000000000000000000000000000000000000000"
$"0000000000000000000000000000000000000000000000000000000000000000"
$"0000000000000000000000000000000000000000000000000000000000000000"
$"0000000000000000000000000000000000000000000000000000000000000000"
$"0000000000000000000000000000000000000000000000000000000000000000"
$"0000000000000000000000000000000000000000000000000000000000000000"
$"0000000000000000000000000000000000000000000000000000000000000000"
$"0000000000000000"
};
resource(101, "BEOS:L:STD_ICON") #'ICON' array {
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF003F0000FFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF003F3F3F0000FFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFFFF003F1B1C3F3F0000FFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFF003F0000FF003F1B1C1B1C0F00FFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFF003F3F3F00003F1B001C1B0F00FFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFF003F1B1C3F3F00001B0F1C0F00FFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFF003F1B1C1B1C0F001C001B0F00FFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFF003F1B001C1B0F001C1C1B0F00FFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFF003F001B0F1C0F000E1C1C0F00FFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFF003F1B1C001B0F00180F0E0F00FFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFFFF0000000E1C1C1B1C0F001718170F00FFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF007B7B003F0E0F1C1C0E001817180E00FFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF00DA7B7B003F3F0E0F0F000F17180F00FFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFF002B2CDA7B001B1C3F3F0E003F0E0F0F00FFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFF002B2F2F0017171C1C170F001C3F3F0E00FFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFF002B2CEB2F0017171C1C170F001B1C1C0F00FFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFF002B2F2F0000171C1B1C170F001C1B1C0F00FFFFFFFFFF"
$"FFFFFFFFFFFFFFFF002B2CEB2F0000171C1B1C170F000F1C1B0F00FFFFFFFFFF"
$"FFFF000000FFFFFF002B2F2F00FF003F1B1C1B180F003F0E0F0F00FFFFFFFFFF"
$"FF007B7B7B00FF002B2CEB2F00FF000E18171C170F001C3F3F0E00FFFFFFFFFF"
$"007B7B7BDA00FF002B2F2F00FFFF003F0E0F18170F001C1B1C0F000FFFFFFFFF"
$"002B2CDA7B7B002B2CEB2F00FFFF003F3F3F0E0F0F001C001B0F000F0F0FFFFF"
$"FF002B2CDA7B2B2CEB2F00FFFFFF003F1B1C3F3F0E00001C1C0F000E0F0F0F0F"
$"FF002B2CDA7B2B2CEB2F00FFFFFF003F001B1C1B0F001C1C1B0F000F0F0F0FFF"
$"FFFF002B2C2B2B2F2F00FFFFFFFF003F0E1C001C0F000E1C1C0F000E0F0FFFFF"
$"FFFF002B2C2B2B2F2F00FFFFFFFF003F1B001C1B0F00000F0F0F000F0FFFFFFF"
$"FFFFFF002B2CEB2F00FFFFFFFFFF000E1C1C1B1C0F000F0000000F0EFFFFFFFF"
$"FFFFFF002B2CEB2F00FFFFFFFFFF00000E0F1C1C0E000F0F0FFFFFFFFFFFFFFF"
$"FFFFFFFF002B2F000E0F0F0F0F0F0F0F00000E0F0F000F0FFFFFFFFFFFFFFFFF"
$"FFFFFFFF0000000E0F0F0F0F0F0F0F0E0F0F0000000FFFFFFFFFFFFFFFFFFFFF"
};
resource(101, "BEOS:M:STD_ICON") #'MICN' array {
$"FFFFFFFFFFFFFFFFFFFF0000FFFFFFFF"
$"FFFFFFFFFFFFFF0000FF003F0000FFFF"
$"FFFFFFFFFFFFFF003F00001B1800FFFF"
$"FFFFFFFFFFFFFF003F3F001B1800FFFF"
$"FFFFFFFFFFFFFF001B18001B1800FFFF"
$"FFFFFFFFFFFF0000001700000000FFFF"
$"FFFFFFFFFFFF00003F00003F1700FFFF"
$"FFFFFFFFFF007B001B3F001B1C00FFFF"
$"FFFFFFFFFF002F001B18001B1800FFFF"
$"FFFFFFFF002F00001B18001B1800FFFF"
$"FF00FFFF002F0000171700000000FFFF"
$"002B00002F00FF000017001C17000F0F"
$"002B7B2CEB00FF003F00001717000F0F"
$"FF002B2F00FFFF00171C000000000EFF"
$"FF002B2F000E0F000018000F0EFFFFFF"
$"FFFF00000E0F0F0F0F0000FFFFFFFFFF"
};
resource(1, "BEOS:APP_SIG") (#'MIMS') "application/x-vnd.obos.scroll-bar";
resource(2, "BEOS:TYPE") (#'MIMS') "application/x-vnd.Be-elfexecutable";