本文整理汇总了C++中UAS_Pointer类的典型用法代码示例。如果您正苦于以下问题:C++ UAS_Pointer类的具体用法?C++ UAS_Pointer怎么用?C++ UAS_Pointer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了UAS_Pointer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1:
Mark_mmdb::Mark_mmdb (MarkBase_mmdb &base, UAS_Pointer<UAS_Common> &doc_ptr,
const Anchor &anchor,
const char *name, const char *notes)
: f_doc_ptr (doc_ptr),
f_anchor (anchor),
f_mark_base (base),
f_name (NULL),
f_notes (NULL)
{
// This creates a new user mark in the mmdb mark database.
#ifdef FUJITSU_OLIAS
// Id = bookcase id / section id
UAS_String theId = doc_ptr->bid();
theId = theId + "/" + doc_ptr->id();
#else
UAS_String theId = doc_ptr->id();
#endif
f_user_mark = new mark_smart_ptr (base, theId);
set_name (name);
set_notes (notes);
// Flush the new mark to disk.
do_save();
}
开发者ID:,项目名称:,代码行数:26,代码来源:
示例2: PrintOneUASCommon
static void
PrintOneUASCommon(UAS_Pointer<UAS_Common> &doc, Widget pshell, int *cur_pageP)
{
Arg args[15];
int n;
XmString label;
char buf[BUFSIZ];
// Retrieve the topic from the doc
// The retrieve function will send a UAS_DocumentRetrievedMsg to the
// print manager which will render the canvas with the appropriate topic
doc->retrieve((void *)1);
// set print orientation to either landscape or portrait (if set)
if (f_printOrientation != NULL) {
snprintf(buf, sizeof(buf),
"*content-orientation: %s\n", f_printOrientation);
XpSetAttributes(XtDisplay(pshell), XpGetContext(XtDisplay(pshell)),
XPPageAttr, buf, XPAttrMerge);
}
for (gHelpDisplayArea->firstVisible = gHelpDisplayArea->nextNonVisible = 0;
gHelpDisplayArea->nextNonVisible >= 0;
gHelpDisplayArea->firstVisible = gHelpDisplayArea->nextNonVisible + 1)
{
(*cur_pageP)++;
XpStartPage(XtDisplay(pshell), XtWindow(pshell));
snprintf(buf, sizeof(buf), "%d", *cur_pageP);
label = XmStringCreateLocalized(buf);
n = 0;
XtSetArg(args[n], XmNlabelString, label); n++;
XtSetValues(footer_page_no, args, n);
XmStringFree(label);
// Process exposures so label is updated.
XmUpdateDisplay(footer_page_no);
// _DtHelpCleanAndDrawWholeCanvas((XtPointer)gHelpDisplayArea);
XpEndPage(XtDisplay(pshell));
}
// Print chidren if appropriate
if (print_hierarchy)
{
unsigned int i;
UAS_List<UAS_Common> kids = doc->children();
for (i = 0; i < kids.length(); i++)
{
PrintOneUASCommon(kids[i], pshell, cur_pageP);
}
}
}
开发者ID:juddy,项目名称:edcde,代码行数:59,代码来源:PrintPanelAgentMotif.C
示例3: clear_search_hits
void
NodeViewInfo::set_search_hits(UAS_Pointer<UAS_List<UAS_TextRun> >& hits)
{
if (f_current_hit) { // clear search hits previously displayed
clear_search_hits();
}
// retrieve the top container
_DtCvSegment* root_seg;
if ((root_seg = top_container()) == NULL)
return;
unsigned int idx;
for (idx = 0; idx < hits->length(); idx++) { // for each TextRun
UAS_Pointer<UAS_TextRun>& hit = hits->item(idx);
_DtCvSegment* seg;
if ((seg = traverse_for_vcc(root_seg, hit->offset())) == NULL) {
#ifdef DEBUG
fprintf(stderr, "(DEBUG) traverse_for_vcc failed, offset=%d\n",
hit->offset());
#endif
continue;
}
#ifdef DEBUG
else
fprintf(stderr, "(DEBUG) traverse_for_vcc succeeded, offset=%d\n",
hit->offset());
#endif
assert( (seg->type & _DtCvPRIMARY_MASK) == _DtCvSTRING );
if (seg = highlight_search_hit(seg, hit->offset(), hit->length())) {
#ifdef DEBUG
fprintf(stderr, "(DEBUG) highlight_search_hit succeeded, "
"offset=%d\n", hit->offset());
#endif
seg->type |=
_DtCvSEARCH_FLAG | _DtCvSEARCH_BEGIN | _DtCvSEARCH_END;
sr_DtCvSegment* sr_seg = new sr_DtCvSegment(seg);
if (idx == 0) {
seg->type |= _DtCvAPP_FLAG2;
f_current_hit = sr_seg;
}
f_hits.append(sr_seg);
}
#ifdef DEBUG
else
fprintf(stderr, "(DEBUG) highlight_search_hit failed, offset=%d\n",
hit->offset());
#endif
}
}
开发者ID:,项目名称:,代码行数:58,代码来源:
示例4: rg
void
GraphicsMgr::reattach_graphic(UAS_Pointer<Graphic> &gr)
{
Wait_Cursor bob;
gr->set_detached(FALSE);
ReAttachGraphic rg(gr);
UAS_Sender<ReAttachGraphic>::send_message(rg);
UAS_String locator_str = gr->locator();
GraphicAgent *ga = get_agent(locator_str);
remove_detached(ga);
delete ga;
}
开发者ID:,项目名称:,代码行数:13,代码来源:
示例5: main
int main (int, char *[]) {
INIT_EXCEPTIONS();
UAS_Common::initialize ();
UAS_List<UAS_String> locList = UAS_Common::rootLocators ();
for (int i = 0; i < locList.length(); i ++) {
UAS_String &cur = locList[i];
UAS_Pointer<UAS_Common> curDoc = UAS_Common::create(cur);
UAS_Pointer<UAS_Collection> curCol = (UAS_Collection *)
((UAS_Common *) curDoc);
printLocs (curCol->root(), 0);
curDoc = curCol->root();
curCol = 0;
UAS_Common::destroy (curDoc);
}
UAS_Common::finalize ();
return 0;
}
开发者ID:,项目名称:,代码行数:17,代码来源:
示例6:
void
MapAgent::clear_map(UAS_Pointer<UAS_Common> &lib)
{
if(lib->lid() == f_doc_ptr->lid())
{
clear_it();
f_doc_ptr = NULL;
}
}
开发者ID:juddy,项目名称:edcde,代码行数:9,代码来源:MapAgentMotif.C
示例7: UAS_SearchResultsEntry
DtSR_SearchResultsEntry::DtSR_SearchResultsEntry(const char* id,
const char* book,
const char* section,
int dbn, short language,
UAS_Pointer<DtSR_SearchResults>)
: UAS_SearchResultsEntry(id, book, section, Inv_Relevance),
f_dbn(dbn), f_language(language), f_zone(0)
{
int i;
for (i=0; i<=UAS_SearchZones::uas_all; i++)
f_proximity[i] = 0;
UAS_String url("mmdb:LOCATOR=");
url = url + id;
UAS_Pointer<UAS_Common> sec = UAS_Common::create(url);
f_id = sec->locator();
}
开发者ID:juddy,项目名称:edcde,代码行数:18,代码来源:DtSR_SearchResultsEntry.C
示例8: dgl
bool
GraphicsMgr::is_detached(UAS_Pointer<Graphic> &gr)
{
// iterate through the list looking for our graphic.
// if our graphic is in the list, return True.
// Otherwise, return False.
List_Iterator<GraphicAgent*> dgl (&f_detached_list);
for (; dgl; dgl++)
{
UAS_Pointer<Graphic> g = dgl.item()->graphic();
if (gr->locator() == g->locator())
{
return True;
}
}
return False;
}
开发者ID:,项目名称:,代码行数:18,代码来源:
示例9: printLocs
void
printLocs (UAS_Pointer<UAS_Common> doc, int level) {
for (int i = 0; i < level; i ++)
cerr << " ";
UAS_String theLoc = doc->locator();
if (level >= 2) {
char buf[1024];
UAS_String loc = doc->id();
(void) sprintf (buf, "mmdb:LOCATOR=%s", (char *) loc);
UAS_Pointer<UAS_Common> theDoc = UAS_Common::create(buf);
cerr << (char *) theLoc << ", " << (char *) theDoc->title() << endl;
} else {
cerr << (char *) theLoc << endl;
}
UAS_List<UAS_Common> kids = doc->children();
for (i = 0; i < kids.length(); i ++) {
printLocs (kids[i], level + 1);
}
}
开发者ID:,项目名称:,代码行数:19,代码来源:
示例10:
UAS_Pointer<UAS_EmbeddedObject>
UAS_Factory::create_embedded (const UAS_String &locator,
UAS_Pointer<UAS_Common> relative_to) {
UAS_Factory *theFactory = get_factory (locator);
if (theFactory != 0) {
return theFactory->create_embedded_object (locator);
} else {
theFactory = get_factory (relative_to->locator());
return theFactory->create_relative_embedded_object(locator,relative_to);
}
}
开发者ID:juddy,项目名称:edcde,代码行数:11,代码来源:UAS_Factory.C
示例11: operator
void
MarkBase_mmdb::get_marks (UAS_Pointer<UAS_Common> &doc_ptr,
xList<UAS_Pointer<Mark> > &list)
{
#ifdef FUJITSU_OLIAS
UAS_String theId = doc_ptr->bid();
theId = theId + "/" + doc_ptr->id();
#else
UAS_String theId = doc_ptr->id();
#endif
oid_list_handler *l =
f_mark_base->get_mark_list ((char *) theId);
if (l != NULL)
{
for (int i = 1; i <= (*l)->count(); i++)
{
// Pull the entry from the list and replace it with NULL so
// that it doesn't get deleted when the list is deleted.
oid_t id = (*l)-> operator()(i);
// Assure that the oid_t has not been deleted. qfc 7-6-93
if (id.eq (oid_t (c_code_t(0), 0)) == false)
{
try
{
Mark_mmdb *m = find_mark (id, doc_ptr);
list.append (m);
}
catch_any()
{
// ignore failure for now! DJB
}
end_try;
}
}
delete l;
}
}
开发者ID:,项目名称:,代码行数:40,代码来源:
示例12: bookcaseList
UAS_Pointer<UAS_SearchEngine>
MMDB_Library::search_engine() {
UAS_List<UAS_Common> bookcases = bookcaseList();
UAS_PtrList<const char> cList;
unsigned int i;
#ifdef DEBUG
for (i = 0; i < bookcases.length(); i++)
fprintf(stderr, "(DEBUG) bookcases %d=%s\n",
i, (char*)bookcases[i]->id());
#endif
UAS_List<UAS_String> strings;
for (i = 0; i < bookcases.length(); i++) {
UAS_Pointer<UAS_String> string = new UAS_String;
strings.insert_item(string);
}
for (i = 0; i < bookcases.length(); i++)
{
UAS_Pointer<UAS_Common> infolib = bookcases[i]->parent();
UAS_String str = infolib->id();
str = str + "/" + bookcases[i]->id();
*(UAS_String *)strings[i] = str;
cList.append((char*)(*(UAS_String *)strings[i]));
}
#ifdef DTSEARCH
fSearchEngine = &(DtSR_SearchEngine::search_engine (&cList));
#else
fSearchEngine = &(Fulcrum_SearchEngine::search_engine (&cList));
#endif
return fSearchEngine;
}
开发者ID:juddy,项目名称:edcde,代码行数:38,代码来源:MMDB_Library.C
示例13: UASbasename
UAS_BookcaseEntry::UAS_BookcaseEntry(UAS_Pointer<UAS_Common> &bookcase,
int searchable)
: f_searchable(searchable),
f_name(0),
f_base_num(-1)
{
const char *bc_path = bookcase->id();
if (! bc_path) {
f_name = f_path = NULL;
}
else {
const char *bc_name = UASbasename(bc_path);
f_name = new char[strlen(bc_name)+1];
strcpy(f_name, bc_name);
f_path = new char[strlen(bc_path)+1];
strcpy (f_path, bc_path);
}
f_infolib_id = bookcase->lid();
f_bookcase_id = bookcase->bid();
}
开发者ID:,项目名称:,代码行数:24,代码来源:
示例14: LocalHistoryEntry
void
LocalHistoryMgr::append (UAS_Pointer<UAS_Common> &doc_ptr)
{
ON_DEBUG (printf ("&&&&& APPENDING <%s> to history\n", doc_ptr->title()));
LocalHistoryEntry *entry = new LocalHistoryEntry (doc_ptr);
truncate();
entry->f_previous = f_current;
if (f_current != NULL)
f_current = f_current->f_next = entry;
else
{
// Once the first element is set it can never be truncated.
f_first = f_current = entry;
}
entry->f_next = NULL;
}
开发者ID:,项目名称:,代码行数:16,代码来源:
示例15: printTitles
void
printTitles (UAS_Pointer<UAS_Common> doc, int level) {
int i;
for (i = 0; i < level; i ++)
fprintf (stderr, " ");
fprintf (stderr, "%s\n", (char *) doc->title ());
UAS_Pointer<UAS_Common> curDoc;
if (doc->type() == UAS_BOOK) {
curDoc = doc->next();
while (curDoc != 0) {
fprintf (stderr, "********** %s \n", (char *) curDoc->title ());
curDoc = curDoc->next();
}
} else {
UAS_List<UAS_Common> theList = doc->children ();
for (i = 0; i < theList.length(); i ++)
printTitles (theList[i], level + 1);
}
}
开发者ID:,项目名称:,代码行数:19,代码来源:
示例16: dg
void
GraphicsMgr::detach (UAS_Pointer<UAS_Common> &node_ptr,
UAS_Pointer<Graphic> &gr)
{
// called from ViewportAgent
// ViewportAgent will actually remove it from display
gr->set_detached(TRUE);
//PixmapGraphic *pgraphic = gr->pixmap_graphic();
GraphicAgent *ga = new GraphicAgent(node_ptr, gr);
//gr->set_agent(ga);
// add graphic agent to list if not already there.
add_detached(ga);
DetachGraphic dg(gr, ga);
//pgraphic->UAS_Sender<DetachGraphic>::send_message(dg);
UAS_Sender<DetachGraphic>::send_message(dg);
ga->display() ;
}
开发者ID:,项目名称:,代码行数:23,代码来源:
示例17: XmStringCreate
// /////////////////////////////////////////////////////////////////
// display
// /////////////////////////////////////////////////////////////////
void
NodePrintAgent::display(UAS_Pointer<UAS_Common> &node_ptr)
{
Arg args[15];
int n;
XmString label;
char buf[6]; // good enuf for 99,999 pages!
int margin;
RCS_DEBUG("NodePrintAgent::display called.\n");
bool first_time = False;
// if f_help_dsp_area is NULL then this is the first time through
// if gHelpDisplayArea is 0 it has been reset because a new print
// server was selected. in either case we need to create a new
// ui
if ((f_help_dsp_area == NULL) || (gHelpDisplayArea == 0)) {
create_ui(f_print_shell);
first_time = TRUE;
}
// update book name (long title) in footer
n = 0;
label = XmStringCreate(node_ptr->book_name(UAS_LONG_TITLE), XmFONTLIST_DEFAULT_TAG);
XtSetArg(args[n], XmNlabelString, label); n++;
XtSetValues(footer_book_name, args, n);
XmStringFree(label);
// update page number in footer
n = 0;
snprintf(buf, sizeof(buf), "%d", 1);
label = XmStringCreate(buf, XmFONTLIST_DEFAULT_TAG);
XtSetArg(args[n], XmNlabelString, label); n++;
XtSetValues(footer_page_no, args, n);
XmStringFree(label);
// load section
f_node_view_info = print_mgr().load(node_ptr);
_DtCvTopicInfo *topic = f_node_view_info->topic();
if (another_g_top_locator[0] != 0) {
topic->id_str = another_g_top_locator ;
}
SetTopic(f_node_view_info->topic());
another_g_top_locator[0] = 0;
// set margins on the footer form containing both
// the book title and the page number
n = 0;
XtSetArg(args[n], XmNleftOffset, left_margin); n++;
XtSetArg(args[n], XmNrightOffset, right_margin); n++;
// offset bottom by fixed offset of 1/4 inch or 18 pts
XtSetArg(
args[n],
XmNbottomOffset,
XmConvertUnits(window_system().printToplevel(), XmVERTICAL, XmPOINTS, 18, XmPIXELS)
); n++;
XtSetValues(footer_form, args, n);
// if the bottom margin is larger than 18 points, subtract 18 points from the margin
// and used the reduced size
margin = XmConvertUnits(
window_system().printToplevel(), XmVERTICAL, XmPIXELS, bottom_margin, XmPOINTS);
if (margin > 18) {
margin = margin - 18;
margin = XmConvertUnits(
window_system().printToplevel(), XmVERTICAL, XmPOINTS, margin, XmPIXELS);
}
// if bottom margin smaller than 18 points just use the entire margin
else {
margin = bottom_margin;
}
// set offsets for margins on the canvas
n = 0;
XtSetArg(args[n], XmNleftOffset, left_margin); n++;
XtSetArg(args[n], XmNrightOffset, right_margin); n++;
XtSetArg(args[n], XmNtopOffset, top_margin); n++;
//.........这里部分代码省略.........
开发者ID:juddy,项目名称:edcde,代码行数:101,代码来源:NodePrintAgent.C
示例18: fprintf
UAS_Pointer<UAS_List<UAS_TextRun> >
DtSR_SearchResultsEntry::create_matches()
{
#ifdef DEBUG
fprintf(stderr, "(DEBUG) UAS_Common is being created from id=\"%s\"\n",
(char*)f_id);
#endif
UAS_Pointer<UAS_Common> doc = UAS_Common::create(f_id);
#ifdef DEBUG
fprintf(stderr,
"(DEBUG) id=%s\n\t"
"book_name=%s title=%s\n",
(char*)(doc->id()),
(char*)(doc->book_name()), (char*)(doc->title()));
#endif
#ifdef DUMP_NODES
{
ofstream out("OriginalText");
out << (char *) doc->data();
}
#endif
mtry
{
style_sheet_mgr().initOnlineStyleSheet(doc);
}
// catch_noarg (StyleSheetSyntaxError)
mcatch_any()
{
#ifdef JOE_HATES_THIS
message_mgr().error_dialog(
(char*)UAS_String(CATGETS(Set_Messages, 39, "File a Bug")));
#else
throw(CASTEXCEPT Exception());
#endif
}
end_try;
istringstream input((char *)doc->data());
ostringstream output;
mtry
{
Tml_TextRenderer renderer(output, f_search_res->search_zones());
Resolver resolver(*gPathTab, renderer);
DocParser docparser(resolver);
docparser.parse(input);
}
mcatch_any()
{
ON_DEBUG(cerr << "DtSR_SearchResultsEntry::create_matches...exception thrown" << '\n' << flush);
rethrow;
}
end_try;
string outpstr = output.str();
char* text = (char*)outpstr.c_str();
#ifdef DUMP_NODES
{
ofstream out("ParsedText");
out << text;
}
#endif
#ifdef DEBUG
fprintf(stderr, "(DEBUG) stems=0x%p, count=%d\n",
(char*)f_search_res->stems(f_dbn)->stems(),
f_search_res->stems(f_dbn)->count());
int n_of_stems = 0;
for (; n_of_stems < f_search_res->stems(f_dbn)->count(); n_of_stems++) {
fprintf(stderr, "(DEBUG) %dth stem = %s\n", n_of_stems,
(f_search_res->stems(f_dbn)->stems())[n_of_stems]);
}
#endif
int stype = f_search_res->search_type();
DtSrHitword* kwics = NULL;
long n_kwics = 0;
char* parseout = NULL;
// hack! overwrite f_language, since austext's value is wrong
// In future, the next lines should be removed.
const char* lang = getenv("LANG");
if (lang && !strncmp(lang, "ja", strlen("ja")))
f_language = DtSrLaJPN;
else
f_language = DtSrLaENG;
if (f_language == DtSrLaJPN) { // do not trust DtSearchHighlight!
int count = f_search_res->stems(f_dbn)->count();
ostringstream stemsbuf;
//.........这里部分代码省略.........
开发者ID:juddy,项目名称:edcde,代码行数:101,代码来源:DtSR_SearchResultsEntry.C
示例19: snprintf
XmString
SearchHistoryListView::display_value(FolioObject *object)
{
ResultID &rid = *(ResultID*)object;
char buf[8];
snprintf(buf, sizeof(buf), "%d", rid.ndocs());
WXmString matchString = buf;
UAS_Pointer<UAS_SearchResults> results = rid.results();
WXmString scopeString = (char*)*results->scope_name();
WXmString queryString = rid.display_as();
XmFontList fontlist = f_list->FontList();
int number_width = WXmString("0").Width(fontlist) ;
WXmString matchPostfix(
window_system().make_space(
8 * number_width - matchString.Width(fontlist),
*f_list
),
False);
int scope_field_width = 22 * number_width;
int allowance;
if ((allowance = scope_field_width - scopeString.Width(fontlist)) < 0)
{
char* dots = (char*)"...";
// need to free ungenerated at the end
char* ungenerated = (char*)(scopeString + WXmString(dots));
wchar_t* buf = WString(ungenerated);
wchar_t* ptr = buf + wcslen(buf) - (strlen(dots)+1);
XtFree(ungenerated);
WXmString stake;
WString wdots(dots);
do
{
char* str;
memcpy(ptr--, (wchar_t*)wdots, (strlen(dots)+1) * sizeof(wchar_t));
stake = str = WString(buf).get_mbstr();
allowance = scope_field_width - stake.Width(fontlist);
delete[] str;
}
while (allowance <= 0 && ptr >= buf);
while (*ptr <= (wchar_t)' ' && ptr >= buf)
{
char* str;
memcpy(ptr--, (wchar_t*)wdots, (strlen(dots)+1) * sizeof(wchar_t));
stake = str = WString(buf).get_mbstr();
allowance = scope_field_width - stake.Width(fontlist);
delete[] str;
}
scopeString = stake;
}
WXmString scopePostfix(
window_system().make_space(allowance, *f_list), False);
WXmString entry_string = matchString + matchPostfix +
scopeString + scopePostfix +
queryString;
return entry_string.disown();
}
开发者ID:juddy,项目名称:edcde,代码行数:79,代码来源:SearchHistoryListViewMotif.C
示例20: create_ui
void
MapAgent::display (UAS_Pointer<UAS_Common> &doc_ptr, bool popup)
{
static bool first_time = True;
u_int i, num_children;
MapButton *parent_button, *child_button, *this_button = NULL;
if (f_shell == NULL)
create_ui();
// Just pop up the window if the map has already been created
// for the specified document.
if (doc_ptr == f_doc_ptr)
{
if (popup) {
f_shell->Popup();
XMapRaised(XtDisplay(*f_shell), XtWindow(*f_shell));
}
f_onscreen = TRUE;
return;
}
// Must have to create a new tree, so start by wiping out the old one.
if (f_tree != NULL)
{
f_tree->Destroy();
delete f_tree;
}
f_tree = new WXawTree (*f_porthole, "tree");
// f_tree->Realize();
// Tree gravity should be a preference that is retrieved right here.
// (Or better yet stored in the class record.)
/* -------- Start the local map at this node's parent. -------- */
UAS_Pointer<UAS_Common> toc_this = doc_ptr;
UAS_Pointer<UAS_Common> toc_parent =
(doc_ptr != (UAS_Pointer<UAS_Common>)0)
? doc_ptr->parent() : (UAS_Pointer<UAS_Common>)0;
// If the entry has a parent, create a button for it and each of
// the entry's siblings.
if (toc_parent != (UAS_Pointer<UAS_Common>)NULL)
{
parent_button = new MapButton (*f_tree, toc_parent, NULL);
// parent_button->expand();
/* -------- Create a button for each sibling. -------- */
UAS_List<UAS_Common> kids = toc_parent->children();
num_children = kids.length();
UAS_Pointer<UAS_Common> toc_kid;
for (i = 0; i < num_children; i++)
{
toc_kid = kids[i];
child_button = new MapButton (*f_tree, toc_kid, parent_button);
if (toc_kid == doc_ptr)
{
f_doc_ptr = doc_ptr;
this_button = child_button;
}
}
}
else // No TOC parent -- SWM: Also may be no TOC!!!
{
f_doc_ptr = doc_ptr;
this_button = new MapButton (*f_tree, toc_this, NULL);
}
if (this_button == NULL)
{
message_mgr().
error_dialog (CATGETS(Set_Messages, 7, "File a Bug"));
return;
}
else
{
static bool first_time = TRUE;
static Pixel highlight_bg, highlight_fg;
if (first_time)
{
const char *s;
unsigned long status;
s = window_system().get_string_default ("MapHighlightBackground");
if (s == NULL || *s == '\0')
{
highlight_bg = this_button->f_button.Foreground();
}
else
{
status = window_system().get_color (s, highlight_bg);
// On failure to allocate, just invert.
if (status == 0)
{
highlight_bg = this_button->f_button.Foreground();
highlight_fg = this_button->f_button.Background();
}
// Got bg, so now try for fg.
else
//.........这里部分代码省略.........
开发者ID:juddy,项目名称:edcde,代码行数:101,代码来源:MapAgentMotif.C
注:本文中的UAS_Pointer类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论