mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
add docs, destroy method
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@719 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
d364f9535f
commit
b59549d0d6
@ -367,6 +367,17 @@ xaccInitDateCell (DateCell *cell)
|
|||||||
|
|
||||||
/* ================================================ */
|
/* ================================================ */
|
||||||
|
|
||||||
|
void
|
||||||
|
xaccDestroyDateCell (DateCell *cell)
|
||||||
|
{
|
||||||
|
cell->date.tm_mday = 0;
|
||||||
|
cell->date.tm_mon = 0;
|
||||||
|
cell->date.tm_year = 0;
|
||||||
|
xaccDestroyBasicCell ( &(cell->cell));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ================================================ */
|
||||||
|
|
||||||
void
|
void
|
||||||
xaccSetDateCellValue (DateCell *cell, int day, int mon, int year)
|
xaccSetDateCellValue (DateCell *cell, int day, int mon, int year)
|
||||||
{
|
{
|
||||||
|
@ -3,12 +3,57 @@
|
|||||||
* datecell.h
|
* datecell.h
|
||||||
*
|
*
|
||||||
* FUNCTION:
|
* FUNCTION:
|
||||||
* Implements date handling
|
* The DateCell object implements a date handling cell. It
|
||||||
|
* is able to display dates in several formats, it is also
|
||||||
|
* able to accept date input, and also supports a number of accelerator
|
||||||
|
* keys.
|
||||||
*
|
*
|
||||||
|
* On output, this cell will display a date as mm/dd/yy
|
||||||
|
* The actual date formate is compile-time configurable.
|
||||||
|
*
|
||||||
|
* hack alert -- make the display format run-time configurable, and
|
||||||
|
* appropriately internationalized.
|
||||||
|
*
|
||||||
|
* One input, this cell is able to parse dates that are entered.
|
||||||
|
* It rejects any input that is not in the form of a date. Input
|
||||||
|
* also includes a number of accelerators:
|
||||||
|
*
|
||||||
|
* '+':
|
||||||
|
* '=': increment day
|
||||||
|
*
|
||||||
|
* '_':
|
||||||
|
* '-': decrement day
|
||||||
|
*
|
||||||
|
* '}':
|
||||||
|
* ']': increment month
|
||||||
|
*
|
||||||
|
* '{':
|
||||||
|
* '[': decrment month
|
||||||
|
*
|
||||||
|
* 'M':
|
||||||
|
* 'm': begining of month
|
||||||
|
*
|
||||||
|
* 'H':
|
||||||
|
* 'h': end of month
|
||||||
|
*
|
||||||
|
* 'Y':
|
||||||
|
* 'y': begining of year
|
||||||
|
*
|
||||||
|
* 'R':
|
||||||
|
* 'r': end of year
|
||||||
|
*
|
||||||
|
* 'T':
|
||||||
|
* 't': today
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* METHODS:
|
||||||
* The xaccSetDateCellValue() method accepts a numeric date and
|
* The xaccSetDateCellValue() method accepts a numeric date and
|
||||||
* sets the contents of the date cell to that value. The
|
* sets the contents of the date cell to that value. The
|
||||||
* value day, month, year should follow the regular written
|
* value day, month, year should follow the regular written
|
||||||
* conventions, i.e. day==(1..31), mon==(1..12), year==4 digits
|
* conventions, i.e. day==(1..31), mon==(1..12), year==4 digits
|
||||||
|
*
|
||||||
|
* HISTORY:
|
||||||
|
* Copyright (c) 1998 Linas Vepstas
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __XACC_DATE_CELL_C__
|
#ifndef __XACC_DATE_CELL_C__
|
||||||
@ -25,6 +70,7 @@ typedef struct _DateCell {
|
|||||||
/* installs a callback to handle date recording */
|
/* installs a callback to handle date recording */
|
||||||
DateCell * xaccMallocDateCell (void);
|
DateCell * xaccMallocDateCell (void);
|
||||||
void xaccInitDateCell (DateCell *);
|
void xaccInitDateCell (DateCell *);
|
||||||
|
void xaccDestroyDateCell (DateCell *);
|
||||||
|
|
||||||
void xaccSetDateCellValue (DateCell *, int day, int mon, int year);
|
void xaccSetDateCellValue (DateCell *, int day, int mon, int year);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user