⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nxschedule.h

📁 PIXIL is a small footprint operating environment, complete with PDA PIM applications, a browser and
💻 H
📖 第 1 页 / 共 2 页
字号:
/*                                                                        * Copyright (c) 2003 Century Software, Inc.   All Rights Reserved.      *                                                                        * This file is part of the PIXIL Operating Environment                  *                                                                        * The use, copying and distribution of this file is governed by one     * of two licenses, the PIXIL Commercial License, or the GNU General     * Public License, version 2.                                            *                                                                        * Licensees holding a valid PIXIL Commercial License may use this file  * in accordance with the PIXIL Commercial License Agreement provided    * with the Software. Others are governed under the terms of the GNU    * General Public License version 2.                                     *                                                                        * This file may be distributed and/or modified under the terms of the   * GNU General Public License version 2 as published by the Free         * Software Foundation and appearing in the file LICENSE.GPL included    * in the packaging of this file.                                       *                                                                        * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING   * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A             * PARTICULAR PURPOSE.                                                   *                                                                        * RESTRICTED RIGHTS LEGEND                                              *                                                                      * Use, duplication, or disclosure by the government is subject to       * restriction as set forth in paragraph (b)(3)(b) of the Rights in      * Technical Data and Computer Software clause in DAR 7-104.9(a).        *                                                                       * See http://www.pixil.org/gpl/ for GPL licensing        * information.                                                          *                                                                       * See http://www.pixil.org/license.html or               * email cetsales@centurysoftware.com for information about the PIXIL    * Commercial License Agreement, or if any conditions of this licensing  * are not clear to you.                                                 */#ifndef NXSCHEDULE_H#define NXSCHEDULE_H#include <FL/Fl.H>#include <Flek/Fl_Calendar.H>#include <nxbox.h>#include <FL/Fl_Window.H>#include <FL/Fl_Menu_Item.H>#include <FL/Flv_Table_Child.H>#include <FL/Fl_Editor.H>#include <FL/fl_draw.H>#include <FL/Fl_Editor.H>#include <nxapp.h>#include <nxdb.h>#include <nxcalendar.h>#include <nxweekcalendar.h>#include <nxwindow.h>#include <nxbutton.h>#include <nxscroll.h>#include <nxinput.h>#include <nxoutput.h>#include <nxmultilineinput.h>#include <nxcheckbutton.h>#include <nxbox.h>#include <nxholdbrowser.h>#include <nxmenubutton.h>#include <nxintinput.h>#include <nxinput.h>#include <catlist.h>#include "nxyearcal.h"#include "nxmonthcal.h"#include "nxweek.h"#include "nxgroupbuttons.h"#include <time.h>#define TRUE 1#define FALSE 0#define APP_NAME "Scheduler"#define CAT_NUM 4#define ID        4#define CATEGORYS 50#define DESC      100#define GRID_W 15#define DAY_S 15#define WEEK_S 24#define WEEK_H 25#define COLS 2#define SCHEDULE "sched"#define CATEGORY "sched_category"#define HR_12(_x) ( _x > 12 ? _x - 12 : ( _x ? _x : 12 ) )#define IS_AM(_x) ( _x >= 12 ? false : true)#define AM_PM(_x) ( IS_AM(_x) ? "am" : "pm" )#define MAX_ALARMS		100typedef enum{ APPT, TASK }entry_type;typedef enum{ SUN, MON, TUE, WED, THU, FRI, SAT }day_of_wk;//Repeat Flag 1#define REPEAT_NONE           0x0000#define REPEAT_DAILY          0x0001#define REPEAT_WEEKLY         0x0002#define REPEAT_MONTHLY        0x0004#define REPEAT_YEARLY         0x0008#define REPEAT_WEEK_SUNDAY    0x0001#define REPEAT_WEEK_MONDAY    0x0002#define REPEAT_WEEK_TUESDAY   0x0004#define REPEAT_WEEK_WEDNESDAY 0x0008#define REPEAT_WEEK_THURSDAY  0x0010#define REPEAT_WEEK_FRIDAY    0x0020#define REPEAT_WEEK_SATURDAY  0x0040#define REPEAT_WEEK_FLAGS 		0x007f#define REPEAT_MONTH_DAY			0x0080#define REPEAT_MONTH_DATE			0x0100#define REPEAT_YEAR_DAY       0x0014#define REPEAT_YEAR_DATE      0x0018#define REPEAT_EXCEPTION			0x0001#define REPEAT_DELETED				0x0002#define DELETE_FLAG						0x0001#define CHANGED_TIME_FLAG     0X0002#define CHANGED_DATE_FLAG			0x0004#define CHANGED_NEW						0x0008#define CHANGED_ALARM					0x0010#ifndef POP_BUTTON_X#define POP_BUTTON_X 5#endif#ifndef POP_BUTTON_Y#define POP_BUTTON_Y(_x) ((_x->GetWindowPtr()->h()) - BUTTON_HEIGHT - 10 )#endif// These flags are for keeping track of where to fill the desc from#define DESC_UPDATE 0x0000#define DESC_NEW    0x0001#define DESC_KEEP   0X0002// Alarm flags#define ALARM_MIN		0x0000#define ALARM_HOUR	0x0001#define ALARM_DAY		0x0002#define NO_ALARM 		0x7FFF// For weeklystruct NxTodo{    unsigned int recno;    long startTime;		// Start Time of appointment    long endTime;		// End Time of appointment    int allDayFlag;		// Flag for time to be ALL day    int repeatFlag_1;		// Repeat flag #1 (for day, week, month, year)    int repeatFlag_2;		// Repeat flag #2    long repeatFlag_3;		// Repeat flag #3    long repeatWkMonFlag;	// End of repeating entry    entry_type entryType;	// Entry type APPT = Appointment, TASK = Task    char szDescription[DESC];	// Description of appointment or task    int exception;    unsigned int recnoPtr;    long fakeTime;    int alarmInt;    int alarmFlags;};class NxSchedule:public NxApp{    ////////////////////////////////////////    // Private Methods    ////////////////////////////////////////  private:    // FLNX-Colosseum IPC#ifdef CONFIG_COLOSSEUM    virtual void ClientIPCHandler(int fd, void *o, int ipc_id = -1);    static void ExecuteSearch(int ipc_id, char *searchStr, int width);    static void ExecuteStringDateSearch(int ipc_id, char *searchStr,					int width, long startTime,					long endTime);    static void ExecuteDateSearch(int ipc_id, int width, long startTime,				  long endTime);#endif    time_t m_CurrentDay;    static time_t fromTime;    static time_t toTime;    static bool g_SearchFlag;    //    // Common     //    static NxDb *db;    static int idNum;    static int g_EditFlag;    //    // Windows    //    static NxWindow *mainWindow;    // Standard PIM Windows    static NxPimWindow *dayWindow;    static NxPimWindow *monthWindow;    static NxPimWindow *setTimeWindow;    static NxPimWindow *weekViewWindow;    static NxPimWindow *monthViewWindow;    static NxPimWindow *yearViewWindow;    static NxPimWindow *lookupWindow;    // Popup PIM Windows    //static NxPimPopWindow * timeWindow;    static NxPimWindow *timeWindow;    static NxPimPopWindow *deleteWindow;    //  static NxPimPopWindow * dateWindow;    static NxPimWindow *dateWindow;    //  static NxPimPopWindow * weekDateWindow;    static NxPimWindow *weekDateWindow;    static NxPimPopWindow *detailsWindow;    static NxPimPopWindow *resultsWindow;    static NxPimPopWindow *errorWindow;    //static NxPimPopWindow * repeatWindow;    static NxPimWindow *repeatWindow;    static NxPimPopWindow *repeatEventWindow;    static NxPimPopWindow *alarmViewWindow;    static NxCategoryList *dayCat;    static NxCategoryList *weekCat;    static NxCategoryList *detailsCat;    static NxCategoryList *setTimeCat;    static NxCategoryList *cat_list[CAT_NUM];    NxButton *m_DayButtons[7];    static Fl_Group *buttonGroup;    static NxButton *dailyButton;    static NxButton *weeklyButton;    static NxButton *monthlyButton;    static NxButton *yearlyButton;    static NxYearCal *pYearCal;    static NxMonthCalendar *pMonthCal;    static NxCalendar *m_pCalendar;    static NxCalendar *pCalendar;    static NxWeekCalendar *w_pCalendar;    // dayWindow objects    NxScroll *dayScroll;    static Flv_Table_Child *table;    // weekWindow objects    // detailsWindow objects    static NxButton *detailsDeleteButton;    // setTimeWindow objects    NxScroll *hourScroll;    // deleteWindow objects    //    // Callbacks    //    static void dailyView_callback(Fl_Widget * w, void *l);    static void weeklyView_callback(Fl_Widget * w, void *l);    static void monthlyView_callback(Fl_Widget * w, void *l);    static void yearlyView_callback(Fl_Widget * w, void *l);    // for the error window    static NxOutput *error_msg;    static void errorOk_callback(Fl_Widget * fl, void *l);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -