dtinfo subtree dtinfo
[oweals/cde.git] / cde / programs / dtinfo / dtinfo / src / Agents / SearchResultsAgentMotif.C
index 58d92baabf3870fbb02e613c16d04500375f7ecc..4cd165853bd9092f15127296329e2a27ecd80dd9 100644 (file)
@@ -1,3 +1,25 @@
+/*
+ * CDE - Common Desktop Environment
+ *
+ * Copyright (c) 1993-2012, The Open Group. All rights reserved.
+ *
+ * These libraries and programs are free software; you can
+ * redistribute them and/or modify them under the terms of the GNU
+ * Lesser General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * These libraries and programs are distributed in the hope that
+ * they will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with these librararies and programs; if not, write
+ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA 02110-1301 USA
+ */
 /*     Copyright (c) 1994,1995,1996 FUJITSU LIMITED    */
 /*     All Rights Reserved                             */
 
@@ -52,7 +74,8 @@
 #include "Managers/WString.hh"
 
 #include <Prelude.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 
 #include "Registration.hh"
 
@@ -115,7 +138,7 @@ SearchResultsAgent::form_result_string (UAS_Pointer<UAS_SearchResultsEntry> re)
     relevancy[0] += (char) ((re->relevance() * 8 ) / f_scale);
 
 
-  WXmString rel  (relevancy, OLIAS_FONT);
+  WXmString rel  (relevancy, (char*)OLIAS_FONT);
 
   WXmString book;
   WXmString name;
@@ -149,7 +172,7 @@ SearchResultsAgent::form_result_string (UAS_Pointer<UAS_SearchResultsEntry> re)
   }
   else {
 
-    char* dots = "...";
+    char* dots = (char*)"...";
 
     WXmString temp_xmstring = book + WXmString(dots);
     char *temp_str = (char*)temp_xmstring;
@@ -357,7 +380,8 @@ SearchResultsAgent::fill_list(UAS_List<UAS_SearchResultsEntry>& rlist)
   XmString *t = string_table;
 
   int string_count = 0 ;
-  for (int i = 0; i < rlist.length(); i ++) {
+  int i;
+  for (i = 0; i < rlist.length(); i ++) {
       string_count++ ;
       *t++ = form_result_string (rlist[i]);
   }
@@ -423,7 +447,7 @@ SearchResultsAgent::fill_list(UAS_List<UAS_SearchResultsEntry>& rlist)
 void
 SearchResultsAgent::create_window()
 {
-  create_base_window ("results");
+  create_base_window ((char*)"results");
 
   XmStringLocalized mtfstring;
   String           string;
@@ -431,7 +455,7 @@ SearchResultsAgent::create_window()
   string = CATGETS(Set_SearchResultsAgent, 1, "Dtinfo: Search Results");
   XtVaSetValues((Widget)*f_shell, XmNtitle, string, NULL);
 
-  help_agent().add_activate_help(f_help, "results_help");
+  help_agent().add_activate_help(f_help, (char*)"results_help");
 
 #define AM WAutoManage
   // NOTE: need form to contain things in the same row 'cause of resizing
@@ -464,7 +488,7 @@ SearchResultsAgent::create_window()
   mtfstring = CATGETS(Set_AgentLabel, 221, "Query:");
   XtVaSetValues(query_label, XmNlabelString, (XmString)mtfstring, NULL);
   
-  Widget textw = XmCreateScrolledText (*f_pane, "query_text", NULL, 0);
+  Widget textw = XmCreateScrolledText (*f_pane, (char*)"query_text", NULL, 0);
   f_query_text = new WXmText (textw);
   f_query_text->Manage();
 //  WXmPushButton      editq           (*f_panel,       "edit_query",     AM);
@@ -505,7 +529,7 @@ SearchResultsAgent::create_window()
     header.FontList(header_font);
   }
 
-  int offset = WXmString(relevancy, OLIAS_FONT).Width(f_list->FontList());
+  int offset = WXmString(relevancy,(char*)OLIAS_FONT).Width(f_list->FontList());
   header.LeftOffset(offset); 
 
   WXmPrimitive prim(XtParent(*f_list));