• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ NotifyChange函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中NotifyChange函数的典型用法代码示例。如果您正苦于以下问题:C++ NotifyChange函数的具体用法?C++ NotifyChange怎么用?C++ NotifyChange使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了NotifyChange函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: EscapeLine

void Skein::NewLine(const CStringW& line)
{
  bool nodeAdded = false;
  CStringW nodeLine = EscapeLine(line,UsePrintable);

  // Is there a child node with the same line?
  Node* node = m_inst.current->Find(nodeLine);
  if (node == NULL)
  {
    node = new Node(nodeLine,L"",L"",L"",false);
    m_inst.current->Add(node);
    nodeAdded = true;
  }

  // Make this the new current node
  m_inst.current = node;
  m_played = node;

  // Notify any listeners
  if (nodeAdded)
  {
    m_layout = false;
    NotifyChange(TreeChanged);
    NotifyEdit(true);
  }
  else
    NotifyChange(ThreadChanged);

  NotifyShowNode(node,ShowNewLine);
}
开发者ID:DavidKinder,项目名称:Windows-Inform7,代码行数:30,代码来源:Skein.cpp


示例2: DlgProc

	virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
	{
		if (msg == WM_NOTIFY) {
			LPNMHDR lpnmhdr = (LPNMHDR)lParam;
			if (lpnmhdr->idFrom == IDC_EXTRAORDER && lpnmhdr->code == NM_RCLICK) {
				HTREEITEM hSelected = m_tree.GetDropHilight();
				if (hSelected != NULL && !m_tree.IsSelected(hSelected)) {
					m_tree.UnselectAll();
					m_tree.SelectItem(hSelected);
				}

				int sels = m_tree.GetNumSelected();
				if (sels > 1) {
					if (ShowPopup(0) == ID_GROUP) {
						GroupSelectedItems();
						NotifyChange();
					}
				}
				else if (sels == 1) {
					HTREEITEM hItem = m_tree.GetSelection();
					intlist *ids = Tree_GetIDs(hItem);
					if (ids->count > 1) {
						if (ShowPopup(1) == ID_UNGROUP) {
							UngroupSelectedItems();
							NotifyChange();
						}
					}
				}
			}
		}

		return CDlgBase::DlgProc(msg, wParam, lParam);
	}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:33,代码来源:options_ei.cpp


示例3: ug

// Paste text from either the clipboard or selection.
void ScintillaQt::pasteFromClipboard(QClipboard::Mode mode)
{
    int len;
    const char *s;
    bool rectangular;

    const QMimeData *source = QApplication::clipboard()->mimeData(mode);

    if (!source || !qsb->canInsertFromMimeData(source))
        return;

    QByteArray text = qsb->fromMimeData(source, rectangular);
    len = text.length();
    s = text.data();

    s = Document::TransformLineEnds(&len, s, len, pdoc->eolMode);

    UndoGroup ug(pdoc);

    ClearSelection();

    SelectionPosition start = sel.IsRectangular() ? sel.Rectangular().Start()
            : sel.Range(sel.Main()).Start();

    if (rectangular)
        PasteRectangular(start, s, len);
    else
        InsertPaste(start, s, len);

    delete[] s;

    NotifyChange();
    Redraw();
}
开发者ID:Open-Turing-Project,项目名称:turing-editor-qt,代码行数:35,代码来源:ScintillaQt.cpp


示例4: while

void Skein::Trim(Node* node, bool running, bool notify)
{
  int i = 0;
  while (i < node->GetNumChildren())
  {
    Node* child = node->GetChild(i);
    bool inCurrent = InCurrentThread(child);

    // Only delete unlocked nodes. If the game is running, only delete
    // if the node is not in the current thread as well.
    if (child->GetTemporary() && !(running && inCurrent))
    {
      if (inCurrent)
      {
        m_current = m_root;
        m_played = m_root;
      }

      if (RemoveAll(child,false) == false)
        i++;
    }
    else
    {
      Trim(child,running,false);
      i++;
    }
  }

  if (notify)
    NotifyChange(TreeChanged);
}
开发者ID:wyrover,项目名称:Windows-Inform7,代码行数:31,代码来源:Skein.cpp


示例5: NotifyEdit

