dtinfo subtree dtinfo
[oweals/cde.git] / cde / programs / dtinfo / dtinfo / src / Agents / OutlineListViewMotif.C
index 8e9691cd3360c3aae26f5e87eae68b928f1e4a0a..af237935db6d419df64b618b7186f9bdbb08d468 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 FUJITSU LIMITED      */
 /*    All Rights Reserved                     */
 
@@ -50,7 +72,8 @@
 #include <WWL/WComposite.h>
 #include <WWL/WXmScrollBar.h>
 
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 #include <unistd.h>
 #include <sys/param.h>
 
@@ -88,7 +111,7 @@ OutlineListView::OutlineListView (const WComposite &parent, const char *name,
   f_tracking_element (NULL),
   f_library_agent (NULL)
 {
-  static serial_number = 1;
+  static int serial_number = 1;
 
   // Assign a unique serial number to this outline list. 
   f_serial_number = serial_number++;
@@ -164,7 +187,7 @@ icon_width(Widget w)
   else
     string[0] = OLIAS_PLACEHOLDER_ICON;
   string[1] = '\0';
-  XmString thing = XmStringCreate (string, OLIAS_FONT);
+  XmString thing = XmStringCreate (string, (char*)OLIAS_FONT);
 
   Dimension rval = XmStringWidth(defaultList, thing);
   XmStringFree (thing);
@@ -363,7 +386,7 @@ OutlineListView::create_xm_string (OutlineElement *oe, int base_level,
   else
     s[oe->level() - base_level + 1 + track] = '\0';
   
-  next = XmStringCreate (s, OLIAS_FONT);
+  next = XmStringCreate (s, (char*)OLIAS_FONT);
   
 #ifdef NotDefined
   // Concat the parts 
@@ -776,8 +799,8 @@ OutlineListView::register_actions()
   
   static XtActionsRec actions_list[] =
     {
-      {"OutlineListBeginSelect",   OutlineListView::_select_start},
-      {"OutlineListEndSelect",     OutlineListView::_select_end},
+      {(char*)"OutlineListBeginSelect",   OutlineListView::_select_start},
+      {(char*)"OutlineListEndSelect",     OutlineListView::_select_end},
     };
   
   
@@ -1162,7 +1185,7 @@ OutlineListView::activate (WCallback *wcb)
 
   if ((oe->type() == TOC_Element::TOC_ElementClass) && !expanded)
     {
-      try {
+      mtry {
           UAS_ObjectType type = ((TOC_Element *) oe)->toc()->type();
           switch (type)
           {
@@ -1201,7 +1224,7 @@ OutlineListView::activate (WCallback *wcb)
              break;
           }
         }
-      catch_any()
+      mcatch_any()
         {
           message_mgr().error_dialog( (char*)UAS_String(CATGETS(
                            Set_UrlAgent, 5, "Document not found." )) ) ;