本文整理汇总了C++中MCStack类的典型用法代码示例。如果您正苦于以下问题:C++ MCStack类的具体用法?C++ MCStack怎么用?C++ MCStack使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MCStack类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sethints
void MCStack::sethints()
{
if (!opened || MCnoui || window == DNULL)
return;
MCStack *sptr = MCdefaultstackptr == this ? MCtopstackptr : MCdefaultstackptr;
if (sptr != NULL && sptr != this && sptr->getw() != DNULL
&& GetWindowLongA((HWND)window->handle.window, 0) == 0)
SetWindowLongA((HWND)window->handle.window, 0, (LONG)sptr->getw()->handle.window);
}
示例2:
static char *card_message(const char *arg1, const char *arg2,
const char *arg3, int *retval)
{
MCStack *s = MCdefaultstackptr;
Boolean oldcheck = MCcheckstack;
MCcheckstack = False;
*retval = trans_stat(s->getcurcard()->domess(arg1));
MCcheckstack = oldcheck;
return NULL;
}
示例3: findstackd
void MCDispatch::wdoubleup(Window w, uint2 which)
{
if (menu != NULL)
menu->doubleup(which);
else
{
MCStack *target = findstackd(w);
if (target != NULL)
target->doubleup(which);
}
}
示例4: while
void MCStacklist::hidepalettes(Boolean hide)
{
active = !hide;
if (stacks == NULL)
return;
MCStacknode *tptr = stacks;
// only hide palettes if a non-palette is open
Boolean dohide = False;
do
{
MCStack *sptr = tptr->getstack();
if (sptr->getrealmode() < WM_PALETTE)
{
dohide = True;
break;
}
tptr = tptr->next();
}
while (tptr != stacks);
if (!dohide)
return;
restart = False;
tptr = stacks;
do
{
MCStack *sptr = tptr->getstack();
if (sptr->getrealmode() == WM_PALETTE && sptr->getflag(F_VISIBLE))
if (MChidepalettes)
{
// Show the window non-active (to avoid messing with the focus),
// then send a synthetic activate event to force a title-bar redraw
ShowWindow((HWND)sptr->getw()->handle.window, hide ? SW_HIDE : SW_SHOWNA);
PostMessageA((HWND)sptr->getw()->handle.window, WM_NCACTIVATE, 1, 0);
// When closing or opening a window, Win32 delivers messages that can
// change stack list, and we need to start over if this happened
if (restart)
{
hidepalettes(hide);
return;
}
}
else if (sptr->getw() != NULL)
{
// OK-2007-04-19: Bug 4728, When hiding a palette with a windowShape
// sptr->getw() can return null, causing crash here.
PostMessageA((HWND)sptr->getw()->handle.window, WM_NCACTIVATE, !hide, 0);
}
tptr = tptr->next();
}
while (tptr != stacks);
}
示例5:
MCStack *MCDispatch::findstackid(uint4 fid)
{
if (fid == 0)
return NULL;
MCStack *tstk = stacks;
do
{
MCStack *foundstk;
if ((foundstk = (MCStack *)tstk->findsubstackid(fid)) != NULL)
return foundstk;
tstk = (MCStack *)tstk->next();
}
while (tstk != stacks);
return NULL;
}
示例6: ismainstack
Boolean MCDispatch::ismainstack(MCStack *sptr)
{
if (stacks != NULL)
{
MCStack *tstk = stacks;
do
{
if (tstk == sptr)
return True;
tstk = (MCStack *)tstk->next();
}
while (tstk != stacks);
}
return False;
}
示例7: ep2
void MCDispatch::getmainstacknames(MCExecPoint &ep)
{
ep.clear();
MCExecPoint ep2(ep);
MCStack *tstk = stacks;
bool first;
first = true;
do
{
tstk->getprop(0, P_SHORT_NAME, ep2, False);
ep.concatmcstring(ep2.getsvalue(), EC_RETURN, first);
first = false;
tstk = (MCStack *)tstk->next();
}
while (tstk != stacks);
}
示例8: MCU_max
void MCStack::sethints()
{
if (!opened || MCnoui || window == DNULL)
return;
if (flags & F_RESIZABLE)
{
rect.width = MCU_max(minwidth, rect.width);
rect.width = MCU_min(maxwidth, rect.width);
rect.height = MCU_max(minheight, rect.height);
rect.height = MCU_min(maxheight, rect.height);
}
MCStack *sptr = MCdefaultstackptr == this ? MCtopstackptr : MCdefaultstackptr;
if (sptr != NULL && sptr != this && sptr->getw() != DNULL
&& GetWindowLongA((HWND)window->handle.window, 0) == 0)
SetWindowLongA((HWND)window->handle.window, 0, (LONG)sptr->getw()->handle.window);
}
示例9:
MCStack *MCStack::findstackd(Window w)
{
if (w == window)
return this;
if (substacks != NULL)
{
MCStack *tptr = substacks;
do
{
if (w == tptr->window)
return tptr;
tptr = (MCStack *)tptr->next();
}
while (tptr != substacks);
}
return NULL;
}
示例10:
MCStack *MCStack::findstackd(Window w)
{
if (w == NULL)
return NULL;
if ((window != DNULL) && (w->handle.window == window->handle.window))
return this;
if (substacks != NULL)
{
MCStack *tptr = substacks;
do
{
if ((tptr->window != DNULL) &&
(w->handle.window == tptr->window->handle.window))
return tptr;
tptr = (MCStack *)tptr->next();
}
while (tptr != substacks);
}
return NULL;
}
示例11: MCRedrawDoUpdateScreen
void MCRedrawDoUpdateScreen(void)
{
if (MClockscreen != 0)
return;
if (!s_screen_is_dirty)
return;
if (s_screen_updates_disabled)
return;
MCStacknode *t_stacks;
t_stacks = MCstacks -> topnode();
if (t_stacks == nil)
return;
MCStacknode *tptr = t_stacks->prev();
do
{
MCStack *sptr = tptr->getstack();
if (sptr->getstate(CS_NEED_RESIZE))
{
sptr->setgeom();
sptr->openrect(sptr->getrect(), WM_LAST, NULL, WP_DEFAULT, OP_NONE);
MCRedrawUpdateScreen();
return;
}
sptr -> applyupdates();
tptr = tptr->prev();
}
while (tptr != t_stacks->prev());
s_screen_is_dirty = false;
MCredrawupdatescreenneeded = MClockscreen == 0 && s_screen_is_dirty && !s_screen_updates_disabled;
}
示例12: getparentwindow
MCStack *MCStack::findchildstackd(Window w,uint2 &ccount,uint2 cindex)
{
Window pwindow = getparentwindow();
if (pwindow != DNULL && w->handle.window == pwindow->handle.window)
if (++ccount == cindex)
return this;
if (substacks != NULL)
{
MCStack *tptr = substacks;
do
{
pwindow = tptr->getparentwindow();
if (pwindow != DNULL && w->handle.window == pwindow->handle.window)
{
ccount++;
if (ccount == cindex)
return tptr;
}
tptr = (MCStack *)tptr->next();
}
while (tptr != substacks);
}
return NULL;
}
示例13: while
void MCStacklist::hidepalettes(Boolean hide)
{
active = !hide;
if (stacks == NULL)
return;
MCStacknode *tptr = stacks;
// only hide palettes if a non-palette is open
Boolean dohide = False;
do
{
MCStack *sptr = tptr->getstack();
if (sptr->getrealmode() < WM_PALETTE)
{
dohide = True;
break;
}
tptr = tptr->next();
}
while (tptr != stacks);
if (!dohide)
return;
restart = False;
tptr = stacks;
do
{
MCStack *sptr = tptr->getstack();
if (sptr->getrealmode() == WM_PALETTE && sptr->getflag(F_VISIBLE))
if (MChidepalettes)
{
if (hide)
MCscreen->closewindow(sptr->getw());
else
sptr -> openwindow(False);
}
tptr = tptr->next();
}
while (tptr != stacks);
}
示例14: while
MCStack *MCDispatch::findstackd(Window w)
{
if (w == DNULL)
return NULL;
if (stacks != NULL)
{
MCStack *tstk = stacks;
do
{
MCStack *foundstk;
if ((foundstk = tstk->findstackd(w)) != NULL)
return foundstk;
tstk = (MCStack *)tstk->next();
}
while (tstk != stacks);
}
if (panels != NULL)
{
MCStack *tstk = panels;
do
{
MCStack *foundstk;
if ((foundstk = tstk->findstackd(w)) != NULL)
return foundstk;
tstk = (MCStack *)tstk->next();
}
while (tstk != panels);
}
// MW-2006-04-24: [[ Purify ]] It is possible to get here after MCtooltip has been
// deleted. So MCtooltip is now NULL in this situation and we test for it here.
if (MCtooltip != NULL && MCtooltip->findstackd(w))
return MCtooltip;
return NULL;
}
示例15: ep
MCObject *MCDispatch::getobjname(Chunk_term type, const MCString &s)
{
if (stacks != NULL)
{
MCStack *tstk = stacks;
do
{
MCObject *optr;
if ((optr = tstk->getsubstackobjname(type, s)) != NULL)
return optr;
tstk = (MCStack *)tstk->next();
}
while (tstk != stacks);
}
if (type == CT_IMAGE)
{
const char *sptr = s.getstring();
uint4 l = s.getlength();
MCAutoNameRef t_image_name;
if (MCU_strchr(sptr, l, ':'))
/* UNCHECKED */ t_image_name . CreateWithOldString(s);
MCImage *iptr = imagecache;
if (iptr != NULL)
{
do
{
check:
if (t_image_name != nil && iptr -> hasname(t_image_name))
return iptr;
if (!iptr->getopened())
{
iptr->remove(imagecache);
delete iptr;
iptr = imagecache;
if (iptr == NULL)
break;
goto check;
}
iptr = (MCImage *)iptr->next();
}
while (iptr != imagecache);
}
if (MCU_strchr(sptr, l, ':'))
{
MCresult->clear(False);
MCExecPoint ep(MCdefaultstackptr, NULL, NULL);
MCExecPoint *epptr = MCEPptr == NULL ? &ep : MCEPptr;
epptr->setsvalue(s);
MCU_geturl(*epptr);
if (MCresult->isempty())
{
iptr = new MCImage;
iptr->appendto(imagecache);
iptr->setprop(0, P_TEXT, *epptr, False);
iptr->setname(t_image_name);
return iptr;
}
}
}
return NULL;
}