void Skein::SetLine(Node* node, LPCWSTR line)
{
  if (node->SetLine(line))
    NotifyEdit(true);
  m_layout = false;
  NotifyChange(NodeTextChanged);
}
开发者ID:DavidKinder,项目名称:Windows-Inform7,代码行数:7,代码来源:Skein.cpp


示例6: SaveData

 void SaveData()
 {
     if ( !GetPropertyContainer() || !m_Extra ) return;
     m_Extra->m_Label = Label->GetValue();
     m_Extra->m_Selected = Selected->GetValue();
     NotifyChange();
 }
开发者ID:simple-codeblocks,项目名称:Codeblocks,代码行数:7,代码来源:wxslistbook.cpp


示例7: if

    void Camera::SetPosition(const cocos2d::CCPoint &newPosition)
    {
		cocos2d::CCPoint innerPos = newPosition;
		if (newPosition.x < 4.8f)
		{
			innerPos.x = 4.8f;
		}
		else if (newPosition.x > WorldManager::Instance()->GetSceneInfo()->GetWidth() - 9.6f)
		{
			innerPos.x = WorldManager::Instance()->GetSceneInfo()->GetWidth() - 9.6f;
		}
		if (newPosition.y < 3.2f)
		{
			innerPos.y = 3.2f;
		}
		else if (newPosition.y > WorldManager::Instance()->GetSceneInfo()->GetHeight() - 4.8f)
		{
			innerPos.y = WorldManager::Instance()->GetSceneInfo()->GetHeight() - 4.8f;
		}
        m_position = innerPos;
		cocos2d::CCPoint entityPos = m_position;
        entityPos.x -= m_size.width / 2;
        entityPos.y -= m_size.height / 2;
        CameraPosChanged event(entityPos);
        NotifyChange(&event);
    }
开发者ID:boyjimeking,项目名称:Demo,代码行数:26,代码来源:Camera.cpp


示例8: printf

NS_IMETHODIMP
nsSubscribableServer::AddTo(const nsACString& aName, bool aAddAsSubscribed,
                            bool aSubscribable, bool aChangeIfExists)
{
    nsresult rv = NS_OK;

    if (mStopped) {
#ifdef DEBUG_seth
        printf("stopped!\n");
#endif
        return NS_ERROR_FAILURE;
    }

    SubscribeTreeNode *node = nsnull;

    // todo, shouldn't we pass in aAddAsSubscribed, for the
    // default value if we create it?
    rv = FindAndCreateNode(aName, &node);
    NS_ENSURE_SUCCESS(rv,rv);

    NS_ASSERTION(node,"didn't find the node");
    if (!node) return NS_ERROR_FAILURE;

    if (aChangeIfExists) {
        node->isSubscribed = aAddAsSubscribed;
        rv = NotifyChange(node, kNC_Subscribed, node->isSubscribed);
        NS_ENSURE_SUCCESS(rv,rv);
    }

    node->isSubscribable = aSubscribable;
    return rv;
}
开发者ID:mikeconley,项目名称:comm-central,代码行数:32,代码来源:nsSubscribableServer.cpp


示例9: NotifyChange

void wxsProject::Configure()
{
    if ( !m_GUI )
    {
        m_GUI = wxsGUIFactory::SelectNew(_("wxSmith does not manage any GUI for this project.\nPlease select GUI you want to be managed in wxSmith."),this);
        if ( m_GUI )
        {
            NotifyChange();
        }
    }

    if ( m_GUI )
    {
        if ( !m_GUI->CheckIfApplicationManaged() )
        {
            // TODO: Prepare better communicate, consider chancing to cbAnnoyingDiaog
            if ( wxMessageBox(_("wxSmith does not manage this application's source.\n"
                                "Should I create proper bindings?"),_("wxSmith"),wxYES_NO) == wxNO ) return;
            if ( !m_GUI->CreateApplicationBinding() ) return;
        }
        cbConfigurationDialog Dlg(0,-1,_("Configuring wxSmith"));
        Dlg.AttachConfigurationPanel(m_GUI->BuildConfigurationPanel(&Dlg));
        Dlg.ShowModal();
    }
}
开发者ID:469306621,项目名称:Languages,代码行数:25,代码来源:wxsproject.cpp


示例10: while

