HSeparator::HSeparator(nux::Color const& color, float alpha0, float alpha1, int border, NUX_FILE_LINE_DECL)
  : nux::View(NUX_FILE_LINE_PARAM)
  , color_(color)
  , alpha0_(alpha0)
  , alpha1_(alpha1)
  , border_size_(border)
{
  SetMinimumHeight(1);
  SetMaximumHeight(1);
}
Example #2
0
void HudButton::InitTheme()
{
  is_rounded.changed.connect([this](bool)
  {
    nux::Geometry const& geo = GetGeometry();
    prelight_->Invalidate(geo);
    active_->Invalidate(geo);
    normal_->Invalidate(geo);
  });

  SetMinimumHeight(HEIGHT.CP(scale));
  SetMaximumHeight(HEIGHT.CP(scale));

  nux::Geometry const& geo = GetGeometry();

  prelight_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &HudButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_PRELIGHT)));
  active_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &HudButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_PRESSED)));
  normal_.reset(new nux::CairoWrapper(geo, sigc::bind(sigc::mem_fun(this, &HudButton::RedrawTheme), nux::ButtonVisualState::VISUAL_STATE_NORMAL)));
}
// ---------------------------------------------------------
// CMsgBodyControlEditor::ConstructL
//
//
// ---------------------------------------------------------
//
void CMsgBodyControlEditor::ConstructL()
    {
    TInt edwinFlags = ENoHorizScrolling | 
                      ENoAutoSelection | 
                      EWidthInPixels | 
                      EAllowUndo | 
                      EResizable;
//                      EResizable |
//                      EPasteAsPlainText;

    iFlags |= EMsgControlModeDoNotDrawFrameBgContext;
    ResolveLayouts();
    
    /*if ( iBaseControlObserver &&
         !iBaseControlObserver->ViewInitialized() )
        {
        SetSuppressFormatting( ETrue );
        }*/
    
//    iItemFinder = CItemFinder::NewL(  CItemFinder::EUrlAddress | 
//                                      CItemFinder::EEmailAddress | 
//                                      CItemFinder::EPhoneNumber | 
//                                      CItemFinder::EUriScheme );
//
//    iItemFinder->AddObserver( *this );
    iFocusChangedBeforeParseFinish = EFalse;

    CEikRichTextEditor::ConstructL( iParentControl, 0, iMaxNumberOfChars, edwinFlags );
    // 107-24185 : Emoticon support for SMS and MMS
    //AddFlagToUserFlags(EAvkonEnableSmileySupport);
    
    // Both global text editor and edwin have it's own formatting layers.
    // CEikRichTextEditor::ConstructL call will set global formatting layers
    // into use for text. This is not correct as edwin formatting layers
    // will hold correct formatting values. Below calls will set edwin
    // formatting layers into use and prevent client based formatting from
    // being based on incorrect formatting layer.
    SetParaFormatLayer( iEikonEnv->SystemParaFormatLayerL()->CloneL() );
    SetCharFormatLayer( iEikonEnv->SystemCharFormatLayerL()->CloneL() );
    
    SetUpperFullFormattingLength( KBodyFullFormattingLength );
    
    SetMaximumHeight( MsgEditorCommons::MaxBodyHeight() );
    
    // Set the wrap width to be that of the current body text pane. 
    // This will make the formatting of text safer if it is performed 
    // before the editor has ever had SetSize() called. WrapWidth is 
    // usually set in HandleSizeChanged()
//    if ( iLayout )
//        {
//        iLayout->SetWrapWidth( iTextLayout.TextRect().Width() );
//        }
    
//    TRect dataPane = MsgEditorCommons::MsgDataPane();
    
//    TMargins8 edwinMargins;
//    edwinMargins.iTop = 0;
//    edwinMargins.iBottom = 0;
//    edwinMargins.iLeft = (TInt8)( iTextLayout.TextRect().iTl.iX - dataPane.iTl.iX );
//    edwinMargins.iRight = (TInt8)( dataPane.iBr.iX - iTextLayout.TextRect().iBr.iX );
//    SetBorderViewMargins( edwinMargins );
    }