85 lines
2.1 KiB
C
85 lines
2.1 KiB
C
|
|
#ifndef RES_CENTER_H
|
||
|
|
#define RES_CENTER_H
|
||
|
|
|
||
|
|
#define _CRT_SECURE_NO_WARNINGS
|
||
|
|
#define WIN32_LEAN_AND_MEAN
|
||
|
|
#include <windows.h>
|
||
|
|
#include <stdio.h>
|
||
|
|
#include <stdlib.h>
|
||
|
|
#include <string.h>
|
||
|
|
|
||
|
|
#include <ProToolkit.h>
|
||
|
|
#include <ProUICmd.h>
|
||
|
|
#include <ProMdl.h>
|
||
|
|
#include <ProSolid.h>
|
||
|
|
#include <ProAssembly.h>
|
||
|
|
#include <ProAsmcomp.h>
|
||
|
|
#include <ProWindows.h>
|
||
|
|
#include <ProUtil.h>
|
||
|
|
#include <ProArray.h>
|
||
|
|
#include <ProFamtable.h>
|
||
|
|
#include <ProFaminstance.h>
|
||
|
|
#include <ProFeatType.h>
|
||
|
|
#include <ProPattern.h>
|
||
|
|
#include <ProMenu.h>
|
||
|
|
#include <ProAsmcomppath.h>
|
||
|
|
|
||
|
|
#include <ProSelection.h>
|
||
|
|
#include <ProFeature.h>
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
extern "C" {
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#define FILE_PATH_LEN 512
|
||
|
|
#define MAX_NAME 128
|
||
|
|
#define MAX_DESC 256
|
||
|
|
#define MAX_LINE 1024
|
||
|
|
#define MAX_FAVORITES 512
|
||
|
|
#define MAX_RECENT 64
|
||
|
|
|
||
|
|
typedef struct {
|
||
|
|
char module_dir[FILE_PATH_LEN];
|
||
|
|
char lib_root[FILE_PATH_LEN];
|
||
|
|
char cfg_dir[FILE_PATH_LEN];
|
||
|
|
} ResCenterApp;
|
||
|
|
|
||
|
|
extern ResCenterApp g_app;
|
||
|
|
extern HINSTANCE g_hInst;
|
||
|
|
|
||
|
|
void app_show_error(const char* msg);
|
||
|
|
int asm_assemble_part(const char* path, const char* inst, double xlen);
|
||
|
|
int asm_assemble_part_matrix(const char* path, const char* inst, const double matrix[4][4]);
|
||
|
|
int asm_get_placement_matrix(double matrix[4][4]);
|
||
|
|
int asm_replace_component(int replace_all);
|
||
|
|
void asm_clear_replace_target(void);
|
||
|
|
|
||
|
|
int fav_add(const char* path);
|
||
|
|
int fav_remove(const char* path);
|
||
|
|
int fav_is_favorite(const char* path);
|
||
|
|
int fav_get_all(char paths[][FILE_PATH_LEN], int max);
|
||
|
|
int fav_get_count(void);
|
||
|
|
int fav_save(void);
|
||
|
|
|
||
|
|
int recent_add(const char* path, const char* inst);
|
||
|
|
int recent_get_all(char paths[][FILE_PATH_LEN], char insts[][MAX_NAME], int max);
|
||
|
|
int recent_get_count(void);
|
||
|
|
|
||
|
|
/* preview.c */
|
||
|
|
PVOID pv3d_create(HWND parent, int x, int y, int w, int h);
|
||
|
|
void pv3d_destroy(PVOID pv);
|
||
|
|
void pv3d_move(PVOID pv, int x, int y, int w, int h);
|
||
|
|
void pv3d_show_model(PVOID pv, const char* name, const char* path);
|
||
|
|
void pv3d_show_default(PVOID pv);
|
||
|
|
void pv3d_invalidate(PVOID pv);
|
||
|
|
|
||
|
|
int dlg_init(HINSTANCE hi);
|
||
|
|
int dlg_show(int ci);
|
||
|
|
int dlg_get_result(char* path, size_t psz, char* inst, size_t isz);
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
}
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#endif
|