コード例 #1
0
ファイル: xfer.c プロジェクト: jemyzhang/DiddleBug
/*
** Track pen and do the appropriate thing.
*/
Boolean XferPenDown(EventPtr e) {
  Boolean handled = false;

  if (RctPtInRectangle(e->screenX, e->screenY, screen)	/* This cancels the xfer mode */
      && !FrmPointInTitle(FrmGetActiveForm(), e->screenX, e->screenY)) {/* unless we should just popdown the menu */
    SndPlaySystemSound(sndWarning);
    CancelXferMode();
    handled = true;
  }

  return handled;
}
コード例 #2
0
ファイル: frame.cpp プロジェクト: BackupTheBerlios/wxbeos-svn
// get the origin of the client area in the client coordinates
wxPoint wxFrame::GetClientAreaOrigin() const
{
    // there is no API to get client area but we know
    // it starts after titlebar and 1 pixel of form border
    Coord maxY = wxSystemSettings::GetMetric(wxSYS_SCREEN_Y),
          X = 1,
          Y = 0;
    while ( Y < maxY )
    {
        if(!FrmPointInTitle((FormType*)GetForm(),X,Y))
            return wxPoint(X,Y+1);
        Y++;
    }

    return wxPoint(X,0);
}