本文整理汇总了C++中BPoint::PrintToStream方法的典型用法代码示例。如果您正苦于以下问题:C++ BPoint::PrintToStream方法的具体用法?C++ BPoint::PrintToStream怎么用?C++ BPoint::PrintToStream使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BPoint
的用法示例。
在下文中一共展示了BPoint::PrintToStream方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FolderRow
bool ListView1::InitiateDrag(BPoint point, bool wasSelected) {
printf("InitiateDrag():");
point.PrintToStream();
BRow *row=FocusRow();
if (row==NULL) return false;
/*
if ((CDMode==DATACD_INDEX) || (CDMode==BOOTABLECD_INDEX)) { // yes? then we are not in audio mode
folderRow=new FolderRow(((FolderRow *)row)->GetFilename(),
((FolderRow *)row)->IsFolder(),
((FolderRow *)row)->GetBitmap());
} else */
if ((CDMode==AUDIOCD_INDEX) || (CDMode==CDEXTRA_INDEX)){
audioRow=new AudioRow(((AudioRow *)row)->GetTrackNumber(),((AudioRow *)row)->GetFilename(),
((AudioRow *)row)->GetPregap(),
((AudioRow *)row)->GetBytes(),
((AudioRow *)row)->GetLength());
audioRow->SetCDTitle(((AudioRow *)row)->GetCDTitle());
audioRow->SetIndexList(((AudioRow *)row)->GetIndexList());
audioRow->SetPregap(((AudioRow *)row)->GetPregap());
audioRow->SetStartFrame(((AudioRow *)row)->GetStartFrame());
audioRow->SetEndFrame(((AudioRow *)row)->GetEndFrame());
// audioRow->SetStartTime(((AudioRow *)row)->GetStartTime());
// audioRow->SetEndTime(((AudioRow *)row)->GetEndTime());
//audioRow=new AudioRow(*((AudioRow *)row));
}
BMessage *message=new BMessage(LISTITEM_DROPPED);
BRect rect;
if (GetRowRect(row, &rect)) {
void *r=(void *)row;
message->AddPointer("from", r);
if (!((FolderRow *)row)->IsFolder())
message->AddInt32("index", (int32)IndexOf(row));
DragMessage(message, rect);
// if ((CDMode==AUDIOCD_INDEX) || (CDMode==CDEXTRA_INDEX))
// RemoveRow(IndexOf(row));
//delete row;
}
return true;
}
示例2:
void
View::FrameMoved(BPoint point)
{
point.PrintToStream();
}