| 101 | ; |
| 102 | |
| 103 | CRViewDialog::CRViewDialog(CRGUIWindowManager * wm, lString16 title, lString8 text, lvRect rect, bool showScroll, bool showFrame ) |
| 104 | : CRDocViewWindow(wm), _text(text), _showScroll( showScroll ), _showFrame( showFrame ), _lastNavigationDirection(0) |
| 105 | { |
| 106 | _passKeysToParent = _passCommandsToParent = false; |
| 107 | if ( _showFrame ) { |
| 108 | setSkinName( lString16("#dialog") ); |
| 109 | if ( !_wm->getSkin().isNull() ) |
| 110 | _skin = _wm->getSkin()->getWindowSkin(getSkinName().c_str()); |
| 111 | } |
| 112 | setAccelerators( _wm->getAccTables().get("browse") ); |
| 113 | _caption = title; |
| 114 | lvRect fsRect = _wm->getScreen()->getRect(); |
| 115 | _fullscreen = false; |
| 116 | if ( rect.isEmpty() ) { |
| 117 | rect = fsRect; |
| 118 | _fullscreen = false; |
| 119 | } else { |
| 120 | _fullscreen = (rect == fsRect); |
| 121 | } |
| 122 | getDocView()->setDrawBufferBits(_wm->getScreen()->getCanvas()->GetBitsPerPixel()); |
| 123 | getDocView()->setStyleSheet( lString8(def_view_css) ); |
| 124 | getDocView()->setBackgroundColor(0xFFFFFF); |
| 125 | getDocView()->setTextColor(0x000000); |
| 126 | getDocView()->setFontSize( 20 ); |
| 127 | getDocView()->setPageMargins( lvRect(8,8,8,8) ); |
| 128 | if ( !_skin.isNull() ) { |
| 129 | CRRectSkinRef clientSkin = _skin->getClientSkin(); |
| 130 | if ( !clientSkin.isNull() ) { |
| 131 | getDocView()->setBackgroundColor(clientSkin->getBackgroundColor()); |
| 132 | getDocView()->setTextColor(clientSkin->getTextColor()); |
| 133 | getDocView()->setFontSize(clientSkin->getFontSize()); |
| 134 | getDocView()->setDefaultFontFace(UnicodeToUtf8(clientSkin->getFontFace())); |
| 135 | getDocView()->setPageMargins( clientSkin->getBorderWidths() ); |
| 136 | } |
| 137 | } |
| 138 | getDocView()->setShowCover( false ); |
| 139 | getDocView()->setPageHeaderInfo( 0 ); // hide title bar |
| 140 | if ( !text.empty() ) { |
| 141 | _stream = LVCreateStringStream( text ); |
| 142 | getDocView()->LoadDocument(_stream); |
| 143 | } |
| 144 | setRect( rect ); |
| 145 | } |
| 146 | |
| 147 | bool CRViewDialog::hasDictionaries() |
| 148 | { |
nothing calls this directly
no test coverage detected