本文整理汇总了C++中SourceFile::SetBuildFlag方法的典型用法代码示例。如果您正苦于以下问题:C++ SourceFile::SetBuildFlag方法的具体用法?C++ SourceFile::SetBuildFlag怎么用?C++ SourceFile::SetBuildFlag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SourceFile
的用法示例。
在下文中一共展示了SourceFile::SetBuildFlag方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BMessage
//.........这里部分代码省略.........
r.bottom -= B_H_SCROLL_BAR_HEIGHT;
fProjectList = new ProjectList(fProject, r,"filelist",B_FOLLOW_ALL);
fProjectList->SetInvocationMessage(new BMessage(M_EDIT_FILE));
BScrollView *scrollView = new BScrollView("scrollView",fProjectList,
B_FOLLOW_ALL,0,false,true);
top->AddChild(scrollView);
fProjectList->SetTarget(this);
r.top = r.bottom + 1;
r.bottom = Bounds().bottom;
fStatusBar = new BStringView(r,"statusbar", NULL, B_FOLLOW_LEFT_RIGHT |
B_FOLLOW_BOTTOM);
top->AddChild(fStatusBar);
fStatusBar->SetViewColor(235,235,235);
fStatusBar->SetFontSize(10.0);
SetupMenus();
if (project)
{
BString title("Paladin: ");
title << project->GetName();
SetTitle(title.String());
for (int32 i = 0; i < project->CountGroups(); i++)
{
SourceGroup *group = project->GroupAt(i);
SourceGroupItem *groupitem = new SourceGroupItem(group);
fProjectList->AddItem(groupitem);
groupitem->SetExpanded(group->expanded);
for (int32 j = 0; j < group->filelist.CountItems(); j++)
{
SourceFile *file = group->filelist.ItemAt(j);
SourceFileItem *fileitem = new SourceFileItem(file,1);
// fProjectList->AddUnder(fileitem,groupitem);
fProjectList->AddItem(fileitem);
BString abspath = file->GetPath().GetFullPath();
if (abspath[0] != '/')
{
abspath.Prepend("/");
abspath.Prepend(project->GetPath().GetFolder());
}
BEntry entry(abspath.String());
if (entry.Exists())
{
if (project->CheckNeedsBuild(file,false))
{
fileitem->SetDisplayState(SFITEM_NEEDS_BUILD);
fProjectList->InvalidateItem(fProjectList->IndexOf(fileitem));
}
else
file->SetBuildFlag(BUILD_NO);
}
else
{
fileitem->SetDisplayState(SFITEM_MISSING);
fProjectList->InvalidateItem(fProjectList->IndexOf(fileitem));
}
}
}
}
BNode node(fProject->GetPath().GetFullPath());
if (node.ReadAttr("project_frame",B_RECT_TYPE,0,&r,sizeof(BRect)) == sizeof(BRect))
{
if (r.Width() < 200)
r.right = r.left + 200;
if (r.Height() < 200)
r.top = r.bottom + 200;
MoveTo(r.left,r.top);
ResizeTo(r.Width(),r.Height());
}
fProjectList->MakeFocus(true);
if (gShowFolderOnOpen)
{
// Duplicated code from MessageReceived::M_SHOW_PROJECT_FOLDER. Doing
// it here in combo with snooze() makes it much more likely that the
// opened project window is frontmost instead of the project folder's window
entry_ref ref;
BEntry(fProject->GetPath().GetFolder()).GetRef(&ref);
BMessenger msgr("application/x-vnd.Be-TRAK");
BMessage reply;
BMessage openmsg(B_REFS_RECEIVED);
openmsg.AddRef("refs",&ref);
msgr.SendMessage(&openmsg);
snooze(50000);
}
if (gAutoSyncModules)
PostMessage(M_SYNC_MODULES);
}