本文整理汇总了C++中NotifyChange函数的典型用法代码示例。如果您正苦于以下问题:C++ NotifyChange函数的具体用法?C++ NotifyChange怎么用?C++ NotifyChange使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NotifyChange函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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);
}
示例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();
}
示例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);
}
示例5: NotifyEdit
void Skein::SetLine(Node* node, LPCWSTR line)
{
if (node->SetLine(line))
NotifyEdit(true);
m_layout = false;
NotifyChange(NodeTextChanged);
}
示例6: SaveData
void SaveData()
{
if ( !GetPropertyContainer() || !m_Extra ) return;
m_Extra->m_Label = Label->GetValue();
m_Extra->m_Selected = Selected->GetValue();
NotifyChange();
}
示例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);
}
示例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;
}
示例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();
}
}
示例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);
}
}
}
示例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();
}
示例12: NotifyChange
void Skein::Reset(bool current)
{
if (current)
m_inst.current = m_inst.root;
m_played = m_inst.root;
NotifyChange(ThreadChanged);
}
示例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);
}
示例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();
}
示例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);
}