void Skein::Import(const char* path)
{
  Node* node = m_inst.root;
  bool added = false;

  CStdioFile recFile;
  if (recFile.Open(path,CFile::modeRead|CFile::typeText))
  {
    CString recLine;
    while (recFile.ReadString(recLine))
    {
      recLine.Trim();
      if (recLine.GetLength() > 0)
      {
        CStringW recLineW = EscapeLine(CStringW(recLine),UsePrintable);
        Node* newNode = node->Find(recLineW);
        if (newNode == NULL)
        {
          newNode = new Node(recLineW,L"",L"",L"",false);
          node->Add(newNode);
          added = true;
        }
        node = newNode;
      }
    }

    if (added)
    {
      m_layout = false;
      NotifyChange(TreeChanged);
      NotifyEdit(true);
    }
  }
}
开发者ID:DavidKinder,项目名称:Windows-Inform7,代码行数:34,代码来源:Skein.cpp


示例11: NotifyChange

void wxsSizerParentQP::SaveData()
{
    if ( !GetPropertyContainer() || !m_Extra ) return;

    m_Extra->Flags = 0;
    if ( BrdLeft  ->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::BorderLeft;
    if ( BrdRight ->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::BorderRight;
    if ( BrdTop   ->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::BorderTop;
    if ( BrdBottom->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::BorderBottom;
    m_Extra->Border.Value       = BrdSize->GetValue();
    m_Extra->Border.DialogUnits = BrdDlg->GetValue();

    if ( PlaceExp ->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::Expand;
    if ( PlaceShp ->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::Shaped;

    if ( PlaceLT->GetValue() || PlaceCT->GetValue() || PlaceRT->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::AlignTop;
    if ( PlaceLC->GetValue() || PlaceCC->GetValue() || PlaceRC->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::AlignCenterVertical;
    if ( PlaceLB->GetValue() || PlaceCB->GetValue() || PlaceRB->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::AlignBottom;
    if ( PlaceLT->GetValue() || PlaceLC->GetValue() || PlaceLB->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::AlignLeft;
    if ( PlaceCT->GetValue() || PlaceCC->GetValue() || PlaceCB->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::AlignCenterHorizontal;
    if ( PlaceRT->GetValue() || PlaceRC->GetValue() || PlaceRB->GetValue() ) m_Extra->Flags |= wxsSizerFlagsProperty::AlignRight;

    m_Extra->Proportion         = Proportion->GetValue();

    NotifyChange();
}
开发者ID:SaturnSDK,项目名称:Saturn-SDK-IDE,代码行数:26,代码来源:wxssizerparentqp.cpp


示例12: NotifyChange

void Skein::Reset(bool current)
{
  if (current)
    m_inst.current = m_inst.root;

  m_played = m_inst.root;
  NotifyChange(ThreadChanged);
}
开发者ID:DavidKinder,项目名称:Windows-Inform7,代码行数:8,代码来源:Skein.cpp


示例13: event

	void Camera::Reset( void )
	{
		cocos2d::CCPoint entityPos = m_position;
		entityPos.x -= m_size.width / 2;
		entityPos.y -= m_size.height / 2;
		CameraReset event(entityPos);
		NotifyChange(&event);
	}
开发者ID:boyjimeking,项目名称:Demo,代码行数:8,代码来源:Camera.cpp


示例14: NotifyChange

void wxsAuiManagerParentQP::OnCaptionButtonClick(wxCommandEvent& event)
{
    m_Extra->m_MinimizeButton = MinimizeButton->GetValue();
    m_Extra->m_MaximizeButton = MaximizeButton->GetValue();
    m_Extra->m_PinButton      = PinButton->GetValue();
    m_Extra->m_CloseButton    = CloseButton->GetValue();

    NotifyChange();
}
开发者ID:469306621,项目名称:Languages,代码行数:9,代码来源:wxsAuiManagerParentQP.cpp


示例15: event

	void SceneObjectProp::Init( int id, const char *imageName, float x, float y, float width, float height )
	{
		m_id = id;
		m_imageName = imageName;
		m_position = cocos2d::CCPointMake(x, y);
		m_size = cocos2d::CCSizeMake(width, height);
		SceneObjectEventInit event(m_imageName, m_position, m_size);
		NotifyChange(&event);
	}
开发者ID:boyjimeking,项目名称:Demo,代码行数:9,代码来源:SceneObjectProp.cpp


示例16: SetValue

void wxsAuiManagerParentQP::OnDockDirectionChange(wxCommandEvent& event)
{
    if ( !GetPropertyContainer() || !m_Extra ) return;

    if ( DockTop->GetValue() && (m_Extra->m_DockDirection != wxAUI_DOCK_TOP) )
    {
        m_Extra->m_DockDirection = wxAUI_DOCK_TOP;
        m_Extra->m_DockableFlags |= wxsAuiDockableProperty::TopDockable;
        DockBottom->SetValue(false);
        DockLeft->  SetValue(false);
        DockRight-> SetValue(false);
        DockCenter->SetValue(false);
    }
    else if ( DockBottom->GetValue() && (m_Extra->m_DockDirection != wxAUI_DOCK_BOTTOM) )
    {
        m_Extra->m_DockDirection = wxAUI_DOCK_BOTTOM;
        m_Extra->m_DockableFlags |= wxsAuiDockableProperty::BottomDockable;
        DockLeft->  SetValue(false);
        DockRight-> SetValue(false);
        DockCenter->SetValue(false);
    }
    else if ( DockLeft->GetValue() && (m_Extra->m_DockDirection != wxAUI_DOCK_LEFT) )
    {
        m_Extra->m_DockDirection = wxAUI_DOCK_LEFT;
        m_Extra->m_DockableFlags |= wxsAuiDockableProperty::LeftDockable;
        DockRight-> SetValue(false);
        DockCenter->SetValue(false);
    }
    else if ( DockRight->GetValue() && (m_Extra->m_DockDirection != wxAUI_DOCK_RIGHT) )
    {
        m_Extra->m_DockDirection = wxAUI_DOCK_RIGHT;
        m_Extra->m_DockableFlags |= wxsAuiDockableProperty::RightDockable;
        DockCenter->SetValue(false);
    }
    else if ( DockCenter->GetValue() && (m_Extra->m_DockDirection != wxAUI_DOCK_CENTER) )
    {
        m_Extra->m_DockDirection = wxAUI_DOCK_CENTER;
        m_Extra->m_DockableFlags = wxsAuiDockableProperty::Dockable;
    }
    else
    {
        m_Extra->m_DockDirection = wxAUI_DOCK_LEFT;
        m_Extra->m_DockableFlags |= wxsAuiDockableProperty::LeftDockable;
        m_Extra->m_Docked        = false;

        Docked->    SetValue(false);
        DockTop->   SetValue(false);
        DockBottom->SetValue(false);
        DockLeft->  SetValue(true);
        DockRight-> SetValue(false);
        DockCenter->SetValue(false);
    }

    NotifyChange();
}
开发者ID:469306621,项目名称:Languages,代码行数:55,代码来源:wxsAuiManagerParentQP.cpp


示例17: NotifyChange

Void CPropertyConcrete<DataType>::SetValue( const DataType& value )
{
    if( m_Value != value && m_CanSetValue)
    {
        m_CanSetValue = FALSE;
        DataType oldValue = m_Value;
        m_Value = value;
        NotifyChange( oldValue );
        m_CanSetValue = TRUE;
    }
}
开发者ID:ClementVidal,项目名称:sable.dune,代码行数:11,代码来源:Concrete.hpp


示例18: Node

void Skein::Reset()
{
  delete m_inst.root;
  m_inst.root = new Node(L"- start -",L"",L"",L"",false);
  m_inst.current = m_inst.root;
  m_played = m_inst.root;

  m_layout = false;
  NotifyChange(TreeChanged);
  NotifyEdit(false);
}
开发者ID:DavidKinder,项目名称:Windows-Inform7,代码行数:11,代码来源:Skein.cpp


示例19: WaitForSingleObject

// Call ReadDirectoryChangesW to check if the file has changed since the last call.
bool FileWatcher::CheckForChanges(DWORD waittime)
{
    if (!overl.hEvent)
        return false;

    DWORD dwObj = WaitForSingleObject(overl.hEvent, waittime);
    if (dwObj != WAIT_OBJECT_0)
        return false;

    return NotifyChange();
}
开发者ID:Erls-Corporation,项目名称:SumatraPDF-2.2.1,代码行数:12,代码来源:FileWatch.cpp



注:本文中的NotifyChange函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ NotifyDependents函数代码示例发布时间:2022-05-30
下一篇:
C++ Notify函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap