Back to index

im-sdk  12.3.91
Public Types | Public Member Functions | Private Attributes
ResourceDB Class Reference

#include <ResourceDB.hh>

Collaboration diagram for ResourceDB:
Collaboration graph
[legend]

List of all members.

Public Types

enum  RDB_NAME {
  RDB_CONV_ON_KEY = 2, RDB_IF_NAME = 3, RDB_DISABLE_STATUS_AREA = 4, RDB_FS_NAME = 5,
  RDB_STATIC_EVENT_FLOW = 6
}

Public Member Functions

 ResourceDB (Widget)
 ~ResourceDB ()
int getValues (IMArg *, unsigned int)

Private Attributes

RmDatabase rdb

Detailed Description

Definition at line 89 of file ResourceDB.hh.


Member Enumeration Documentation

Enumerator:
RDB_CONV_ON_KEY 
RDB_IF_NAME 
RDB_DISABLE_STATUS_AREA 
RDB_FS_NAME 
RDB_STATIC_EVENT_FLOW 

Definition at line 94 of file ResourceDB.hh.


Constructor & Destructor Documentation

ResourceDB::ResourceDB ( Widget  toplevel)

Definition at line 137 of file ResourceDB.cpp.

                                      {
  XtGetApplicationResources(toplevel, (char*)&rdb,
                         rdb_items, XtNumber(rdb_items),
                         0, 0);
}

Member Function Documentation

int ResourceDB::getValues ( IMArg args,
unsigned int  n 
)

Definition at line 144 of file ResourceDB.cpp.

                                                 {
  for (IMArg *argp = args; argp < &args[n]; argp++) {
    switch (argp->id) {
    case RDB_CONV_ON_KEY:
      {
       char **pp = (char**)argp->value;
       *pp = (char *)XtMalloc(strlen(rdb.conv_keys) + 1);
       if (!*pp) return RDB_CONV_ON_KEY;
       strcpy(*pp, rdb.conv_keys);
       break;
      }
    case RDB_IF_NAME:
      {
       char **pp = (char**)argp->value;
       *pp = (char *)XtMalloc(strlen(rdb.if_name) + 1);
       if (!*pp) return RDB_IF_NAME;
       strcpy(*pp, rdb.if_name);
       break;
      }
    case RDB_FS_NAME:
      {
       char **pp = (char**)argp->value;
       *pp = (char *)XtMalloc(strlen(rdb.fontset) + 1);
       if (!*pp) return RDB_FS_NAME;
       strcpy(*pp, rdb.fontset);
       break;
      }
    case RDB_DISABLE_STATUS_AREA:
      {
       char **pp = (char**)argp->value;
       *pp = (char*)rdb.disable_status_area;
       break;
      }
    case RDB_STATIC_EVENT_FLOW:
      {
       char **pp = (char**)argp->value;
       *pp = (char*)rdb.static_event_flow;
       break;
      }
      
    default:
      break;
    }
  }
  return 0;
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 103 of file ResourceDB.hh.


The documentation for this class was generated from the following files: