/
Crimson2/alias/
Crimson2/area.tmp/
Crimson2/area.tmp/AnomalySpaceDock/
Crimson2/area.tmp/AnomalyStation/
Crimson2/area.tmp/AntHill/
Crimson2/area.tmp/ArcticTerrarium/
Crimson2/area.tmp/BuilderCity/
Crimson2/area.tmp/Dungeon/
Crimson2/area.tmp/MiningDock/
Crimson2/area.tmp/PipeSystem/
Crimson2/area.tmp/RattArea/
Crimson2/area.tmp/RobotFactory/
Crimson2/area.tmp/SilverDale/
Crimson2/area.tmp/StarshipFearless/
Crimson2/area.tmp/StationConduits/
Crimson2/area.tmp/TerrariumAlpha/
Crimson2/area.tmp/TerrariumBeta/
Crimson2/area.tmp/TestArea/
Crimson2/area.tmp/Void/
Crimson2/area/
Crimson2/area/AnomalySpaceDock/
Crimson2/area/AnomalyStation/
Crimson2/area/MiningDock/
Crimson2/area/PipeSystem/
Crimson2/area/SilverDale/
Crimson2/area/StationConduits/
Crimson2/area/Void/
Crimson2/board/
Crimson2/clone/
Crimson2/lib/
Crimson2/mole/
Crimson2/mole/mole_src/HELP/
Crimson2/player/
Crimson2/util/
Crimson2/wldedit/
Crimson2/wldedit/res/
// clipbrd.h
// Two-letter Module Descriptor: cb
// ****************************************************************************
// Copyright (C) B. Cameron Lesiuk, 1999. All rights reserved.
// Permission to use/copy this code is granted for non-commercial use only.
// B. Cameron Lesiuk
// Victoria, BC, Canada
// wi961@freenet.victoria.bc.ca
// ****************************************************************************

// This module manages the copy/paste functionality between structure
// elements etc.
//
// This module probably would fit in the edit.c module, but that
// module is way to big already. Thus I spawned off a new module
// for just this stuff.

// NOTE NOTE
// This module's functionality is slated to be moved to the server.
// It would work much better that way.
//
// NOTE NOTE NOTE
// It HAS been moved. This module just saves a "copy" command
// for any given THING, then when a "paste" is issued, it
// issues a copy command at the server, copying the "copy" to
// the "paste" thing. Note that separate "copy" things may exist
// for MOBs, OBJs, etc. To avoid confusion, we arbitrarily
// allow only one "copy" thing.

#include<windows.h>
#include"moledefs.h"
#include"molem.h"
#include"molerc.h"
#include"dstruct.h"
#include"infobox.h"
#include"edit.h"
#include"debug.h"
#include"clipbrd.h"

/* Global variables for clipboard */
//DSSTRUCT *g_cbClipboardStruct;

BOOL cbInitClipboard() {
//  g_cbClipboardStruct=NULL;
  return TRUE;
}

void cbShutdownClipboard() {
  return;
}

// cbCopyStruct will copy the p_Struct to the clipboard for a later paste function
// Note that this function currently only supports DSSMOBILE,DSSOBJECT & DSSWORLD
#pragma argsused
BOOL cbCopyStruct(DSSTRUCT *p_Struct) {
/*  if (!p_Struct)
    return FALSE;

  switch(p_Struct->sType) {
    case DS_STYPE_MOBILE:
    case DS_STYPE_OBJECT:
    case DS_STYPE_WORLD:
      dsStructFree(g_cbClipboardStruct);
      g_cbClipboardStruct=dsStructAlloc(p_Struct->sType);
      dsStructCopy(p_Struct,g_cbClipboardStruct);
      break;
    case DS_STYPE_RESET:
    case DS_STYPE_AREADETAIL:
    default:
      ibInfoBox(g_aahWnd,"Copying this item of data is not supported yet.",
        "Darn it all!",IB_OK,NULL,0L);
      return FALSE;
  }  */
  return TRUE;
}

// cbCopyStruct will copy the p_Struct to the clipboard for a later paste function
// Note that this function currently only supports DSSMOBILE,DSSOBJECT & DSSWORLD
#pragma argsused
BOOL cbPasteStruct(DSSTRUCT *p_Struct) {
//  if (!p_Struct)
//    return FALSE;
//  if (!g_cbClipboardStruct) {
//    ibInfoBox(g_aahWnd,"The clipboard is empty. Try copying something.",
//      "Darn it all!",IB_OK,NULL,0L);
//    return FALSE;
//  }
//
//  if (p_Struct->sType!=g_cbClipboardStruct->sType) {
//    ibInfoBox(g_aahWnd,"The item on the clipboard is not the same as your destination item!",
//      "Darn it all!",IB_OK,NULL,0L);
//    return FALSE;
//  }
//
//  switch(p_Struct->sType) {
//    case DS_STYPE_MOBILE:
//    case DS_STYPE_OBJECT:
//    case DS_STYPE_WORLD:
//      /* Copy the struct over */
//      dsStructCopy(g_cbClipboardStruct,p_Struct);
//      /* now update any open edit windows */
//      if (p_Struct->sEditWindow)
//        SendMessage(p_Struct->sEditWindow,WM_USER_NEWDATA,0,0L);
//      /* and refresh everything else */
//      edGlobalNotification();
//      /* and we're done! */
//      break;
//    case DS_STYPE_RESET:
//    case DS_STYPE_AREADETAIL:
//    default:
//      ibInfoBox(g_aahWnd,"Copying this item of data is not supported yet.",
//        "Darn it all!",IB_OK,NULL,0L);
//      return FALSE;
//  }
  return TRUE;
}