ShowImage: Added toolbar buttons for browsing multipage documents
This commit is contained in:
parent
3cad498309
commit
442e457d7b
@ -199,6 +199,11 @@ ShowImageWindow::ShowImageWindow(BRect frame, const entry_ref& ref,
|
||||
B_TRANSLATE("Zoom in"), false);
|
||||
fToolBar->AddAction(MSG_ZOOM_OUT, this, tool_bar_icon(kIconZoomOut),
|
||||
B_TRANSLATE("Zoom out"), false);
|
||||
fToolBar->AddSeparator();
|
||||
fToolBar->AddAction(MSG_PAGE_PREV, this, tool_bar_icon(kIconPagePrevious),
|
||||
B_TRANSLATE("Previous page"), false);
|
||||
fToolBar->AddAction(MSG_PAGE_NEXT, this, tool_bar_icon(kIconPageNext),
|
||||
B_TRANSLATE("Next page"), false);
|
||||
fToolBar->AddGlue();
|
||||
fToolBar->AddAction(MSG_FULL_SCREEN, this,
|
||||
tool_bar_icon(kIconViewWindowed), B_TRANSLATE("Leave full screen"),
|
||||
|
@ -537,6 +537,54 @@ static const uint8 kZoomOut[] = {
|
||||
};
|
||||
|
||||
|
||||
static const uint8 kPagePrevious[] = {
|
||||
0x6e, 0x63, 0x69, 0x66, 0x07, 0x04, 0x00, 0x66, 0x05, 0x01, 0x03, 0x00,
|
||||
0x00, 0x80, 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00,
|
||||
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0x9f, 0xff,
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0xd9, 0xd9, 0xff, 0x04, 0x00, 0x66, 0x03,
|
||||
0x28, 0x1b, 0x01, 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60,
|
||||
0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0,
|
||||
0x00, 0x00, 0xff, 0xa8, 0x00, 0xff, 0x92, 0x61, 0x03, 0x03, 0x0a, 0x04,
|
||||
0x2a, 0xb3, 0xcb, 0x48, 0xb3, 0xcb, 0x48, 0x48, 0x2a, 0x48, 0x0a, 0x07,
|
||||
0x40, 0x2e, 0x2c, 0x2e, 0x2c, 0x28, 0x22, 0x32, 0x2c, 0x3c, 0x2c, 0x36,
|
||||
0x40, 0x36, 0x0a, 0x07, 0x22, 0x35, 0x36, 0x22, 0x36, 0x2c, 0x48, 0x2c,
|
||||
0x48, 0x3e, 0x36, 0x3e, 0x36, 0x48, 0x06, 0x0a, 0x00, 0x01, 0x00, 0x30,
|
||||
0x1e, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x02, 0x01, 0x00, 0x30,
|
||||
0x1c, 0x20, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x03, 0x01, 0x00, 0x20,
|
||||
0x1c, 0x20, 0x0a, 0x04, 0x01, 0x02, 0x12, 0x3d, 0xfe, 0x4e, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3e, 0x16, 0x93, 0x46, 0xc2, 0x38, 0x46, 0xc3,
|
||||
0xc7, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x05, 0x01, 0x02, 0x12, 0x3d,
|
||||
0xfe, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x16, 0x93, 0x46,
|
||||
0x82, 0x54, 0x46, 0x80, 0xf5, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x06,
|
||||
0x01, 0x02, 0x02, 0x3d, 0xfe, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3e, 0x16, 0x93, 0x46, 0x82, 0x54, 0x46, 0x80, 0xf5
|
||||
};
|
||||
|
||||
|
||||
static const uint8 kPageNext[] = {
|
||||
0x6e, 0x63, 0x69, 0x66, 0x07, 0x04, 0x00, 0x66, 0x05, 0x01, 0x03, 0x00,
|
||||
0x00, 0x80, 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00,
|
||||
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0x9f, 0xff,
|
||||
0x00, 0xff, 0xff, 0xff, 0xff, 0xd9, 0xd9, 0xff, 0x04, 0x00, 0x66, 0x03,
|
||||
0x26, 0x19, 0x01, 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60,
|
||||
0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0,
|
||||
0x00, 0x00, 0xff, 0xaa, 0x06, 0xff, 0x8d, 0x5e, 0x03, 0x03, 0x0a, 0x04,
|
||||
0x2a, 0xb3, 0xcb, 0x48, 0xb3, 0xcb, 0x48, 0x48, 0x2a, 0x48, 0x0a, 0x07,
|
||||
0x22, 0x36, 0x36, 0x36, 0x36, 0x3c, 0x40, 0x32, 0x36, 0x28, 0x36, 0x2e,
|
||||
0x22, 0x2e, 0x0a, 0x07, 0x48, 0x35, 0x34, 0x48, 0x34, 0x3e, 0x22, 0x3e,
|
||||
0x22, 0x2c, 0x34, 0x2c, 0x34, 0x22, 0x06, 0x0a, 0x00, 0x01, 0x00, 0x30,
|
||||
0x1e, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x02, 0x01, 0x00, 0x30,
|
||||
0x1c, 0x20, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x03, 0x01, 0x00, 0x20,
|
||||
0x1c, 0x20, 0x0a, 0x04, 0x01, 0x02, 0x12, 0x3d, 0xfe, 0x4e, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3e, 0x16, 0x93, 0x46, 0xbf, 0xe4, 0x46, 0xc3,
|
||||
0xc7, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x05, 0x01, 0x02, 0x12, 0x3d,
|
||||
0xfe, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x16, 0x93, 0x46,
|
||||
0x80, 0x00, 0x46, 0x80, 0xf5, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x06,
|
||||
0x01, 0x02, 0x02, 0x3d, 0xfe, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3e, 0x16, 0x93, 0x46, 0x80, 0x00, 0x46, 0x80, 0xf5
|
||||
};
|
||||
|
||||
|
||||
struct IconData {
|
||||
const uint8* data;
|
||||
size_t size;
|
||||
@ -565,7 +613,9 @@ static IconData kIcons[] = {
|
||||
{ kZoomFitViewBest, sizeof(kZoomFitViewBest), NULL },
|
||||
{ kZoomIn, sizeof(kZoomIn), NULL },
|
||||
{ kZoomOriginal, sizeof(kZoomOriginal), NULL },
|
||||
{ kZoomOut, sizeof(kZoomOut), NULL }
|
||||
{ kZoomOut, sizeof(kZoomOut), NULL },
|
||||
{ kPagePrevious, sizeof(kPagePrevious), NULL },
|
||||
{ kPageNext, sizeof(kPageNext), NULL }
|
||||
};
|
||||
|
||||
|
||||
|
@ -32,7 +32,9 @@ enum {
|
||||
kIconZoomFitViewBest,
|
||||
kIconZoomIn,
|
||||
kIconZoomOriginal,
|
||||
kIconZoomOut
|
||||
kIconZoomOut,
|
||||
kIconPagePrevious,
|
||||
kIconPageNext
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user