bool nuiWindow::Load(const nuiXMLNode* pNode) { nuiSimpleContainer::Load(pNode); mpCloseButton = NULL; mMoving = eNoMove; // FIXME: interpret other attributes... nuiWindowFlags Flags = NoFlag; if (nuiGetBool (pNode, _T("StaticChildren"), false)) Flags |= StaticChildren; if (nuiGetBool (pNode, _T("NoResize"), false)) Flags |= NoResize; if (nuiGetBool (pNode, _T("NoMove"), false)) Flags |= NoMove; if (nuiGetBool (pNode, _T("NoCaption"), false)) Flags |= NoCaption; if (nuiGetBool (pNode, _T("NoClose"), false)) Flags |= NoClose; if (nuiGetBool (pNode, _T("Raw"), false)) Flags |= Raw; if (nuiGetBool (pNode, _T("Modal"), false)) Flags |= Modal; SetFlags(Flags); mTitle = nuiGetString(pNode, _T("Title"), _T("")); mMinimumHeight = nuiGetVal(pNode, _T("MinimumHeight"), 16.0f); mMinimumWidth = nuiGetVal(pNode, _T("MinimumWidth"), 40.0f); InitProperties(); return true; }
void PropertySetting::UpdateFromPanel(PropertySettingPanel* panel) { wxPropertyGrid* pg = panel->GetPropertyGrid(); if (panel->GetType() == m_type) { UpdateProperties(pg); } else { InitProperties(pg); } }
GlImage::GlImage(const ArpVoxel& bg) : mColor(0), mLight(0), mMaterial(0), mSolidCache(0) { Free(); InitProperties(); mBg = bg; mIsSolid = true; mStatus = B_OK; }
void PControl::InitPControl(void) { fType = "PControl"; fFriendlyType = "Generic Control"; AddInterface("PControl"); InitProperties(); }
PProgressBar::PProgressBar(void) : PView(true) { fType = "PProgressBar"; fFriendlyType = "Progress Bar"; AddInterface("PProgressBar"); InitBackend(); InitProperties(); InitMethods(); }
void PropertySetting::EnablePropertyGrid(PropertySettingPanel* panel, bool enable) { wxPropertyGrid* pg = panel->GetPropertyGrid(); if (panel->GetType() != m_type) { InitProperties(pg); } for (wxPropertyGridIterator itr = pg->GetIterator(wxPG_ITERATE_ALL); !itr.AtEnd(); itr++) { wxPGProperty* p = *itr; p->Enable(enable); } }
nuiLabel::nuiLabel(const nglString& Text, const nglString& rObjectName, nuiTheme::FontStyle FontStyle) : nuiWidget(rObjectName), mLabelSink(this) { InitDefaultValues(); if (SetObjectClass(_T("nuiLabel"))) InitAttributes(); InitProperties(); SetFont(FontStyle); SetText(Text); }
TInt Wins::Init(TBool aRunExe) { TInt r = InitProperties(aRunExe); if (r == KErrNone) { iProperties.GetInt("LogTimeStamp",iLogTimeStamp); TInt logThreadId=ETrue; iProperties.GetInt("LogThreadId",logThreadId); TInt cpu=NThread::ECpuSingle; iProperties.GetInt("HostCPU",cpu); NThread::SetProperties(logThreadId,cpu); iProperties.GetInt("LogToDebugger",iLogToDebugger); iProperties.GetInt("LogToFile",iLogToFile); TInt mask; Kern::SuperPage().iDebugMask[0] = DebugMask(); // get int or text mask value // check to see if DebugMask0 was used instead of DebugMask if ( (iProperties.GetInt("DebugMask", mask) != KErrNone) && (iProperties.GetInt("DebugMask0", mask) == KErrNone) ) Kern::SuperPage().iDebugMask[0] = ((iProperties.GetInt("DebugMask0", mask) == KErrNone) ? mask : 0); // only int entries are supported for DebugMasks 1-7 Kern::SuperPage().iDebugMask[1] = ((iProperties.GetInt("DebugMask1", mask) == KErrNone) ? mask : 0); Kern::SuperPage().iDebugMask[2] = ((iProperties.GetInt("DebugMask2", mask) == KErrNone) ? mask : 0); Kern::SuperPage().iDebugMask[3] = ((iProperties.GetInt("DebugMask3", mask) == KErrNone) ? mask : 0); Kern::SuperPage().iDebugMask[4] = ((iProperties.GetInt("DebugMask4", mask) == KErrNone) ? mask : 0); Kern::SuperPage().iDebugMask[5] = ((iProperties.GetInt("DebugMask5", mask) == KErrNone) ? mask : 0); Kern::SuperPage().iDebugMask[6] = ((iProperties.GetInt("DebugMask6", mask) == KErrNone) ? mask : 0); Kern::SuperPage().iDebugMask[7] = ((iProperties.GetInt("DebugMask7", mask) == KErrNone) ? mask : 0); // initial values for fast trace... Kern::SuperPage().iInitialBTraceFilter[0] = ((iProperties.GetInt("BTrace0", mask) == KErrNone) ? mask : 0); Kern::SuperPage().iInitialBTraceFilter[1] = ((iProperties.GetInt("BTrace1", mask) == KErrNone) ? mask : 0); Kern::SuperPage().iInitialBTraceFilter[2] = ((iProperties.GetInt("BTrace2", mask) == KErrNone) ? mask : 0); Kern::SuperPage().iInitialBTraceFilter[3] = ((iProperties.GetInt("BTrace3", mask) == KErrNone) ? mask : 0); Kern::SuperPage().iInitialBTraceFilter[4] = ((iProperties.GetInt("BTrace4", mask) == KErrNone) ? mask : 0); Kern::SuperPage().iInitialBTraceFilter[5] = ((iProperties.GetInt("BTrace5", mask) == KErrNone) ? mask : 0); Kern::SuperPage().iInitialBTraceFilter[6] = ((iProperties.GetInt("BTrace6", mask) == KErrNone) ? mask : 0); Kern::SuperPage().iInitialBTraceFilter[7] = ((iProperties.GetInt("BTrace7", mask) == KErrNone) ? mask : 0); Kern::SuperPage().iInitialBTraceBuffer = ((iProperties.GetInt("BTraceBuffer", mask) == KErrNone) ? mask : 0); Kern::SuperPage().iInitialBTraceMode = ((iProperties.GetInt("BTraceMode", mask) == KErrNone) ? mask : 0); Kern::SuperPage().SetKernelConfigFlags(KernelConfigFlags()); SCapabilitySet caps; DisabledCapabilities(caps); memcpy(&Kern::SuperPage().iDisabledCapabilities,&caps,sizeof(caps)); } CalibrateCpuSpeed(); return r; }
nuiLabel::nuiLabel(const nglString& Text, nuiFont* pFont, bool AlreadyAcquired) : nuiWidget(), mLabelSink(this) { InitDefaultValues(); if (SetObjectClass(_T("nuiLabel"))) InitAttributes(); InitProperties(); SetText(Text); SetFont(pFont, AlreadyAcquired); }
nuiWindow::nuiWindow() : nuiSimpleContainer(), mNuiWindowSink(this), mpManager(NULL) { mpCloseButton = NULL; mMoving = eNoMove; mMinimumHeight = 32; mMinimumWidth = 64; SetFlags(NoFlag); InitProperties(); }
GlImage::GlImage(const ArpBitmap& bm) : mColor(0), mLight(0), mMaterial(0), mSolidCache(0) { Free(); InitProperties(); int32 size = bm.Width() * bm.Height(); if (size > 0) { mColor = new uint8[size * _COLOR_PLANES]; if (mColor) { mW = bm.Width(); mH = bm.Height(); mStatus = bm.Get(mColor, mColor + size, mColor + (size * 2), mColor + (size * 3), mW, mH); } } }
GlImage::GlImage( int32 width, int32 height, const ArpVoxel* bg, const ArpVoxel* fg, uint32 fields) : mColor(0), mLight(0), mMaterial(0), mSolidCache(0) { Free(); InitProperties(); if (bg) SetProperty(ARP_BACKGROUND_COLOUR, *bg); if (fg) SetProperty(ARP_FOREGROUND_COLOUR, *fg); int32 size = width * height; if (size <= 0) { mIsSolid = true; mStatus = B_OK; return; } mColor = new uint8[size * _COLOR_PLANES]; bool light = (fields&GL_PIXEL_DIFF_MASK || fields&GL_PIXEL_SPEC_MASK), material = (fields&GL_PIXEL_D_MASK || fields&GL_PIXEL_C_MASK || fields&GL_PIXEL_F_MASK); if (light) mLight = new uint8[size * _LIGHT_PLANES]; if (material) mMaterial = new uint8[size * _MATERIAL_PLANES]; if (!mColor || (light && !mLight) || (material && !mMaterial)) { Free(); return; } mW = width; mH = height; mStatus = B_OK; if (bg) { memset(mColor, bg->r, size); memset(mColor + size, bg->g, size); memset(mColor + (size * 2), bg->b, size); memset(mColor + (size * 3), bg->a, size); memset(mColor + (size * 4), bg->z, size); } if (mLight) { memset(mLight, _INIT_DIFF, size); memset(mLight + size, _INIT_SPEC, size); } if (mMaterial) { memset(mMaterial, _INIT_D, size); memset(mMaterial + size, _INIT_C, size); memset(mMaterial + (size * 2), _INIT_F, size); } }
nuiWindow::nuiWindow(const nuiRect& rRect, nuiWindowFlags Flags, nglString Title) : nuiSimpleContainer(), mNuiWindowSink(this) { nuiRect rect = rRect; SetUserRect(rect); mpCloseButton = NULL; mMoving = eNoMove; mMinimumHeight = 32; mMinimumWidth = 64; SetFlags(Flags); mTitle = Title; InitProperties(); }
CSoundData::CSoundData() { InitProperties(); }
FrontEnd::FrontEnd(wxWindow* parent, int id, const wxString& title): wxFrame(parent, id, title)//, pos, size, wxDEFAULT_FRAME_STYLE) { //_CrtSetBreakAlloc(3446); //_CrtSetDbgFlag(_CRTDBG_CHECK_ALWAYS_DF); //////////////////////////////////////////////////// // books creation m_panel = NULL; m_bookCtrl = NULL; //// create a dummy image list with a few icons //const wxSize imageSize(32, 32); //m_imageList = new wxImageList(imageSize.GetWidth(), imageSize.GetHeight()); //m_imageList-> // Add(wxArtProvider::GetIcon(wxART_INFORMATION, wxART_OTHER, imageSize)); //m_imageList-> // Add(wxArtProvider::GetIcon(wxART_QUESTION, wxART_OTHER, imageSize)); //m_imageList-> // Add(wxArtProvider::GetIcon(wxART_WARNING, wxART_OTHER, imageSize)); //m_imageList-> // Add(wxArtProvider::GetIcon(wxART_ERROR, wxART_OTHER, imageSize)); // Panel m_panel = new wxPanel(this); // Set sizers m_sizerFrame = new wxBoxSizer(wxVERTICAL); // Create list book int flags; flags = wxBK_LEFT; m_bookCtrl = new wxListbook(m_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, flags); wxListView* list = ((wxListbook*)m_bookCtrl)->GetListView(); list->SetColumnWidth(0, 140); if ( !m_bookCtrl ) assert(0); m_bookCtrl->Hide(); //m_bookCtrl->SetImageList(m_imageList); init_pages(m_bookCtrl); m_sizerFrame->Add(m_bookCtrl, wxSizerFlags(5).Expand().Border()); //m_sizerFrame->Insert(0, m_bookCtrl, wxSizerFlags(15).Expand().Border()); m_sizerFrame->Show(m_bookCtrl); m_sizerFrame->Layout(); //////////////////////////////////////////////////// m_btnNextSong = new wxButton(m_panel, ID_NEXT_SONG, "Next Song"); m_sizerFrame->Add(m_btnNextSong, wxSizerFlags(1).Expand()); m_panel->SetSizer(m_sizerFrame); m_sizerFrame->SetSizeHints(this); InitMenus(); InitProperties(); if(!DBConnect("KTVAdmin", "admin", "localhost", "ktv")) wxMessageBox("Cannot connect to the database£¡", "Error"); }
/*************************************************************************** * GL-IMAGE ****************************************************************************/ GlImage::GlImage() : mColor(0), mLight(0), mMaterial(0), mSolidCache(0) { Free(); InitProperties(); }
CLocalProperties::CLocalProperties() { InitProperties(); }