* Changed the previous/next icons to the ones intended by zuMi.
* Removed the full-screen icon, since the zoom icon of the window already does the job. * Added an icon for the slide show, but it additionally goes into full-screen mode. * Added appropriate work arounds for bugs in the Interface Kit concerning the hiding of tool-tips, and a bug in the app_server concerning the invalidation of unhidden views... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41065 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -163,10 +163,14 @@ ShowImageWindow::ShowImageWindow(BRect frame, const entry_ref& ref,
|
|||||||
|
|
||||||
// fToolBarView->AddAction(MSG_FILE_OPEN, be_app,
|
// fToolBarView->AddAction(MSG_FILE_OPEN, be_app,
|
||||||
// tool_bar_icon(kIconDocumentOpen), B_TRANSLATE("Open"B_UTF8_ELLIPSIS));
|
// tool_bar_icon(kIconDocumentOpen), B_TRANSLATE("Open"B_UTF8_ELLIPSIS));
|
||||||
fToolBarView->AddAction(MSG_FILE_PREV, this, tool_bar_icon(kIconGoUp),
|
fToolBarView->AddAction(MSG_FILE_PREV, this,
|
||||||
B_TRANSLATE("Previous file"));
|
tool_bar_icon(kIconGoPrevious), B_TRANSLATE("Previous file"));
|
||||||
fToolBarView->AddAction(MSG_FILE_NEXT, this, tool_bar_icon(kIconGoDown),
|
fToolBarView->AddAction(MSG_FILE_NEXT, this, tool_bar_icon(kIconGoNext),
|
||||||
B_TRANSLATE("Next file"));
|
B_TRANSLATE("Next file"));
|
||||||
|
BMessage* fullScreenSlideShow = new BMessage(MSG_SLIDE_SHOW);
|
||||||
|
fullScreenSlideShow->AddBool("full screen", true);
|
||||||
|
fToolBarView->AddAction(fullScreenSlideShow, this,
|
||||||
|
tool_bar_icon(kIconMediaMovieLibrary), B_TRANSLATE("Slide show"));
|
||||||
fToolBarView->AddSeparator();
|
fToolBarView->AddSeparator();
|
||||||
fToolBarView->AddAction(MSG_SELECTION_MODE, this,
|
fToolBarView->AddAction(MSG_SELECTION_MODE, this,
|
||||||
tool_bar_icon(kIconDrawRectangularSelection),
|
tool_bar_icon(kIconDrawRectangularSelection),
|
||||||
@@ -180,9 +184,9 @@ ShowImageWindow::ShowImageWindow(BRect frame, const entry_ref& ref,
|
|||||||
B_TRANSLATE("Zoom in"));
|
B_TRANSLATE("Zoom in"));
|
||||||
fToolBarView->AddAction(MSG_ZOOM_OUT, this, tool_bar_icon(kIconZoomOut),
|
fToolBarView->AddAction(MSG_ZOOM_OUT, this, tool_bar_icon(kIconZoomOut),
|
||||||
B_TRANSLATE("Zoom out"));
|
B_TRANSLATE("Zoom out"));
|
||||||
fToolBarView->AddSeparator();
|
// fToolBarView->AddSeparator();
|
||||||
fToolBarView->AddAction(MSG_FULL_SCREEN, this,
|
// fToolBarView->AddAction(MSG_FULL_SCREEN, this,
|
||||||
tool_bar_icon(kIconViewFullScreen), B_TRANSLATE("Full screen"));
|
// tool_bar_icon(kIconViewFullScreen), B_TRANSLATE("Full screen"));
|
||||||
|
|
||||||
fToolBarView->ResizeTo(viewFrame.Width(), fToolBarView->MinSize().height);
|
fToolBarView->ResizeTo(viewFrame.Width(), fToolBarView->MinSize().height);
|
||||||
|
|
||||||
@@ -875,6 +879,16 @@ ShowImageWindow::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
case MSG_SLIDE_SHOW:
|
case MSG_SLIDE_SHOW:
|
||||||
{
|
{
|
||||||
|
// TODO: Maybe two distinct messages? Also once the tool bar
|
||||||
|
// automatically shows in full screen mode, the icon should
|
||||||
|
// be a pause. There should be a separate icon to leave full
|
||||||
|
// screen mode as well.
|
||||||
|
bool fullScreen;
|
||||||
|
if (message->FindBool("full screen", &fullScreen) == B_OK
|
||||||
|
&& fullScreen) {
|
||||||
|
_ToggleFullScreen();
|
||||||
|
}
|
||||||
|
|
||||||
BMenuItem* item = fBar->FindItem(message->what);
|
BMenuItem* item = fBar->FindItem(message->what);
|
||||||
if (item == NULL)
|
if (item == NULL)
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -167,6 +167,82 @@ static const uint8 kEditCopy[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static const uint8 kEditCut[] = {
|
||||||
|
0x6e, 0x63, 0x69, 0x66, 0x06, 0x05, 0x54, 0x03, 0x80, 0x00, 0x00, 0x02,
|
||||||
|
0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x00, 0xc0, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x47, 0x7f, 0xff, 0x00, 0xe6, 0xea,
|
||||||
|
0xf2, 0xff, 0xce, 0xd2, 0xd9, 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00,
|
||||||
|
0x3a, 0x40, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00,
|
||||||
|
0x4a, 0x30, 0x00, 0x00, 0xff, 0xab, 0xab, 0xff, 0xd9, 0x00, 0x00, 0x05,
|
||||||
|
0xff, 0x04, 0x00, 0x66, 0x04, 0x06, 0x05, 0x4b, 0x00, 0x32, 0x24, 0x32,
|
||||||
|
0x26, 0x32, 0xb3, 0xcb, 0x30, 0x1f, 0x2e, 0x38, 0x32, 0x02, 0x04, 0x28,
|
||||||
|
0x3c, 0xb7, 0x11, 0x3c, 0xb5, 0x4e, 0x3c, 0x24, 0x42, 0x24, 0xbf, 0x3a,
|
||||||
|
0x24, 0xc1, 0xdd, 0x28, 0x48, 0xb5, 0x4e, 0x48, 0xb7, 0x11, 0x48, 0x2c,
|
||||||
|
0x42, 0x2c, 0xc1, 0xdd, 0x2c, 0xbf, 0x3a, 0x02, 0x04, 0x32, 0x38, 0x32,
|
||||||
|
0x38, 0x32, 0x3c, 0x2e, 0x42, 0x2e, 0x3e, 0x2e, 0x42, 0x2a, 0x42, 0x2a,
|
||||||
|
0x42, 0x2a, 0x3e, 0x2e, 0x38, 0x2e, 0x3c, 0x2e, 0x38, 0x0a, 0x04, 0x30,
|
||||||
|
0x32, 0x2e, 0x34, 0x2e, 0x1f, 0x30, 0x1f, 0x15, 0x0a, 0x05, 0x01, 0x00,
|
||||||
|
0x12, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91, 0x3f, 0xc9,
|
||||||
|
0x71, 0x47, 0x97, 0xb6, 0xba, 0xfe, 0xcc, 0x01, 0x17, 0x84, 0x02, 0x04,
|
||||||
|
0x0a, 0x05, 0x01, 0x01, 0x12, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc,
|
||||||
|
0x93, 0x91, 0x3f, 0xc9, 0x71, 0x47, 0x97, 0xb6, 0xba, 0xfe, 0xcc, 0x01,
|
||||||
|
0x17, 0x88, 0x00, 0x04, 0x0a, 0x05, 0x01, 0x02, 0x12, 0x3f, 0xc9, 0x71,
|
||||||
|
0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91, 0x3f, 0xc9, 0x71, 0x47, 0x97, 0xb6,
|
||||||
|
0xba, 0xfe, 0xcc, 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x00, 0x01, 0x00,
|
||||||
|
0x12, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91, 0x3f, 0xc9,
|
||||||
|
0x71, 0x47, 0x17, 0xb6, 0xc2, 0x2f, 0xec, 0x01, 0x17, 0x84, 0x02, 0x04,
|
||||||
|
0x0a, 0x01, 0x01, 0x01, 0x12, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc,
|
||||||
|
0x93, 0x91, 0x3f, 0xc9, 0x71, 0x47, 0x17, 0xb6, 0xc2, 0x2f, 0xec, 0x01,
|
||||||
|
0x17, 0x88, 0x00, 0x04, 0x0a, 0x01, 0x01, 0x02, 0x12, 0x3f, 0xc9, 0x71,
|
||||||
|
0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91, 0x3f, 0xc9, 0x71, 0x47, 0x17, 0xb6,
|
||||||
|
0xc2, 0x2f, 0xec, 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x02, 0x01, 0x00,
|
||||||
|
0x02, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91, 0x3f, 0xc9,
|
||||||
|
0x71, 0x47, 0x17, 0xb6, 0xc2, 0x2f, 0xec, 0x0a, 0x03, 0x01, 0x01, 0x12,
|
||||||
|
0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91, 0x3f, 0xc9, 0x71,
|
||||||
|
0x47, 0x17, 0xb6, 0xc2, 0x2f, 0xec, 0x01, 0x17, 0x83, 0x00, 0x04, 0x0a,
|
||||||
|
0x03, 0x01, 0x02, 0x02, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc, 0x93,
|
||||||
|
0x91, 0x3f, 0xc9, 0x71, 0x47, 0x17, 0xb6, 0xc2, 0x2f, 0xec, 0x0a, 0x04,
|
||||||
|
0x01, 0x03, 0x02, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91,
|
||||||
|
0x3f, 0xc9, 0x71, 0x47, 0x17, 0xb6, 0xc2, 0x2f, 0xec, 0x0a, 0x00, 0x00,
|
||||||
|
0x20, 0xb4, 0xe4, 0xb2, 0xf3, 0x0a, 0x05, 0x01, 0x00, 0x12, 0xbf, 0xc9,
|
||||||
|
0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95, 0x49, 0x64,
|
||||||
|
0x70, 0xba, 0xf9, 0xaa, 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x05, 0x01,
|
||||||
|
0x01, 0x12, 0xbf, 0xc9, 0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f,
|
||||||
|
0xc9, 0x95, 0x49, 0x64, 0x70, 0xba, 0xf9, 0xaa, 0x01, 0x17, 0x88, 0x00,
|
||||||
|
0x04, 0x0a, 0x05, 0x01, 0x02, 0x12, 0xbf, 0xc9, 0x85, 0x3c, 0x92, 0xb1,
|
||||||
|
0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95, 0x49, 0x64, 0x70, 0xba, 0xf9, 0xaa,
|
||||||
|
0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x00, 0x01, 0x00, 0x12, 0xbf, 0xc9,
|
||||||
|
0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95, 0x49, 0x24,
|
||||||
|
0x70, 0xc2, 0x2f, 0x9a, 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x01, 0x01,
|
||||||
|
0x01, 0x12, 0xbf, 0xc9, 0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f,
|
||||||
|
0xc9, 0x95, 0x49, 0x24, 0x70, 0xc2, 0x2f, 0x9a, 0x01, 0x17, 0x88, 0x00,
|
||||||
|
0x04, 0x0a, 0x01, 0x01, 0x02, 0x12, 0xbf, 0xc9, 0x85, 0x3c, 0x92, 0xb1,
|
||||||
|
0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95, 0x49, 0x24, 0x70, 0xc2, 0x2f, 0x9a,
|
||||||
|
0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x02, 0x01, 0x00, 0x02, 0xbf, 0xc9,
|
||||||
|
0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95, 0x49, 0x24,
|
||||||
|
0x70, 0xc2, 0x2f, 0x9a, 0x0a, 0x03, 0x01, 0x01, 0x12, 0xbf, 0xc9, 0x85,
|
||||||
|
0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95, 0x49, 0x24, 0x70,
|
||||||
|
0xc2, 0x2f, 0x9a, 0x01, 0x17, 0x83, 0x00, 0x04, 0x0a, 0x03, 0x01, 0x02,
|
||||||
|
0x02, 0xbf, 0xc9, 0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f, 0xc9,
|
||||||
|
0x95, 0x49, 0x24, 0x70, 0xc2, 0x2f, 0x9a, 0x0a, 0x04, 0x01, 0x03, 0x02,
|
||||||
|
0xbf, 0xc9, 0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95,
|
||||||
|
0x49, 0x24, 0x70, 0xc2, 0x2f, 0x9a
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const unsigned char kEditDelete[] = {
|
||||||
|
0x6e, 0x63, 0x69, 0x66, 0x03, 0x04, 0x00, 0x66, 0x03, 0x80, 0x00, 0x00,
|
||||||
|
0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x20, 0x00, 0xc0, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xe0, 0x00, 0x00, 0xff,
|
||||||
|
0xab, 0xab, 0xff, 0xd9, 0x00, 0x00, 0x01, 0x0a, 0x0c, 0x48, 0x2a, 0x40,
|
||||||
|
0x22, 0x35, 0x2d, 0x2a, 0x22, 0x22, 0x2a, 0x2d, 0x35, 0x22, 0x40, 0x2a,
|
||||||
|
0x48, 0x35, 0x3d, 0x40, 0x48, 0x48, 0x40, 0x3d, 0x35, 0x03, 0x0a, 0x00,
|
||||||
|
0x01, 0x00, 0x30, 0x22, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x01,
|
||||||
|
0x01, 0x00, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x02, 0x01, 0x00,
|
||||||
|
0x00
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
static const uint8 kEditTrash[] = {
|
static const uint8 kEditTrash[] = {
|
||||||
0x6e, 0x63, 0x69, 0x66, 0x05, 0x04, 0x00, 0x66, 0x05, 0x00, 0x03, 0x08,
|
0x6e, 0x63, 0x69, 0x66, 0x05, 0x04, 0x00, 0x66, 0x05, 0x00, 0x03, 0x08,
|
||||||
0x59, 0x3e, 0x02, 0x00, 0x16, 0x02, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00,
|
0x59, 0x3e, 0x02, 0x00, 0x16, 0x02, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00,
|
||||||
@@ -195,6 +271,30 @@ static const uint8 kGoDown[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const unsigned char kGoNext[] = {
|
||||||
|
0x6e, 0x63, 0x69, 0x66, 0x03, 0x04, 0x00, 0x66, 0x03, 0x00, 0x59, 0x00,
|
||||||
|
0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0, 0x00, 0x00, 0x80,
|
||||||
|
0xff, 0x80, 0xff, 0x00, 0xb3, 0x00, 0x01, 0x0a, 0x07, 0x48, 0x35, 0x34,
|
||||||
|
0x48, 0x34, 0x3e, 0x22, 0x3e, 0x22, 0x2c, 0x34, 0x2c, 0x34, 0x22, 0x03,
|
||||||
|
0x0a, 0x00, 0x01, 0x00, 0x30, 0x22, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04,
|
||||||
|
0x0a, 0x01, 0x01, 0x00, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x02,
|
||||||
|
0x01, 0x00, 0x00
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const unsigned char kGoPrevious[] = {
|
||||||
|
0x6e, 0x63, 0x69, 0x66, 0x03, 0x04, 0x00, 0x66, 0x03, 0x00, 0x59, 0x00,
|
||||||
|
0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0, 0x00, 0x00, 0x80,
|
||||||
|
0xff, 0x80, 0xff, 0x00, 0xb3, 0x00, 0x01, 0x0a, 0x07, 0x22, 0x35, 0x36,
|
||||||
|
0x22, 0x36, 0x2c, 0x48, 0x2c, 0x48, 0x3e, 0x36, 0x3e, 0x36, 0x48, 0x03,
|
||||||
|
0x0a, 0x00, 0x01, 0x00, 0x30, 0x22, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04,
|
||||||
|
0x0a, 0x01, 0x01, 0x00, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x02,
|
||||||
|
0x01, 0x00, 0x00
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
static const uint8 kGoUp[] = {
|
static const uint8 kGoUp[] = {
|
||||||
0x6e, 0x63, 0x69, 0x66, 0x03, 0x04, 0x00, 0x66, 0x03, 0xbf, 0x50, 0x00,
|
0x6e, 0x63, 0x69, 0x66, 0x03, 0x04, 0x00, 0x66, 0x03, 0xbf, 0x50, 0x00,
|
||||||
0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00,
|
0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00,
|
||||||
@@ -207,6 +307,58 @@ static const uint8 kGoUp[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const unsigned char kMediaMovieLibraryR4[] = {
|
||||||
|
0x6e, 0x63, 0x69, 0x66, 0x06, 0x05, 0x00, 0x02, 0x00, 0x16, 0x02, 0x00,
|
||||||
|
0x00, 0x00, 0x3a, 0x40, 0x08, 0xc0, 0x00, 0x01, 0x00, 0x00, 0x00, 0x4b,
|
||||||
|
0xff, 0xf9, 0x49, 0xe0, 0x04, 0x00, 0x82, 0xff, 0x29, 0x02, 0x00, 0x16,
|
||||||
|
0x02, 0x00, 0x00, 0x00, 0x39, 0x80, 0x10, 0xc0, 0x00, 0x01, 0x00, 0x00,
|
||||||
|
0x00, 0x4b, 0xff, 0xfd, 0x49, 0xe0, 0x04, 0x00, 0x82, 0xff, 0x29, 0x05,
|
||||||
|
0x54, 0x02, 0x00, 0x16, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x40, 0x00, 0xc0,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x4b, 0xff, 0xfb, 0x46, 0xc0, 0x00, 0x00,
|
||||||
|
0xff, 0xff, 0xe6, 0x04, 0x00, 0x66, 0x09, 0x0a, 0x04, 0x28, 0x36, 0x42,
|
||||||
|
0x36, 0x42, 0x48, 0x28, 0x48, 0x0a, 0x04, 0x22, 0x38, 0x22, 0x46, 0x28,
|
||||||
|
0x42, 0x28, 0x3c, 0x02, 0x04, 0x3f, 0x22, 0xc1, 0x54, 0x22, 0xbd, 0x5f,
|
||||||
|
0x22, 0x36, 0x2b, 0x36, 0xb5, 0x67, 0x36, 0xb9, 0x5c, 0x3f, 0x34, 0xbd,
|
||||||
|
0x5f, 0x34, 0xc1, 0x54, 0x34, 0x48, 0x2b, 0x48, 0xb9, 0x5c, 0x48, 0xb5,
|
||||||
|
0x67, 0x06, 0x04, 0xef, 0x46, 0x2b, 0x46, 0xb7, 0x04, 0x46, 0xb7, 0xbf,
|
||||||
|
0xc1, 0xef, 0xb8, 0x6a, 0xc2, 0x10, 0xb8, 0x18, 0xc1, 0xef, 0xb8, 0x6a,
|
||||||
|
0x41, 0x2b, 0xc1, 0xf0, 0xb6, 0x59, 0xc1, 0xf0, 0xb6, 0x59, 0xc2, 0x10,
|
||||||
|
0xb6, 0xab, 0x06, 0x03, 0x3b, 0xc1, 0x88, 0xb5, 0xa9, 0xc1, 0x19, 0xb5,
|
||||||
|
0x1d, 0xc1, 0x88, 0xb5, 0xa9, 0x40, 0xb6, 0xb1, 0x40, 0xb4, 0xa2, 0x40,
|
||||||
|
0xb4, 0xa2, 0xc0, 0x79, 0xb4, 0xbc, 0x06, 0x03, 0x37, 0x3e, 0xb4, 0xa2,
|
||||||
|
0xbe, 0x3a, 0xb4, 0xbc, 0x3e, 0xb4, 0xa2, 0xb6, 0xb1, 0xbd, 0x2b, 0xb5,
|
||||||
|
0xa9, 0xbd, 0x2b, 0xb5, 0xa9, 0xbd, 0x9a, 0xb5, 0x1d, 0x06, 0x04, 0xfb,
|
||||||
|
0xbc, 0xc4, 0xb6, 0x59, 0xbc, 0xa3, 0xb6, 0xab, 0xbc, 0xc4, 0xb6, 0x59,
|
||||||
|
0x3d, 0x2b, 0xbc, 0xc3, 0xb8, 0x6a, 0xbc, 0xc3, 0xb8, 0x6a, 0xbc, 0xa3,
|
||||||
|
0xb8, 0x18, 0x38, 0x2b, 0x38, 0xb7, 0xbf, 0x38, 0xb7, 0x04, 0x06, 0x03,
|
||||||
|
0x3b, 0xbd, 0x2b, 0xb9, 0x1a, 0xbd, 0x9a, 0xb9, 0xa6, 0xbd, 0x2b, 0xb9,
|
||||||
|
0x1a, 0x3e, 0xb8, 0x12, 0x3e, 0xba, 0x21, 0x3e, 0xba, 0x21, 0xbe, 0x3a,
|
||||||
|
0xba, 0x06, 0x06, 0x03, 0x37, 0x40, 0xba, 0x21, 0xc0, 0x79, 0xba, 0x06,
|
||||||
|
0x40, 0xba, 0x21, 0xb8, 0x12, 0xc1, 0x88, 0xb9, 0x1a, 0xc1, 0x88, 0xb9,
|
||||||
|
0x1a, 0xc1, 0x19, 0xb9, 0xa6, 0x09, 0x0a, 0x05, 0x03, 0x00, 0x01, 0x02,
|
||||||
|
0x30, 0x22, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x05, 0x01, 0x02,
|
||||||
|
0x30, 0x0e, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x00, 0x02, 0x00,
|
||||||
|
0x01, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x01, 0x01, 0x00, 0x00,
|
||||||
|
0x0a, 0x02, 0x01, 0x01, 0x00, 0x0a, 0x03, 0x07, 0x08, 0x07, 0x06, 0x05,
|
||||||
|
0x04, 0x03, 0x02, 0x10, 0x01, 0x17, 0x83, 0x00, 0x04, 0x0a, 0x04, 0x07,
|
||||||
|
0x02, 0x03, 0x07, 0x08, 0x05, 0x06, 0x04, 0x00, 0x0a, 0x03, 0x07, 0x08,
|
||||||
|
0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x30, 0x0c, 0x20, 0x01, 0x17, 0x83,
|
||||||
|
0x00, 0x04, 0x0a, 0x04, 0x07, 0x02, 0x03, 0x07, 0x08, 0x05, 0x06, 0x04,
|
||||||
|
0x20, 0x0c, 0x20
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const unsigned char kMediaPlaybackStartEnabled[] = {
|
||||||
|
0x6e, 0x63, 0x69, 0x66, 0x03, 0x04, 0x00, 0x66, 0x03, 0x00, 0x59, 0x00,
|
||||||
|
0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0, 0x00, 0x00, 0x80,
|
||||||
|
0xff, 0x80, 0xff, 0x00, 0xb2, 0x00, 0x01, 0x0a, 0x03, 0x46, 0x35, 0x24,
|
||||||
|
0xb3, 0xcb, 0x24, 0x48, 0x03, 0x0a, 0x00, 0x01, 0x00, 0x30, 0x22, 0x22,
|
||||||
|
0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x01, 0x01, 0x00, 0x10, 0x01, 0x17,
|
||||||
|
0x83, 0x22, 0x04, 0x0a, 0x02, 0x01, 0x00, 0x00
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
static const uint8 kViewFullScreen[] = {
|
static const uint8 kViewFullScreen[] = {
|
||||||
0x6e, 0x63, 0x69, 0x66, 0x07, 0x04, 0x00, 0x66, 0x03, 0xbf, 0x50, 0x00,
|
0x6e, 0x63, 0x69, 0x66, 0x07, 0x04, 0x00, 0x66, 0x03, 0xbf, 0x50, 0x00,
|
||||||
0x03, 0xff, 0xd4, 0x00, 0x02, 0x02, 0x06, 0x02, 0x3b, 0x00, 0x00, 0x00,
|
0x03, 0xff, 0xd4, 0x00, 0x02, 0x02, 0x06, 0x02, 0x3b, 0x00, 0x00, 0x00,
|
||||||
@@ -370,8 +522,14 @@ static IconData kIcons[] = {
|
|||||||
{ kDocumentSave, sizeof(kDocumentSave), NULL },
|
{ kDocumentSave, sizeof(kDocumentSave), NULL },
|
||||||
{ kDrawRectangularSelection, sizeof(kDrawRectangularSelection), NULL },
|
{ kDrawRectangularSelection, sizeof(kDrawRectangularSelection), NULL },
|
||||||
{ kEditCopy, sizeof(kEditCopy), NULL },
|
{ kEditCopy, sizeof(kEditCopy), NULL },
|
||||||
|
{ kEditCut, sizeof(kEditCut), NULL },
|
||||||
|
{ kEditDelete, sizeof(kEditDelete), NULL },
|
||||||
{ kEditTrash, sizeof(kEditTrash), NULL },
|
{ kEditTrash, sizeof(kEditTrash), NULL },
|
||||||
|
{ kMediaMovieLibraryR4, sizeof(kMediaMovieLibraryR4), NULL },
|
||||||
|
{ kMediaPlaybackStartEnabled, sizeof(kMediaPlaybackStartEnabled), NULL },
|
||||||
{ kGoDown, sizeof(kGoDown), NULL },
|
{ kGoDown, sizeof(kGoDown), NULL },
|
||||||
|
{ kGoNext, sizeof(kGoNext), NULL },
|
||||||
|
{ kGoPrevious, sizeof(kGoPrevious), NULL },
|
||||||
{ kGoUp, sizeof(kGoUp), NULL },
|
{ kGoUp, sizeof(kGoUp), NULL },
|
||||||
{ kViewFullScreen, sizeof(kViewFullScreen), NULL },
|
{ kViewFullScreen, sizeof(kViewFullScreen), NULL },
|
||||||
{ kZoomFitBest, sizeof(kZoomFitBest), NULL },
|
{ kZoomFitBest, sizeof(kZoomFitBest), NULL },
|
||||||
|
|||||||
@@ -17,8 +17,14 @@ enum {
|
|||||||
kIconDocumentSave,
|
kIconDocumentSave,
|
||||||
kIconDrawRectangularSelection,
|
kIconDrawRectangularSelection,
|
||||||
kIconEditCopy,
|
kIconEditCopy,
|
||||||
|
kIconEditCut,
|
||||||
|
kIconEditDelete,
|
||||||
kIconEditTrash,
|
kIconEditTrash,
|
||||||
|
kIconMediaMovieLibrary,
|
||||||
|
kIconMediaPlaybackStartEnabled,
|
||||||
kIconGoDown,
|
kIconGoDown,
|
||||||
|
kIconGoNext,
|
||||||
|
kIconGoPrevious,
|
||||||
kIconGoUp,
|
kIconGoUp,
|
||||||
kIconViewFullScreen,
|
kIconViewFullScreen,
|
||||||
kIconZoomFitBest,
|
kIconZoomFitBest,
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ ToolBarView::ToolBarView(BRect frame)
|
|||||||
|
|
||||||
GroupLayout()->AddItem(BSpaceLayoutItem::CreateGlue());
|
GroupLayout()->AddItem(BSpaceLayoutItem::CreateGlue());
|
||||||
|
|
||||||
|
SetFlags(Flags() | B_FRAME_EVENTS | B_PULSE_NEEDED);
|
||||||
|
|
||||||
MoveTo(frame.LeftTop());
|
MoveTo(frame.LeftTop());
|
||||||
ResizeTo(frame.Width(), frame.Height());
|
ResizeTo(frame.Width(), frame.Height());
|
||||||
SetResizingMode(B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP);
|
SetResizingMode(B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP);
|
||||||
@@ -31,6 +33,16 @@ ToolBarView::~ToolBarView()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ToolBarView::Hide()
|
||||||
|
{
|
||||||
|
BView::Hide();
|
||||||
|
// TODO: This could be fixed in BView instead. Looking from the BIconButtons, they
|
||||||
|
// are not hidden, though, only their parent is...
|
||||||
|
_HideToolTips();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ToolBarView::AddAction(uint32 command, BHandler* target, const BBitmap* icon,
|
ToolBarView::AddAction(uint32 command, BHandler* target, const BBitmap* icon,
|
||||||
const char* toolTipText)
|
const char* toolTipText)
|
||||||
@@ -74,6 +86,25 @@ ToolBarView::SetActionPressed(uint32 command, bool pressed)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ToolBarView::Pulse()
|
||||||
|
{
|
||||||
|
// TODO: Perhaps this could/should be addressed in BView instead.
|
||||||
|
if (IsHidden())
|
||||||
|
_HideToolTips();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ToolBarView::FrameResized(float width, float height)
|
||||||
|
{
|
||||||
|
// TODO: There seems to be a bug in app_server which does not
|
||||||
|
// correctly trigger invalidation of views which are shown, when
|
||||||
|
// the resulting dirty area is somehow already part of an update region.
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ToolBarView::_AddView(BView* view)
|
ToolBarView::_AddView(BView* view)
|
||||||
{
|
{
|
||||||
@@ -102,3 +133,10 @@ ToolBarView::_FindIconButton(uint32 command) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ToolBarView::_HideToolTips() const
|
||||||
|
{
|
||||||
|
for (int32 i = 0; BView* view = ChildAt(i); i++)
|
||||||
|
view->HideToolTip();
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ public:
|
|||||||
ToolBarView(BRect frame);
|
ToolBarView(BRect frame);
|
||||||
virtual ~ToolBarView();
|
virtual ~ToolBarView();
|
||||||
|
|
||||||
|
virtual void Hide();
|
||||||
|
|
||||||
void AddAction(uint32 command, BHandler* target,
|
void AddAction(uint32 command, BHandler* target,
|
||||||
const BBitmap* icon,
|
const BBitmap* icon,
|
||||||
const char* toolTipText = NULL);
|
const char* toolTipText = NULL);
|
||||||
@@ -32,8 +34,12 @@ public:
|
|||||||
void SetActionPressed(uint32 command, bool pressed);
|
void SetActionPressed(uint32 command, bool pressed);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
virtual void Pulse();
|
||||||
|
virtual void FrameResized(float width, float height);
|
||||||
|
|
||||||
void _AddView(BView* view);
|
void _AddView(BView* view);
|
||||||
BIconButton* _FindIconButton(uint32 command) const;
|
BIconButton* _FindIconButton(uint32 command) const;
|
||||||
|
void _HideToolTips() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TOOL_BAR_VIEW_H
|
#endif // TOOL_BAR_VIEW_H
|
||||||
|
|||||||
Reference in New Issue
Block a user