Exemplo n.º 1
0
nuiMetaDecoration::nuiMetaDecoration(const nglString& rName)
: nuiDecoration(rName)
{
  if (SetObjectClass(_T("nuiMetaDecoration")))
    InitAttributes();

}
Exemplo n.º 2
0
NullView::NullView(nuiJson::Value& rValue)
: ValueView(rValue)
{
  SetObjectClass(_T("NullView"));
  nuiLabel* pLabel = new nuiLabel(_T("null value"));
  AddChild(pLabel);
}
Exemplo n.º 3
0
nuiNavigationButton::nuiNavigationButton(const nglString& rText)
: nuiButton()
{
  SetObjectClass(_T("nuiNavigationButton"));
  nuiLabel* pLabel = new nuiLabel(rText);
  AddChild(pLabel);
}
Exemplo n.º 4
0
nuiSerializeContext::nuiSerializeContext(nuiXMLNode* pNode, nuiSerializeOperation Operation, bool recursive)
: nuiObject()
{
  SetObjectClass(_T("nuiSerializeContext"));
  mpNode = pNode;
  mRecursive = recursive;
  mOperation = Operation;
}
Exemplo n.º 5
0
//*********************************************************************
//
// Constr
//
//
nuiFormatedLabel::nuiFormatedLabel(const nuiFormater& rFormater, double value, nuiTheme::FontStyle FontStyle)
: nuiLabel (nglString::Null, FontStyle), 
  mFormater(rFormater)
{
  NGL_ASSERT(&mFormater);
  SetObjectClass(_T("nuiFormatedLabel"));
  SetValue (value);
}
Exemplo n.º 6
0
void nuiSpriteDef::Init()
{
  CheckValid();
  if (SetObjectClass(_T("nuiSpriteDef")))
  {
    App->AddExit(&nuiSpriteDef::Uninit);
  }
}
Exemplo n.º 7
0
nuiKnob::nuiKnob(const nuiRange& rRange)
  : nuiSimpleContainer(),
    mKnobSink(this)
{
  if (SetObjectClass(_T("nuiKnob")))
    InitAttributes();
  Init(rRange);
}
Exemplo n.º 8
0
nuiHyperLink::nuiHyperLink(const nglString& rURL, const nglString& rLabel)
  : nuiLabel(rLabel.IsNull() ? rURL : rLabel),
    mURL(rURL)
{
  if (SetObjectClass(_T("nuiHyperLink")))
    InitAttributes();
    
  SetTextColor(nuiColor(_T("nuiHyperLink")));
}
Exemplo n.º 9
0
nuiToggleButton::nuiToggleButton()
: nuiButton()
{
  SetObjectClass(_T("nuiToggleButton"));
  mDisplayAsCheckBox = false;
  mDisplayAsFrameBox = false;
  mCheckSize = mDefaultCheckSize;
  mHasContents = false;
}
Exemplo n.º 10
0
nuiToggleButton::nuiToggleButton(nuiStateDecoration* pDecoration)
: nuiButton(pDecoration)
{
  SetObjectClass(_T("nuiToggleButton"));
  mDisplayAsCheckBox = false;
  mDisplayAsFrameBox = false;
  mCheckSize = mDefaultCheckSize;
  mHasContents = false;
}
Exemplo n.º 11
0
nuiToggleButton::nuiToggleButton(const nglImage& rImage)
: nuiButton(rImage)
{
  SetObjectClass(_T("nuiToggleButton"));
  mDisplayAsCheckBox = false;
  mDisplayAsFrameBox = false;
  mCheckSize = mDefaultCheckSize;
  mHasContents = true;
}
Exemplo n.º 12
0
nuiImageDropZone::nuiImageDropZone(const nglPath& rPath, nuiTexture* pTex)
{
  SetObjectClass(_T("nuiImageDropZone"));
  
	mPath = rPath;
	mpImage = new nuiImage(pTex);
	AddChild(mpImage);
  mDrawDndFrame=false;
}
Exemplo n.º 13
0
nuiImageDropZone::nuiImageDropZone(const nglPath& rImagePath)
{
  SetObjectClass(_T("nuiImageDropZone"));

	mPath = rImagePath;
	mpImage = new nuiImage(rImagePath);
	AddChild(mpImage);
  mDrawDndFrame=false;
}
Exemplo n.º 14
0
nuiHyperLink::nuiHyperLink()
: nuiLabel(_T("")),
mURL(_T(""))
{
  if (SetObjectClass(_T("nuiHyperLink")))
    InitAttributes();

  SetTextColor(nuiColor(_T("nuiHyperLink")));
}
Exemplo n.º 15
0
//*********************************************************************************
//
// TITLLthread
//
//*********************************************************************************
TITLLthread::TITLLthread(const nglString& rName)
  : TITthread(rName)
{
  mLockedA = false;
  mLockedB = false;
  mLockedC = false;

  if (SetObjectClass(_T("TITLLThread")))
    InitAttributes();
}
Exemplo n.º 16
0
nuiPositioner::nuiPositioner(nuiPosition Position, bool expandWidth, bool expandHeight)
    : nuiSimpleContainer()
{
    SetObjectClass(_T("nuiPositioner"));
    mPPosition = Position;
    mLimitBounds = true;
    mCanRespectConstraint = true;
    mExpandWidth = expandWidth;
    mExpandHeight = expandHeight;
}
Exemplo n.º 17
0
/////////////////////////////////////////////
// class nuiSpriteView : public nuiSimpleContainer
nuiSpriteView::nuiSpriteView()
{
  mLastTime = 0;
  if (SetObjectClass(_T("nuiSpriteView")))
  {
    // Init attributes
  }
  
  StartAutoDraw();
}
Exemplo n.º 18
0
//*********************************************************************
//
// Constr
//
//
nuiFormatedLabel::nuiFormatedLabel(const nuiFormater& rFormater, double value, nuiFont* pFont, bool AlreadyAcquired)
: nuiLabel (nglString::Null, pFont, AlreadyAcquired), 
  mFormater(rFormater)
{
  //#FIXME waiting for me to know if there is a default font pointer...
  NGL_ASSERT(&mFormater);
  
  SetObjectClass(_T("nuiFormatedLabel"));
  SetValue (value);
}
Exemplo n.º 19
0
nuiViewController::nuiViewController()
: nuiSimpleContainer()
{
  SetObjectClass(_T("nuiViewController"));
  mAnimated = false;
  mOverlayed = false;
  mLoaded = false;
  
  mpBar = new nuiNavigationBar();
}
Exemplo n.º 20
0
nuiViewController::nuiViewController(bool DefaultNavigationBar)
: nuiSimpleContainer()
{
  SetObjectClass(_T("nuiViewController"));
  mAnimated = false;
  mOverlayed = false;
  mLoaded = false;
  
  mpBar = DefaultNavigationBar ? new nuiNavigationBar() : nullptr;
}
Exemplo n.º 21
0
nuiAnimation::nuiAnimation()
: mAnimSink(this)
{
  mCount = 0;
  mCurrentPosition = 0;
  mDuration = 0.5;
  mCurrentTime = 0;
  mDirection = 1.0;
  mLoopMode = eAnimLoopForward;
  mUpdatingTime = false;
  mEnableCallbacks = true;
  mDeleteOnStop = false;

  mpEasing = NULL;
  //(nuiEasingMethod)(&::nuiEasingIdentity);
  
  AcquireTimer();
  
  if (SetObjectClass(_T("nuiAnimation")))
  {
    AddAttribute(new nuiAttribute<double>
                 (nglString(_T("CurrentTime")), nuiUnitSeconds,
                  nuiMakeDelegate(this, &nuiAnimation::GetTimeFromStart),
                  nuiMakeDelegate(this, &nuiAnimation::SetTimeFromStart)));
    
    AddAttribute(new nuiAttribute<double>
                 (nglString(_T("SetTimeFromNow")), nuiUnitSeconds,
                  nuiMakeDelegate(this, &nuiAnimation::GetTimeFromNow),
                  nuiMakeDelegate(this, &nuiAnimation::SetTimeFromNow)));

    AddAttribute(new nuiAttribute<double>
                 (nglString(_T("CurrentTimeFromEnd")), nuiUnitSeconds,
                  nuiMakeDelegate(this, &nuiAnimation::GetTimeFromEnd),
                  nuiMakeDelegate(this, &nuiAnimation::SetTimeFromEnd)));
    
    AddAttribute(new nuiAttribute<double>
                 (nglString(_T("Position")), nuiUnitSize,
                  nuiMakeDelegate(this, &nuiAnimation::GetPosition)));
    
    AddAttribute(new nuiAttribute<bool>
                 (nglString(_T("IsPlaying")), nuiUnitBoolean,
                  nuiMakeDelegate(this, &nuiAnimation::IsPlaying)));
        
    AddAttribute(new nuiAttribute<double>
                 (nglString(_T("Duration")), nuiUnitSeconds,
                  nuiMakeDelegate(this, &nuiAnimation::GetDuration),
                  nuiMakeDelegate(this, &nuiAnimation::SetDuration)));

    AddAttribute(new nuiAttribute<bool>
                 (nglString(_T("DeleteOnStop")), nuiUnitBoolean,
                  nuiMakeDelegate(this, &nuiAnimation::GetDeleteOnStop),
                  nuiMakeDelegate(this, &nuiAnimation::SetDeleteOnStop)));
    
  }
}
Exemplo n.º 22
0
bool nuiToggleButton::Load(const nuiXMLNode* pNode)
{
  nuiButton::Load(pNode);
  SetObjectClass(_T("nuiToggleButton"));
  mDisplayAsCheckBox = false;
  mDisplayAsFrameBox = false;
  mCheckSize = mDefaultCheckSize;
  mHasContents = true;
  
  return true;
}
Exemplo n.º 23
0
nuiFileList::nuiFileList(const nglPath& rPath)
    : nuiList(nuiVertical),
      mFileListSink(this)
{
    SetObjectClass(_T("nuiFileList"));
    nuiLabel* pLabel = new nuiLabel(_T(".."));
    pLabel->SetProperty(_T("Path"), rPath.GetParent().GetAbsolutePath().GetPathName());

    Populate(rPath);
    mFileListSink.Connect(Activated, &nuiFileList::Selected, this);
}
Exemplo n.º 24
0
bool nuiPositioner::Load(const nuiXMLNode* pNode)
{
    nuiSimpleContainer::Load(pNode);
    SetObjectClass(_T("nuiPositioner"));
    // Nothing to do for fixed widget...
    mPPosition = nuiGetPosition(pNode, _T("Position"), nuiCenter);
    mLimitBounds = nuiGetBool(pNode, _T("LimitBounds"), true);
    mCanRespectConstraint = true;

    return true;
}
Exemplo n.º 25
0
nuiImageDecoration::nuiImageDecoration(const nglString& rName)
: nuiDecoration(rName),
  mpTexture(NULL),
  mPosition(nuiCenter),
  mColor(255,255,255,255),
  mRepeatX(false),
  mRepeatY(false)
{
  if (SetObjectClass(_T("nuiImageDecoration")))
    InitAttributes();
}
Exemplo n.º 26
0
nuiZoomBar::nuiZoomBar(nuiOrientation Orientation, const nuiRange& rRange, float SideSize, float MiddleSize, nuiSize PageSizeMin, nuiWidgetPtr pThumb)
: nuiScrollBar(Orientation, rRange, pThumb),
mPageSizeMin(PageSizeMin),
mUnzoomAfterBound(false)
{
  SetObjectClass(_T("nuiZoomBar")); 

  
  SetThumbSideSize(SideSize);
  SetThumbMiddleSize(MiddleSize);
}
Exemplo n.º 27
0
nuiFrame::nuiFrame(const nglString& rName)
: nuiDecoration(rName),
  mpTexture(NULL)
{
  if (SetObjectClass(_T("nuiFrame")))
    InitAttributes();
  mColor = nuiColor(255,255,255);
  mUseWidgetFrameColor = false;
  mDebug = false;
  mInterpolated = true;
}
Exemplo n.º 28
0
guiOscillo::guiOscillo(const std::vector<std::vector<float> >& rData)
: nuiWidget(), mrData(rData)
{
  // Setting the object class is not mandatory here. 
  // We use it in the css stylesheet to apply a decoration to the guiOscillo object. 
  // We could set the object name instead (SetObjectName), it's nearly the same for that purpose 
  // (except that, in that case, in the css stylesheet, the "guiOscillo" reference should be put between quotes.
  // Have a look to Gui.css, you've got some examples.)
  SetObjectClass(_T("guiOscillo"));
  
  StartAutoDraw();
}  
Exemplo n.º 29
0
nuiImageDecoration::nuiImageDecoration(const nglString& rName, nuiTexture* pTexture, const nuiRect& rClientRect, nuiPosition position, const nuiColor& rColor)
: nuiDecoration(rName),
  mpTexture(pTexture),
  mPosition(position),
  mClientRect(rClientRect),
  mColor(rColor),
  mRepeatX(false),
  mRepeatY(false)
{
  if (SetObjectClass(_T("nuiImageDecoration")))
    InitAttributes();
}
Exemplo n.º 30
0
nuiFlowView::nuiFlowView(float IdealWidth, float HSpace, float VSpace)
{
  if (SetObjectClass("nuiFlowView"))
  {

  }

  mIdealWidth = IdealWidth;
  mCurrentIdealWidth = 0;
  mVSpace = VSpace;
  mHSpace = HSpace;
}