void CKeyCodes::SaveUserKeySymbols(FILE* file) const { bool output = false; std::map<std::string, int>::const_iterator user_it; for (user_it = nameToCode.begin(); user_it != nameToCode.end(); ++user_it) { std::map<std::string, int>::const_iterator def_it; const std::string& keysym = user_it->first; def_it = defaultNameToCode.find(keysym); if (def_it == defaultNameToCode.end()) { // this keysym is not standard const int code = user_it->second; std::string name = GetDefaultName(code); if (name.empty()) { char buf[16]; SNPRINTF(buf, 16, "0x%03X", code); name = buf; } fprintf(file, "keysym %-10s %s\n", keysym.c_str(), name.c_str()); output = true; } } if (output) { fprintf(file, "\n"); } return; }
TimeTrack::TimeTrack(DirManager *projDirManager, const ZoomInfo *zoomInfo): Track(projDirManager) , mZoomInfo(zoomInfo) { mHeight = 100; mRangeLower = 0.9; mRangeUpper = 1.1; mDisplayLog = false; mEnvelope = new Envelope(); mEnvelope->SetTrackLen(1000000000.0); mEnvelope->SetInterpolateDB(true); mEnvelope->Flatten(1.0); mEnvelope->Mirror(false); mEnvelope->SetOffset(0); mEnvelope->SetRange(TIMETRACK_MIN, TIMETRACK_MAX); SetDefaultName(_("Time Track")); SetName(GetDefaultName()); mRuler = new Ruler; mRuler->SetUseZoomInfo(0, mZoomInfo); mRuler->SetLabelEdges(false); mRuler->SetFormat(Ruler::TimeFormat); blankBrush.SetColour(214, 214, 214); blankPen.SetColour(214, 214, 214); }
void CControl::Initialize() { super::Initialize(); m_bUninitialize = false; if ( strcmp( m_strName.c_str(), DEFAULT_CONTROL_NAME ) == 0) { SetName( GetDefaultName() ); } else { CWindowManager::GetInstance()->RegisterControl( this ); } CalcInheritColor(); CRenderTarget* pMainRenderTarget = CRenderManager::GetInstance()->GetCurrentRenderTarget(); BEATS_ASSERT( pMainRenderTarget ); CNode* pParentNode = GetParentNode(); if ( nullptr == pParentNode) { CWindowManager::GetInstance()->AddToRoot( this ); } if (nullptr == pParentNode || pParentNode->GetType() != eNT_NodeGUI ) { //update control vertex by render target OnParentSizeChange( (float)pMainRenderTarget->GetWidth(), (float)pMainRenderTarget->GetHeight()); } }
NoteTrack::NoteTrack(DirManager * projDirManager): Track(projDirManager) { SetDefaultName(_("Note Track")); SetName(GetDefaultName()); mSeq = NULL; mLen = 0.0; mDirManager = projDirManager; mBottomNote = 24; mVisibleChannels = 0xFFFF; }
string Info::GetTitle() const { if (!m_customName.empty()) return m_customName; // Prefer names in native language over default ones. int8_t const langCode = StringUtf8Multilang::GetLangIndex(languages::GetCurrentNorm()); if (langCode != StringUtf8Multilang::kUnsupportedLanguageCode) { string native; if (m_name.GetString(langCode, native)) return native; } return GetDefaultName(); }
NoteTrack::NoteTrack(DirManager * projDirManager): Track(projDirManager) { SetDefaultName(_("Note Track")); SetName(GetDefaultName()); mSeq = NULL; mLen = 0.0; mSerializationBuffer = NULL; mSerializationLength = 0; mDirManager = projDirManager; mBottomNote = 24; mVisibleChannels = 0xFFFF; mLastMidiPosition = 0; }
NoteTrack::NoteTrack(DirManager * projDirManager): Track(projDirManager) { SetDefaultName(_("Note Track")); SetName(GetDefaultName()); mSeq = NULL; mSerializationBuffer = NULL; mSerializationLength = 0; mDirManager = projDirManager; #ifdef EXPERIMENTAL_MIDI_OUT mGain = 0; #endif mBottomNote = 24; mPitchHeight = 5; mVisibleChannels = ALL_CHANNELS; mLastMidiPosition = 0; }
TimeTrack::TimeTrack(DirManager *projDirManager): Track(projDirManager) { mHeight = 50; mRangeLower = 90; mRangeUpper = 110; mEnvelope = new Envelope(); mEnvelope->SetTrackLen(1000000000.0); mEnvelope->SetInterpolateDB(false); mEnvelope->Flatten(0.5); mEnvelope->Mirror(false); SetDefaultName(_("Time Track")); SetName(GetDefaultName()); mRuler = new Ruler(); mRuler->SetLabelEdges(false); mRuler->SetFormat(Ruler::TimeFormat); blankBrush.SetColour(214, 214, 214); blankPen.SetColour(214, 214, 214); }