📄 viewfmt.h
字号:
#if defined(OS400) && (__OS400_TGTVRM__ >= 510)
#pragma datamodel(P128)
#endif
/*********************************************************************/
/* */
/* Licensed Materials - Property of IBM */
/* */
/* L-GHUS-5VMPGW, L-GHUS-5S3PEE */
/* (C) Copyright IBM Corp. 1989, 2004 All Rights Reserved */
/* */
/* US Government Users Restricted Rights - Use, duplication or */
/* disclosure restricted by GSA ADP Schedule Contract with */
/* IBM Corp. */
/* */
/*********************************************************************/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef VIEWFMT_DEFS
#define VIEWFMT_DEFS
/* This file contains the view format definitions which are used to read and
write the format of a view in the View note.
The structure of this data is as follows:
[ VIEW_FORMAT_HEADER ]
[ VIEW_TABLE_FORMAT ]
[ VIEW_COLUMN_FORMAT #0 ] n columns, as specified in VIEW_TABLE_FORMAT.
[ VIEW_COLUMN_FORMAT #1 ]
...
[ VIEW_COLUMN_FORMAT #n ]
[ COLUMN DATA #0 ] n columns, as specified in VIEW_TABLE_FORMAT.
[ COLUMN DATA #1 ]
...
[ COLUMN DATA #n ]
[VIEW_TABLE_FORMAT2]
[ VIEW_COLUMN_FORMAT2 #0 ] n columns, as specified in VIEW_TABLE_FORMAT.
[ VIEW_COLUMN_FORMAT2 #1 ]
...
[ VIEW_COLUMN_FORMAT2 #n ]
[ VIEW_TABLE_FORMAT3 ]
[ COLUMN DATA #0 ] n column variable data added for R6
[ COLUMN DATA #1 ]
...
[ COLUMN DATA #n ]
[ VIEW_TABLE_FORMAT4 ]
[ BACKGROUND RESOURCE LINK ]
[ VIEW_COLUMN_FORMAT3 ]
[ VIEW_COLUMN_FORMAT4 ]
*/
#ifndef FONTID_DEFS
#include "fontid.h"
#endif
#ifndef MISC_DEFS
#include "misc.h"
#endif
#ifndef NSF_DATA_DEFS
#include "nsfdata.h"
#endif
#ifndef COLORODS_DEFS
#include "colorods.h"
#endif
#ifndef RSRCODS_DEFS
#include "rsrcods.h"
#endif
/* View on-disk format definitions */
#define VIEW_FORMAT_VERSION 1
#define VIEW_COLUMN_FORMAT_SIGNATURE 0x4356
#define VIEW_COLUMN_FORMAT_SIGNATURE2 0x4357
#define VIEW_COLUMN_FORMAT_SIGNATURE3 0x4358
#define VIEW_COLUMN_FORMAT_SIGNATURE4 0x4359
#define VIEW_COLUMN_FORMAT_SIGNATURE5 0x4360
#define VIEW_CLASS_TABLE (0 << 4)
#define VIEW_CLASS_CALENDAR (1 << 4)
#define VIEW_CLASS_MASK 0xF0
#define CALENDAR_TYPE_DAY 0
#define CALENDAR_TYPE_WEEK 1
#define CALENDAR_TYPE_MONTH 2
#define VIEW_STYLE_TABLE VIEW_CLASS_TABLE
#define VIEW_STYLE_DAY (VIEW_CLASS_CALENDAR + 0)
#define VIEW_STYLE_WEEK (VIEW_CLASS_CALENDAR + 1)
#define VIEW_STYLE_MONTH (VIEW_CLASS_CALENDAR + 2)
/* View table format descriptor. Followed by VIEW_COLUMN_FORMAT */
/* descriptors; one per column. The column format descriptors are followed */
/* by the packed item name, title, formula, and constant values. */
/* All of this is followed by a VIEW_TABLE_FORMAT2 data structure that */
/* is only present in views saved in V2 or later. */
/* All descriptors and values are packed into one item named $VIEWFORMAT. */
typedef struct
{
BYTE Version; /* Version number */
BYTE ViewStyle; /* View Style - Table,Calendar */
} VIEW_FORMAT_HEADER;
typedef struct
{
VIEW_FORMAT_HEADER Header;
WORD Columns; /* Number of columns */
WORD ItemSequenceNumber; /* Sequence number for unique item names */
WORD Flags; /* Flags */
#define VIEW_TABLE_FLAG_COLLAPSED 0x0001 /* Default to fully collapsed */
#define VIEW_TABLE_FLAG_FLATINDEX 0x0002 /* Do not index hierarchically */
/* If FALSE, MUST have */
/* NSFFormulaSummaryItem($REF) */
/* as LAST item! */
#define VIEW_TABLE_FLAG_DISP_ALLUNREAD 0x0004 /* Display unread flags in margin at ALL levels */
#define VIEW_TABLE_FLAG_CONFLICT 0x0008 /* Display replication conflicts */
/* If TRUE, MUST have */
/* NSFFormulaSummaryItem($Conflict) */
/* as SECOND-TO-LAST item! */
#define VIEW_TABLE_FLAG_DISP_UNREADDOCS 0x0010 /* Display unread flags in margin for documents only */
#define VIEW_TABLE_GOTO_TOP_ON_OPEN 0x0020 /* Position to top when view is opened. */
#define VIEW_TABLE_GOTO_BOTTOM_ON_OPEN 0x0040 /* Position to bottom when view is opened. */
#define VIEW_TABLE_ALTERNATE_ROW_COLORING 0x0080 /* Color alternate rows. */
#define VIEW_TABLE_HIDE_HEADINGS 0x0100 /* Hide headings. */
#define VIEW_TABLE_HIDE_LEFT_MARGIN 0x0200 /* Hide left margin. */
#define VIEW_TABLE_SIMPLE_HEADINGS 0x0400 /* Show simple (background color) headings. */
#define VIEW_TABLE_VARIABLE_LINE_COUNT 0x0800 /* TRUE if LineCount is variable (can be reduced as needed). */
/* Refresh flags.
When both flags are clear, automatic refresh of display on update
notification is disabled. In this case, the refresh indicator will
be displayed.
When VIEW_TABLE_GOTO_TOP_ON_REFRESH is set, the view will fe refreshed from
the top row of the collection (as if the user pressed F9 and Ctrl-Home).
When VIEW_TABLE_GOTO_BOTTOM_ON_REFRESH is set, the view will be refreshed
so the bottom row of the collection is visible (as if the user pressed F9
and Ctrl-End).
When BOTH flags are set (done to avoid using another bit in the flags),
the view will be refreshed from the current top row (as if the user
pressed F9). */
#define VIEW_TABLE_GOTO_TOP_ON_REFRESH 0x1000 /* Position to top when view is refreshed. */
#define VIEW_TABLE_GOTO_BOTTOM_ON_REFRESH 0x2000 /* Position to bottom when view is refreshed. */
/* More flag(s). */
#define VIEW_TABLE_EXTEND_LAST_COLUMN 0x4000 /* TRUE if last column should be extended to fit the window width. */
#define VIEW_TABLE_RTLVIEW 0x8000 /* TRUE if the View indexing should work from the Right most column */
WORD Flags2; /* Flags */
#define VIEW_TABLE_FLAT_HEADINGS 0x0001 /* TRUE if we should display no-borders at all on the header */
#define VIEW_TABLE_COLORIZE_ICONS 0x0002 /* TRUE if the icons displayed inthe view should be colorized */
#define VIEW_TABLE_HIDE_SB 0x0004 /* TRUE if we should not display a search bar for this view */
#define VIEW_TABLE_HIDE_CAL_HEADER 0x0008 /* TRUE if we should hide the calendar header */
#define VIEW_TABLE_NOT_CUSTOMIZED 0x0010 /* TRUE if view has not been customized (i.e. not saved by Designer) */
} VIEW_TABLE_FORMAT;
/* Additional (since V2) format info. This structure follows the
variable length strings that follow the VIEW_COLUMN_FORMAT structres */
typedef struct
{
WORD Length; /* Length of this structure */
WORD BackgroundColor; /* Color of view's background. Pre-V4 compatible */
WORD V2BorderColor; /* Archaic! Color of view's border lines. */
FONTID TitleFont; /* Title and borders */
FONTID UnreadFont; /* Unread lines */
FONTID TotalsFont; /* Totals/Statistics */
WORD AutoUpdateSeconds; /* interval b/w auto updates (zero for no autoupdate) */
WORD AlternateBackgroundColor; /* Color of view's background for alternate rows. */
/* When wSig == VALID_VIEW_FORMAT_SIG, rest of struct is safe to use. Bug
in versions prior to V4 caused spare space in this structure to contain
random stuff. */
WORD wSig;
#define VALID_VIEW_FORMAT_SIG 0x2BAD
BYTE LineCount; /* Number of lines per row. 1, 2, etc. */
#define VIEW_TABLE_MAX_LINE_COUNT 10
BYTE Spacing; /* Spacing. VIEW_TABLE_XXX_SPACE. */
#define VIEW_TABLE_SINGLE_SPACE 0
#define VIEW_TABLE_ONE_POINT_25_SPACE 1
#define VIEW_TABLE_ONE_POINT_50_SPACE 2
#define VIEW_TABLE_ONE_POINT_75_SPACE 3
#define VIEW_TABLE_DOUBLE_SPACE 4
WORD BackgroundColorExt; /* Palette Color of view's background. */
#define VIEW_TABLE_COLOR_MASK 0x00FF /* color is index into 240 element array */
BYTE HeaderLineCount; /* Lines per header. */
BYTE Flags1;
#define VIEW_TABLE_HAS_LINK_COLUMN 0x01 /* TRUE if a link column has been specified for a web browser. */
#define VIEW_TABLE_HTML_PASSTHRU 0x02 /* TRUE if line entry text should be treated as HTML by a web browser. */
/* Spares. Will be zero when wSig == VALID_VIEW_FORMAT_SIG. */
WORD Spare[4];
} VIEW_TABLE_FORMAT2;
typedef struct
{
VIEW_FORMAT_HEADER Header;
} VIEW_DAY_FORMAT;
typedef struct
{
VIEW_FORMAT_HEADER Header;
} VIEW_WEEK_FORMAT;
typedef struct
{
VIEW_FORMAT_HEADER Header;
} VIEW_MONTH_FORMAT;
typedef struct
{
WORD Length; /* Length of this structure */
DWORD Flags; /* Reserved for future use */
#define VTF3_S_GridStyleSolid 0 /* V6 view grid lines use solid lines */
#define VTF3_M_GridStyleSolid 0x00000001
#define VTF3_S_GridStyleDash 1 /* V6 view grid lines use dashes */
#define VTF3_M_GridStyleDash 0x00000002
#define VTF3_S_GridStyleDot 2 /* V6 view grid lines use dots */
#define VTF3_M_GridStyleDot 0x00000004
#define VTF3_S_GridStyleDashDot 3 /* V6 view grid lines use dashes and dots */
#define VTF3_M_GridStyleDashDot 0x00000008
#define VTF3_S_AllowCustomizations 4 /* V6 view customizations on/off */
#define VTF3_M_AllowCustomizations 0x00000010
#define VTF3_S_EvaluateActionsHideWhen 5 /* V6 view actions evaluate hidewhen */
#define VTF3_M_EvaluateActionsHideWhen 0x00000020
#define VTF3_S_HideLeftMarginBorder 6
#define VTF3_M_HideLeftMarginBorder 0x00000040 /* V6 - Hide border after left margin */
#define VTF3_S_BoldUnreadRows 7
#define VTF3_M_BoldUnreadRows 0x00000080 /* V6 - bold the unread rows. */
#define VTF3_S_AllowCreateNewDoc 8
#define VTF3_M_AllowCreateNewDoc 0x00000100 /* V6 - inviewedit-newdocs in view */
#define VTF3_S_HasBackgroundImage 9
#define VTF3_M_HasBackgroundImage 0x00000200 /* V6 - View has background image. */
#define VTF3_S_MaxRowsLimit 10
#define VTF3_M_MaxRowsLimit 0x00000400 /* V7 - Limit the max rows returned for a Query View */
COLOR_VALUE BackgroundColor; /* V5 background color */
COLOR_VALUE AlternateBackgroundColor; /* V5 alternate row color */
COLOR_VALUE GridColorValue; /* V6 View's grid color (3 words)*/
WORD wViewMarginTop; /* V6 View Margin top */
WORD wViewMarginLeft; /* V6 View Margin left */
WORD wViewMarginRight; /* V6 View Margin right */
WORD wViewMarginBottom; /* V6 View Margin bottom */
COLOR_VALUE MarginBackgroundColor; /* V6 View Margin Background Color */
COLOR_VALUE HeaderBackgroundColor; /* V6 View column header background color */
WORD wViewMarginTopUnder; /* V6 View Margin top -- under header */
COLOR_VALUE UnreadColor; /* V6 unread row color */
COLOR_VALUE TotalsColor; /* V6 Column Total Color */
WORD wMaxRows; /* V7 Query View Max Row Limit */
WORD wReserved; /* Reserved for future use */
DWORD dwReserved[1]; /* Reserved for future use */
} VIEW_TABLE_FORMAT3;
typedef struct
{
WORD Length; /* Length of this structure */
DWORD Flags; /* Reserved for future use */
WORD RepeatType; /* see viewprop.h - way to repeat image*/
} VIEW_TABLE_FORMAT4;
typedef struct
{
WORD Length; /* Length of this structure */
DWORD Flags; /* Reserved for future use */
WORD RepeatType; /* see viewprop.h - way to repeat image*/
} VIEW_TABLE_FORMAT5;
/* Calendar View Format Information. Introduced in build 141 (for 4.2).
This is in Calendar Style Views only. */
#define VIEW_CALENDAR_FORMAT_VERSION 1
typedef struct
{
BYTE Version; /* Version Number */
BYTE Formats; /* Formats supported by this view VIEW_CAL_FORMAT_XXX.*/
#define VIEW_CAL_FORMAT_TWO_DAY 0x01
#define VIEW_CAL_FORMAT_ONE_WEEK 0x02
#define VIEW_CAL_FORMAT_TWO_WEEKS 0x04
#define VIEW_CAL_FORMAT_ONE_MONTH 0x08
#define VIEW_CAL_FORMAT_ONE_YEAR 0x10
#define VIEW_CAL_FORMAT_ONE_DAY 0x20
#define VIEW_CAL_FORMAT_WORK_WEEK 0x40
#define VIEW_CAL_FORMAT_ALL 0xff
#define VIEW_CAL_VALID_PRE_503_FORMATS 0x3f
#define VIEW_CAL_VALID_503_FORMATS 0x7f
FONTID DayDateFont; /* Day and Date display */
FONTID TimeSlotFont; /* Time Slot display */
FONTID HeaderFont; /* Month Headers */
WORD DaySeparatorsColor; /* Lines separating days */
WORD TodayColor; /* Color Today is displayed in */
WORD wFlags; /* Misc Flags */
#define CAL_DISPLAY_CONFLICTS 0x0001 /* Display Conflict marks */
#define CAL_ENABLE_TIMESLOTS 0x0002 /* Disable Time Slots */
#define CAL_DISPLAY_TIMESLOT_BMPS 0x0004 /* Show Time Slot Bitmaps */
#define CAL_ENABLE_TIMEGROUPING 0x0008 /* Enable Timegrouping */
#define CAL_TIMESLOT_OVERRIDE 0x0010 /* Allow user to override time slots */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -