📄 ds_view.h
字号:
#ifndef __DS_VIEW_H__
#define __DS_VIEW_H__
#include "ds_table.h"
#define VIEW_NAME_MAXLEN 20
typedef long (*DSV_FILTERPROC)( LPOSITION pos );
typedef long (*DSV_COMPAREPROC)( LPOSITION pos );
typedef void (*DSV_UPDATEPROC)( OPER_TYPE, LPOSITION pos, INT field );
typedef struct
{
DWORD attribute;
char view_name[VIEW_NAME_MAXLEN+1];
HTABLE hOwner_table;
UINT field_num;
UINT record_num;
DS_ARRAY field_info;
DS_LIST record_list;
LPOSITION current_position;
INT orderby_field;
DSV_FILTERPROC filter_proc;
DSV_COMPAREPROC compare_proc;
DSV_UPDATEPROC update_proc;
}DS_VIEW;
#define HVIEW DS_VIEW*
#define PPOSITION LPOSITION*
HVIEW DSV_CreateView( HTABLE hTable, const char* view_name, UINT field_num );
BOOL DSV_DestroyView( HVIEW hView );
BOOL DSV_GetFieldInfo( HVIEW hView, UINT field_index, TB_FIELD* fieldinfo );
BOOL DSV_AttachField( HVIEW hView, UINT view_field, UINT table_field );
BOOL DSV_GetFieldInfo( HVIEW hView, UINT field_index, TB_FIELD* fieldinfo );
BOOL DSV_AddRecord( HVIEW hView );
BOOL DSV_AddViewRecord( HVIEW hView, LPOSITION table_pos );
BOOL DSV_DeleteCurRecord( HVIEW hView );
BOOL DSV_DeleteRecord( HVIEW hView, LPOSITION pos );
BOOL DSV_DeleteViewRecord( HVIEW hView, LPOSITION pos );
BOOL DSV_SetFieldValue( HVIEW hView, UINT field_index, TB_VARIANT field_value );
BOOL DSV_GetFieldValue( HVIEW hView, UINT field_index, TB_VARIANT* field_value );
void DSV_MoveNext( HVIEW hView );
void DSV_MovePrev( HVIEW hView );
void DSV_MoveFirst( HVIEW hView );
void DSV_MoveLast( HVIEW hView );
int DSV_GetRecordCount( HVIEW hView );
BOOL DSV_IsView( HVIEW hView );
void DSV_RefreshView( HVIEW hView );
BOOL DSV_SetFilter( HVIEW hView, FILTERPROC filterproc );
void DSV_Clear( HVIEW hView );
void DSV_Update( HVIEW hView, OPER_EVENT *oper_event );
BOOL DSV_IsEOF( HVIEW hView );
BOOL DSV_IsBOF( HVIEW hView );
void DSV_SetAbsolutePostion( HVIEW hView, LPOSITION pos );
BOOL DSV_SetParam( HVIEW hView, DSV_FILTERPROC filterproc, DSV_COMPAREPROC compareproc, DSV_UPDATEPROC updateproc );
INT DSV_GetFieldCount( HVIEW hView );
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -