home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1999 July
/
PCWorld_1999-07_cd.bin
/
602
/
WBPERSON
/
data1.cab
/
SDK_Files
/
C-lang
/
C.L1
/
WBPREZEN.H
< prev
Wrap
C/C++ Source or Header
|
1999-06-09
|
18KB
|
403 lines
/****************************************************************************/
/* wbprezen.h - hlavicky procedur a funkci prezentacni vrstvy WinBase602 */
/* (C) Janus Drozd, 1992, 93, 94, 95, 96, 97, 98, 99 */
/* verze: 6.0 (32-bit) */
/****************************************************************************/
#ifndef __WBPREZEN_H__
#define __WBPREZEN_H__
#include "general.h"
#include "cdp.h"
/****** Priznaky "flags" pro Open_view, Select_records, Relate_records,
Set_fcursor a Bind_records: ******/
#define NO_EDIT 0x01 /* zakaz editace v pohledu */
#define NO_INSERT 0x02 /* zakaz vkladani zaznamu */
#define NO_MOVE 0x04 /* zakaz prechodu mezi zaznamy */
#define NO_DELETE 0x08 /* zakaz ruseni zaznamu */
#define DEL_RECS 0x10 /* zobrazovat i zrusene zaznamy */
#define AUTO_CURSOR 0x40 /* uzavrit cursor pri zavirani pohledu */
#define COUNT_RECS 0x80 /* spocitat zaznamy pri otevreni pohledu */
#define MODAL_VIEW 0x100 /* otevrit pohled jako modalni popup okno */
#define QUERY_VIEW 0x10000L /* otevrit pohled pro zadavani dotazu */
#define PARENT_CURSOR 0x80000L /* pouzit kurzor a cache z parent-pohledu */
#define MODELESS_VIEW 0x100000 /* otevrit pohled jako popup okno */
/* Hodnota "base" pro Open_view, Print_view, Bind_records a Select_records **/
#define NO_REDIR (tcursnum)0xffff
/* Cislo okna MDI-Client v aplikacich WinBase (neni-li okno vytvoreno aplikaci) */
#define CLIENT_ID 1
/* Parametr typu WORD zpravy WM_COMMAND pozadujici otevreni stranky napovedy
cislo lParam - zastarale */
#define IDM_HELP_GENERIC 239
/* Parametry funkce Reset_view */
#define RESET_VISIBLILITY 0 /* nastaveni viditelnosti a aktivity slozek */
#define RESET_CONTROLS 1 /* nastaveni obsahu slozek */
#define RESET_DELETIONS 5 /* odstraneni zrusenych a pridani vlozenych zaznamu */
#define RESET_CACHE 0x100 /* nove naplneni cache */
#define RESET_CURSOR 0x200 /* nove otevreni kurzoru */
#define RESET_SYNCHRO 0x400 /* resynchronizace subpohledu */
#define RESET_COMBOS 0x800 /* nove naplneni comb */
/* Oznaceni formatu dat */
#define IMPEXP_FORMAT_WINBASE 0
#define IMPEXP_FORMAT_TEXT_COLUMNS 1
#define IMPEXP_FORMAT_TEXT_CSV 2
#define IMPEXP_FORMAT_DBASE 3
#define IMPEXP_FORMAT_FOXPRO 4
#define IMPEXP_FORMAT_ODBC 5
#define IMPEXP_FORMAT_CURSOR 6
#define IMPEXP_FORMAT_TABLE 10
#define IMPEXP_FORMAT_TABLE_REIND 11
/******************** Automaticky generovane zpravy: ************************/
#define NOTIF_CREATE 1 /* pohled byl otevren */
#define NOTIF_DESTROY 2 /* pohled byl uzavren */
#define NOTIF_RECENTER 3 /* vybran novy zaznam v pohledu */
#define NOTIF_CHANGE 4 /* zmenena slozka pohledu */
#define NOTIF_RESET_RECORD 5 /* vybrany zaznam se prekresluje */
#define NOTIF_RESET_VIEW 6 /* cely pohled se prekresluje */
#define NOTIF_SUBCURSOR 7 /* pohled prechazi k subkurzoru QBE */
#define NOTIF_SUPERCURSOR 8 /* pohled se vraci k superkurzoru */
#define NOTIF_CREATE_DEPENDENT 9 /* otevren zavisly pohled */
#define NOTIF_DESTROY_DEPENDENT 10 /* uzavren zavisly pohled */
#define NOTIF_CREATE_EDITOR 11 /* otevren textovy editor */
#define NOTIF_DESTROY_EDITOR 12 /* uzavren textovy editor */
#define NOTIF_CREATE_VIEWER 13 /* otevreno okno s obrazkem */
#define NOTIF_DESTROY_VIEWER 14 /* uzavreno okno s obrazkem */
/******************** Otevreni okna aplikace ********************************/
#define WB_TB_UNKNOWN 0 /* typy toolbaru pro SZM_SETTOOLBAR */
#define WB_TB_DEFAULT 1
#define WB_TB_VIEW 2
#define WB_TB_VIEWNOMOVE 3
#define WB_TB_VIEWPROJ 4
#define WB_TB_VIEWQUERY 5
#define WB_TB_HIST 6
#define WB_TB_INDEX 7
#define WB_TB_EDITTEXT 8
#define WB_TB_PREVIEW 9
#define WBF_NO_TOOLBAR 1 /* priznaky pro vytvareni hlavniho okna */
#define WBF_NO_STATUSBAR 2
typedef struct
{ int WinMenu;
WORD Flags;
} WBFramePars;
/******************** Cisla zprav pro okenni funkci pohledu *****************/
#define WM_SZM_BASE WM_USER+500
#define SZM_IS_VISIBLE WM_SZM_BASE+50
#define SZM_IS_ENABLED WM_SZM_BASE+51
#define SZM_GET_ACCESS WM_SZM_BASE+54
#define SZM_RECORD_ENTER WM_SZM_BASE+56
#define SZM_NEXTREC WM_SZM_BASE+60
#define SZM_PREVREC WM_SZM_BASE+61
#define SZM_FIRSTREC WM_SZM_BASE+62
#define SZM_LASTREC WM_SZM_BASE+63
#define SZM_NEXTPAGE WM_SZM_BASE+64
#define SZM_PREVPAGE WM_SZM_BASE+65
#define SZM_FIRSTITEM WM_SZM_BASE+66
#define SZM_LASTITEM WM_SZM_BASE+67
#define SZM_NEXTTAB WM_SZM_BASE+68
#define SZM_PREVTAB WM_SZM_BASE+69
#define SZM_DOWNITEM WM_SZM_BASE+70
#define SZM_UPITEM WM_SZM_BASE+71
#define SZM_INDEX WM_SZM_BASE+72
#define SZM_QBE WM_SZM_BASE+74
#define SZM_UNLIMIT WM_SZM_BASE+75
#define SZM_BIND WM_SZM_BASE+76
#define SZM_SETIPOS WM_SZM_BASE+77
#define SZM_INSERT WM_SZM_BASE+78
#define SZM_DELREC WM_SZM_BASE+79
#define SZM_DELALL WM_SZM_BASE+80
#define SZM_REC_STATUS WM_SZM_BASE+82
#define SZM_DELASK WM_SZM_BASE+83
#define SZM_DO_ACTION WM_SZM_BASE+84
#define SZM_SETEPOS WM_SZM_BASE+85
#define SZM_HELP WM_SZM_BASE+86
#define SZM_RESET WM_SZM_BASE+87
#define SZM_ORDER WM_SZM_BASE+88
#define SZM_PRINT WM_SZM_BASE+89
#define SZM_ACCEPT_Q WM_SZM_BASE+90
#define SZM_UNBINDDEL WM_SZM_BASE+91
#define SZM_GET_NAME WM_SZM_BASE+93
#define SZM_GET_TEXT_VAL WM_SZM_BASE+94
#define SZM_PUT_TEXT_VAL WM_SZM_BASE+95
#define SZM_GET_REF_VAL WM_SZM_BASE+96
#define SZM_GET_FEATURES WM_SZM_BASE+97
#define SZM_GET_ROW_HEADER WM_SZM_BASE+98
#define SZM_DELETE_COLUMN WM_SZM_BASE+99
#define SZM_ALT_TEXT_VAL WM_SZM_BASE+100
#define SZM_INSERT_COLUMN WM_SZM_BASE+101
#define SZM_GET_TOOLBAR WM_SZM_BASE+102
#define SZM_SELECT_ME WM_SZM_BASE+103
#define SZM_LOCKS WM_SZM_BASE+104
#define SZM_DROP WM_SZM_BASE+105
#define SZM_SET_EDIT_POS WM_SZM_BASE+106
#define SZM_EXPORTRQ WM_SZM_BASE+107
#define SZM_IMPORTRQ WM_SZM_BASE+108
#define SZM_TOKEN WM_SZM_BASE+118
#define SZM_PRIVILS WM_SZM_BASE+119
#define SZM_SETSTATUSTEXT WM_SZM_BASE+212
#define SZM_SETTOOLBAR WM_SZM_BASE+213
/************** parametry zpravy WM_COMMAND okna editoru ********************/
/* 500 - Text popup */
#define MI_FSED_SAVE 501
#define MI_FSED_CLOSE 502
/* 504 - Print popup */
#define MI_FSED_PRINT_TEXT 505
#define MI_FSED_PRINT_BLOCK 506
#define MI_FSED_SELPRINTER 507
/* 510 - Edit Popup */
#define MI_FSED_CUT 511
#define MI_FSED_COPY 512
#define MI_FSED_PASTE 513
#define MI_FSED_DELETE 514
#define MI_FSED_HIDE 515
#define MI_FSED_BSAVE 516
#define MI_FSED_BLOAD 517
#define MI_FSED_ABSAVE 518
#define MI_FSED_SELALL 519
#define MI_FSED_DOSSAVE 520
#define MI_FSED_DOSLOAD 521
#define MI_FSED_UNDO 522
/* 525 - Format popup */
#define MI_FSED_WRAP 526
#define MI_FSED_ALIGN 527
#define MI_FSED_FORMAT 528
/* 550 - Search popup */
#define MI_FSED_FIND 551
#define MI_FSED_REPLACE 552
#define MI_FSED_REFIND 553
/** Konstanty pro property ViewSrcCateg a DataSrcCateg OLE objektu a ActiveX **/
#define CTG_TABLE 1
#define CTG_CURSOR 2
#define CTG_SELECT 3
#define CTG_VIEWNAME 1
#define CTG_VIEWSRC 2
/************************ Dispatch ID properties ActiveX ***********************/
#define DID_SERVER 1
#define DID_SERVERIP 2
#define DID_USERNAME 3
#define DID_PASSWORD 4
#define DID_APPLICATION 5
#define DID_VIEWSRC 6
#define DID_DATASRC 7
#define DID_TOPREC 101
#define DID_VIEWSRCTG 106
#define DID_DATASRCTG 107
/*************************** Dispath ID metod ActiveX *************************/
#define DID_QBE 201
#define DID_SORT 202
#define DID_ACCEPTQ 203
#define DID_CANCELQ 204
#define DID_FIRSTREC 205
#define DID_PREVPAGE 206
#define DID_PREVREC 207
#define DID_NEXTREC 208
#define DID_NEXTPAGE 209
#define DID_LASTREC 210
#define DID_FIRSTITEM 211
#define DID_LASTITEM 212
#define DID_NEXTTAB 213
#define DID_PREVTAB 214
#define DID_UPITEM 215
#define DID_DOWNITEM 216
#define DID_CUT 217
#define DID_COPY 218
#define DID_PASTE 219
#define DID_INSERT 220
#define DID_DELREC 221
#define DID_DELASK 222
#define DID_UNBINDDEL 223
#define DID_PRINT 224
#define DID_INDEX 225
#define DID_LOCKS 226
#define DID_HELP 227
#define DID_ED_SAVE 228
#define DID_ED_FIND 229
#define DID_ED_REPLACE 230
#define DID_ED_REFIND 231
#define DID_ED_FORMAT 232
#define DID_RESET 301
#define DID_COMMIT 302
#define DID_ROLLBACK 303
#define DID_GETCURITEM 304
#define DID_GETCURPOS 305
#define DID_SETCURPOS 306
#define DID_GETITEMVAL 307
#define DID_SETITEMVAL 308
#define DID_PRINTOPT 309
#define DID_PRINTOPTDLG 310
#define DID_PRINTSEL 311
#define DID_PRINTSELDLG 312
#define DID_QBESTATE 313
#define DID_EDITTEXT 314
#define DID_OPENPICTURE 315
#define DID_PICKAPPL 316
#define DID_EXECSTTMNTS 317
/************************** Procedury a funkce ******************************/
#ifdef __cplusplus
extern "C" {
#endif
// Jednoduchy vstup a vystup
DllPrezen void WINAPI Info_box (const char * caption, const char * text);
DllPrezen BOOL WINAPI Yesno_box(const char * caption, const char * text);
DllPrezen BOOL WINAPI Input_box(const char * caption, char * text, int maxlen);
DllPrezen void WINAPI Set_status_nums(trecnum num0, trecnum num1);
DllPrezen void WINAPI Set_status_text(const char * text);
DllPrezen BOOL WINAPI Signalize(void);
DllPrezen void WINAPI Kernel_error_box(int errnum);
// Otevirani pohledu
DllPrezen window_id WINAPI Open_view(const char * viewdef, tcursnum base,
uns32 flags, trecnum position, void * reserved,
window_id hParent, window_id * hView);
DllPrezen window_id WINAPI Select_records(const char * viewdef, tcursnum base,
uns32 flags, int limit, trecnum * bindl, void * reserved,
window_id hParent, window_id * hView);
DllPrezen window_id WINAPI Relate_record(const char * relation1,
const char * viewdef, tcursnum base, uns32 flags, void * reserved,
window_id * viewid, const char * relation2);
// Manipulace s otevrenym pohledem
DllPrezen void WINAPI Close_view(window_id hView);
DllPrezen void WINAPI Close_all_views(void);
DllPrezen void WINAPI Pick_window(window_id hView);
DllPrezen BOOL WINAPI Register_rec_syn(window_id hWnd1, window_id hWnd2);
DllPrezen window_id WINAPI Active_view(void);
DllPrezen int WINAPI Current_item(window_id hView);
DllPrezen BOOL WINAPI Get_fcursor (window_id hView, tcursnum * curs, uns16 * flags);
DllPrezen BOOL WINAPI Set_fcursor (window_id hView, tcursnum curs, uns32 flags);
DllPrezen int WINAPI QBE_state (window_id hView);
// Pozice v pohledu
DllPrezen BOOL WINAPI Get_view_pos(window_id hView, trecnum * irec, trecnum * erec);
DllPrezen BOOL WINAPI Set_int_pos (window_id hView, trecnum pos, int itemnum);
DllPrezen BOOL WINAPI Set_ext_pos (window_id hView, trecnum pos, int itemnum);
// Ovladani obsah pohledu:
DllPrezen BOOL WINAPI Get_item_value(window_id hView, trecnum intrec, int itemid, char * value);
DllPrezen BOOL WINAPI Set_item_value(window_id hView, trecnum intrec, int itemid, const char * value);
DllPrezen BOOL WINAPI Commit_view (window_id hView, BOOL can_ask, BOOL report_error);
DllPrezen void WINAPI Roll_back_view(window_id hView);
DllPrezen void WINAPI Reset_view (window_id hView, trecnum intrec, int extent);
DllPrezen int WINAPI Tab_page (window_id hView, int ID);
// Tisky:
DllPrezen BOOL WINAPI Print_view(const char * viewdef, tcursnum base,
trecnum firstrec, trecnum lastrec, void * reserved);
DllPrezen void WINAPI View_pattern(tobjnum viewobj);
DllPrezen BOOL WINAPI Page_setup (window_id hParent);
DllPrezen BOOL WINAPI Print_opt (window_id hParent);
DllPrezen BOOL WINAPI Print_optEx (window_id hParent, BOOL IsLabel);
DllPrezen BOOL WINAPI Printer_dialog(window_id hParent);
DllPrezen BOOL WINAPI Printer_select(const char * printer_name,
const char * port_name, int orientation, int papersize, int paperbin,
int quality, int duplex, int color, int truetype);
DllPrezen BOOL WINAPI Print_copies(int copies, BOOL collate);
DllPrezen void WINAPI Set_printer(trecnum firstrec, trecnum lastrec, int firstpage,
int lastpage, int direction, const char * outfile, int leftmargin);
DllPrezen void WINAPI Print_margins(int leftmargin, int rightmargin,
int topmargin, int bottommargin);
DllPrezen void WINAPI Set_first_label(unsigned posX, unsigned posY);
// Menu:
DllPrezen BOOL WINAPI Main_menu(const char * menudef);
// Napoveda:
DllPrezen void WINAPI Help_file(const char * filename);
DllPrezen void WINAPI Show_help (unsigned topic);
DllPrezen void WINAPI Show_help_popup(unsigned topic);
// Vyber souboru nebo adresare:
DllPrezen BOOL WINAPI Select_file (window_id hParent, char * filename);
DllPrezen BOOL WINAPI Select_directory(window_id hParent, char * dirname);
// Funkce pro vytvoreni aplikace v externim jazyce
DllPrezen LRESULT WINAPI DefWinBaseFrameProc(window_id hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
DllPrezen LRESULT WINAPI WinBaseFrameProc(window_id hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
DllPrezen BOOL WINAPI Open_project(const char * projname);
DllPrezen void * WINAPI Get_var_address(const char * name);
DllPrezen int WINAPI Exec_statements(cdp_t cdp, const char * statements);
DllPrezen BOOL WINAPI Init_window_env(window_id hFrame, window_id hClient,
int winsub_pos, UINT Flags);
DllPrezen void WINAPI Register_ext_menu(window_id hFrame, HMENU hMenu, HMENU hWinsubMenu);
DllPrezen window_id WINAPI GetClient(window_id hFrame);
DllPrezen void WINAPI Init_non_mdi_env(cdp_t cdp, HWND hMainWindow);
// Prace s pravy, uzivateli a objekty
DllPrezen BOOL WINAPI Acreate_user(cdp_t cdp, window_id hParent);
DllPrezen BOOL WINAPI Aset_password(cdp_t cdp, window_id hParent);
DllPrezen BOOL WINAPI Alogin(window_id hParent);
DllPrezen BOOL WINAPI Amodify_user(cdp_t cdp, window_id hParent, tobjnum objnum);
#define MULTIREC 1
#define MULTITAB 2
DllPrezen BOOL WINAPI Edit_privils (cdp_t cdp, window_id hParent, ttablenum * tbs, trecnum * recnums, int multioper);
DllPrezen BOOL WINAPI Edit_relation(cdp_t cdp, window_id hParent, tcateg subject1,
tobjnum subjnum, tcateg subject2);
#define CO_FLAG_NOEXPORT 0x40
#define CO_FLAG_NOEXPORTD 0x10
DllPrezen BOOL WINAPI Chng_component_flag(cdp_t cdp, tcateg cat,
ctptr name, int mask, int setbit);
DllPrezen char * WINAPI Next_user_name(cdp_t cdp, window_id hView, trecnum erec);
// Predavani peska
DllPrezen BOOL WINAPI AToken_control(cdp_t cdp, window_id hParent, tcurstab curstab, trecnum recnum);
#define TOKEN_HOLD 0
#define TOKEN_FREE 1 /* free all if record not specified */
#define TOKEN_REQ 2
#define TOKEN_INVAL 3
#define TOKEN_HAVE_I 4
#define TOKEN_HOLD_I 5
DllPrezen BOOL WINAPI Token_control(cdp_t cdp, tcurstab curstab, trecnum recnum, int oper);
DllPrezen BOOL WINAPI AReplicate(cdp_t cdp, HWND hParent, BOOL pull);
DllPrezen BOOL WINAPI ASkip_repl(cdp_t cdp, HWND hParent);
// Ostatni:
DllPrezen BOOL WINAPI Move_data(cdp_t cdp, tobjnum move_descr_obj,
const char * inpname, tobjnum inpobj, const char * outname,
int inpformat, int outformat, int inpcode, int outcode, BOOL silent);
DllViewed BOOL WINAPI Edit_view(cdp_t cdp, const char * name);
DllViewed BOOL WINAPI Export_appl(cdp_t cdp, HWND hParent,
BOOL with_data, BOOL with_role_privils, BOOL with_usergrp);
DllViewed BOOL WINAPI Export_appl_ex(cdp_t cdp, HWND hParent,
BOOL with_data, BOOL with_role_privils, BOOL with_usergrp, BOOL exp_locked, BOOL back_end);
DllViewed BOOL WINAPI Export_exx(cdp_t cdp, HWND hParent);
DllViewed BOOL WINAPI Import_appl(cdp_t cdp, HWND hParent, char * fname);
DllViewed BOOL WINAPI Edit_query(cdp_t cdp, const char * name);
DllPrezen void WINAPI Edit_impexp(cdp_t cdp, const char * name);
DllViewed BOOL WINAPI Edit_table(cdp_t cdp, HWND hParent, const char * name, tobjnum objnum);
// Zastarale funkce:
DllPrezen BOOL WINAPI From_xbase(const char * tablename, const char * filename, BOOL dBase, int filecode);
DllPrezen BOOL WINAPI To_xbase (const char * tablename, const char * filename, BOOL dBase, int filecode);
DllPrezen BOOL WINAPI Xbase_export(tobjnum curs, tcateg cat, const char * fname, BOOL is_dbase, int recode);
DllPrezen BOOL WINAPI Data_export(tobjnum objnum, tcateg categ,
const char * fname, unsigned format, int recode);
DllPrezen BOOL WINAPI Data_import(const char * tabname, BOOL index_past,
const char * fname, unsigned format, int recode);
DllPrezen BOOL WINAPI Mail_parameters(window_id hParent, char * parstring, int buflen);
DllPrezen void WINAPI Draw_line(window_id hView, int x1, int y1,
int x2, int y2, int colour);
DllPrezen void WINAPI Put_pixel(window_id hView, int x, int y, int colour);
#ifdef __cplusplus
} /* of extern "C" */
#endif
#endif /* !def __WBPREZEN_H__ */