ReactOS  0.4.13-dev-39-g8b6696f
pane.cpp File Reference
#include <precomp.h>
Include dependency graph for pane.cpp:

Go to the source code of this file.

Macros

#define IMAGE_WIDTH   16
 
#define IMAGE_HEIGHT   13
 

Enumerations

enum  IMAGE {
  IMG_NONE =-1, IMG_FILE =0, IMG_DOCUMENT, IMG_EXECUTABLE,
  IMG_FOLDER, IMG_OPEN_FOLDER, IMG_FOLDER_PLUS, IMG_OPEN_PLUS,
  IMG_OPEN_MINUS, IMG_FOLDER_UP, IMG_FOLDER_CUR, IMG_NONE =-1,
  IMG_FILE =0, IMG_DOCUMENT, IMG_EXECUTABLE, IMG_FOLDER,
  IMG_OPEN_FOLDER, IMG_FOLDER_PLUS, IMG_OPEN_PLUS, IMG_OPEN_MINUS,
  IMG_FOLDER_UP, IMG_FOLDER_CUR
}
 

Functions

static void format_date (const FILETIME *ft, TCHAR *buffer, int visible_cols)
 

Variables

static const TCHARg_pos_names [COLUMNS]
 
static const int g_pos_align []
 

Macro Definition Documentation

◆ IMAGE_HEIGHT

#define IMAGE_HEIGHT   13

Definition at line 39 of file pane.cpp.

◆ IMAGE_WIDTH

#define IMAGE_WIDTH   16

Definition at line 38 of file pane.cpp.

Enumeration Type Documentation

◆ IMAGE

Enumerator
IMG_NONE 
IMG_FILE 
IMG_DOCUMENT 
IMG_EXECUTABLE 
IMG_FOLDER 
IMG_OPEN_FOLDER 
IMG_FOLDER_PLUS 
IMG_OPEN_PLUS 
IMG_OPEN_MINUS 
IMG_FOLDER_UP 
IMG_FOLDER_CUR 
IMG_NONE 
IMG_FILE 
IMG_DOCUMENT 
IMG_EXECUTABLE 
IMG_FOLDER 
IMG_OPEN_FOLDER 
IMG_FOLDER_PLUS 
IMG_OPEN_PLUS 
IMG_OPEN_MINUS 
IMG_FOLDER_UP 
IMG_FOLDER_CUR 

Definition at line 31 of file pane.cpp.

Function Documentation

◆ format_date()

static void format_date ( const FILETIME ft,
TCHAR buffer,
int  visible_cols 
)
static

Definition at line 263 of file pane.cpp.

264 {
265  SYSTEMTIME systime;
266  FILETIME lft;
267  int len = 0;
268 
269  *buffer = TEXT('\0');
270 
271  if (!ft->dwLowDateTime && !ft->dwHighDateTime)
272  return;
273 
274  if (!FileTimeToLocalFileTime(ft, &lft))
275  {err: lstrcpy(buffer,TEXT("???")); return;}
276 
277  if (!FileTimeToSystemTime(&lft, &systime))
278  goto err;
279 
280  if (visible_cols & COL_DATE) {
282  if (!len)
283  goto err;
284  }
285 
286  if (visible_cols & COL_TIME) {
287  if (len)
288  buffer[len-1] = ' ';
289 
290  buffer[len++] = ' ';
291 
292  if (!GetTimeFormat(LOCALE_USER_DEFAULT, 0, &systime, 0, buffer+len, BUFFER_LEN-len))
293  buffer[len] = TEXT('\0');
294  }
295 }
#define LOCALE_USER_DEFAULT
Definition: pane.h:39
GLuint buffer
Definition: glext.h:5915
BOOL WINAPI FileTimeToLocalFileTime(IN CONST FILETIME *lpFileTime, OUT LPFILETIME lpLocalFileTime)
Definition: time.c:211
DWORD dwHighDateTime
Definition: mapidefs.h:66
Definition: pane.h:38
#define BUFFER_LEN
Definition: utility.h:97
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:178
GLenum GLsizei len
Definition: glext.h:6722
#define err(...)
#define GetTimeFormat
Definition: winnls.h:1186
#define TEXT(s)
Definition: k32.h:26
#define GetDateFormat
Definition: winnls.h:1181
#define lstrcpy
Definition: winbase.h:3688
DWORD dwLowDateTime
Definition: mapidefs.h:65

Referenced by Pane::draw_item().

Variable Documentation

◆ g_pos_align

const int g_pos_align[]
static
Initial value:
= {
0,
}
#define HDF_RIGHT
Definition: commctrl.h:699
#define HDF_CENTER
Definition: commctrl.h:700
#define HDF_LEFT
Definition: commctrl.h:698

Definition at line 57 of file pane.cpp.

Referenced by Pane::create_header().

◆ g_pos_names

const TCHAR* g_pos_names[COLUMNS]
static
Initial value:
= {
TEXT(""),
TEXT("Name"),
TEXT("Type"),
TEXT("Size"),
TEXT("CDate"),
TEXT("ADate"),
TEXT("MDate"),
TEXT("Index/Inode"),
TEXT("Links"),
TEXT("Attributes"),
TEXT("Security"),
}
#define TEXT(s)
Definition: k32.h:26

Definition at line 42 of file pane.cpp.

Referenced by Pane::create_header().