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

📄 ccide.c

📁 CC386 is a general-purpose 32-bit C compiler. It is not an optimizing compiler but given that the co
💻 C
📖 第 1 页 / 共 5 页
字号:
/* 
Copyright 2001-2003 Free Software Foundation, Inc.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.  

You may contact the author at:

mailto::camille@bluegrass.net

or by snail mail at:

David Lindauer
850 Washburn Ave Apt 99
Louisville, KY 40222

 **********************************************************************

This is the main program.  It sets everything up, handles global
resize issues, and the window procedure handles the main menu, sometimes
dispatching items to other windows as needed.

 **********************************************************************

 */
#include <windows.h>
#include <commctrl.h>
#include <stdio.h>
#include <float.h>
#include "header.h"
#include <dir.h>
#include "wargs.h"
#include "splash.h"
#include "..\version.h"
#include <sys\stat.h>

extern HANDLE projectSem;
extern int making;
extern int numberofdrawwindows;
extern HWND hwndFind, hwndProject, hwndError, hwndASM, hwndThread;
extern HWND hwndRegister, hwndDump, hwndTab, hwndWatch, hwndStack;
extern HWND hwndBookmark;
extern DWINFO *mrulist[MAX_MRU],  *mruprojlist[MAX_MRU];
extern HANDLE BreakpointSem;
extern enum DebugStates uState;
extern char *lines[];
extern int curline;
extern THREAD *StoppedThread;
extern HMODULE htmlLib;
extern char szProjectName[256];
extern PROJLIST *projectList;

extern int _argc;
extern char **_argv;

#define WINDOW_MENU_OFFSET 6

#define psShow "Show"
static char szFrameClassName[] = "xccFrame";

HHOOK hCursHook;
HCURSOR hCursArrow, hCursHourglass;
HANDLE *winMenu[MAX_WINMENU];
char windowTexts[MAX_WINMENU][60];
int winMenuCount;
int WindowItemCount = 0;
char szInstallPath[1024];
HANDLE hMenuMain, hAccel, hwndFrame, hwndClient, hwndStatus;
HINSTANCE hInstance;
int iFindMessage;
HANDLE editLib;

int winShowCount;
int programBusy;

HWND hwndToolEdit, hwndToolDebug, hwndToolBuild;

char *watchhist[MAX_COMBO_HISTORY];

static char browseToText[256];
static LOGFONT fontdata = 
{
    15, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
        OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_DONTCARE, 
        "Arial"
};

void ProjSetup(char select, char *string);
ARGLIST ArgList[] = 
{
    {
        'p', ARG_CONCATSTRING, ProjSetup
    }
    , 
    {
        0, 0, 0
    }
};
#define INITIAL_DOCK_COUNT 10

int initialIDs[INITIAL_DOCK_COUNT] = 
{
    DID_TABWND, DID_ERRORWND, DID_WATCHWND, DID_EDITTOOL, DID_BUILDTOOL,
        DID_DEBUGTOOL, 
};
CCD_params initialDocks[INITIAL_DOCK_COUNT] = 
{
    {
        DOCK_LEFT, DOCK_LEFT, TRUE, 0, 0, 0, 1000 *200, 
        {
            0, 0, 200, 200
        }
        , 
        {
            0, 0, 200, 200
        }
        , 
        {
            0, 0, 200, 200
        }
        , 
        {
            0, 0, 0, 0
        }
    }
    , 
    {
        DOCK_BOTTOM, DOCK_BOTTOM, FALSE, 0, 0, 0, 1000 *500, 
        {
            0, 0, 500, 110
        }
        , 
        {
            0, 0, 500, 110
        }
        , 
        {
            0, 0, 500, 110
        }
        , 
        {
            0, 0, 0, 0
        }
    }
    , 
    {
        DOCK_BOTTOM, DOCK_BOTTOM, TRUE, 0, 1, 0, 1000 *500, 
        {
            0, 0, 500, 80
        }
        , 
        {
            0, 0, 500, 80
        }
        , 
        {
            0, 0, 500, 80
        }
        , 
        {
            0, 0, 0, 0
        }
    }
    , 
    {
        DOCK_TOP, DOCK_TOP, FALSE, 0, 0, 0, 0, 
        {
            0, 0, 200, 30
        }
        , 
        {
            0, 0, 200, 30
        }
        , 
        {
            0, 0, 200, 30
        }
        , 
        {
            0, 0, 0, 0
        }
    }
    , 
    {
        DOCK_TOP, DOCK_TOP, FALSE, 0, 1, 0, 0, 
        {
            0, 0, 200, 30
        }
        , 
        {
            0, 0, 200, 30
        }
        , 
        {
            0, 0, 200, 30
        }
        , 
        {
            0, 0, 0, 0
        }
    }
    , 
    {
        DOCK_TOP, DOCK_TOP, FALSE, 0, 2, 0, 0, 
        {
            0, 0, 200, 30
        }
        , 
        {
            0, 0, 200, 30
        }
        , 
        {
            0, 0, 200, 30
        }
        , 
        {
            0, 0, 0, 0
        }
    }
    , 
};
static char *edithints[] = 
{
    "New", "Open", "Save", "Print", "", "Cut", "Copy", "Paste", "Undo", "", 
        "Find", "Find Next", "Replace ", "Find In Files", "", "Goto", "", 
        "To Upper Case", "To Lower Case", "Indent", "Outdent"
};

static char *makehints[] = 
{
    "Compile", "Make", "Build"
};
static char *debughints[] = 
{
    "Start/Stop debugging", "", "Breakpoint", "", "Stop", "", "Run", "Run to", 
        "", "Step in", "Step over", "Step out"
};
static TBBUTTON editButtons[] = 
{
    {
        0, IDM_NEWDRAW, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        1, IDM_OPEN, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        2, IDM_SAVE, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        3, IDM_PRINT, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        0, 0, 0, TBSTYLE_SEP
    }
    , 
    {
        4, IDM_CUT, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        5, IDM_COPY, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        6, IDM_PASTE, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        7, IDM_UNDO, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        0, 0, 0, TBSTYLE_SEP
    }
    , 
    {
        9, IDM_FIND, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        10, IDM_FINDNEXT, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        11, IDM_REPLACE, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        13, IDM_FINDINFILES, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        0, 0, 0, TBSTYLE_SEP
    }
    , 
    {
        12, IDM_GOTO, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        0, 0, 0, TBSTYLE_SEP
    }
    , 
    {
        14, IDM_TOUPPER, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        15, IDM_TOLOWER, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        16, IDM_INDENT, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        17, IDM_UNINDENT, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        0, 0, 0, 0
    }
    , 
};
static TBBUTTON makeButtons[] = 
{
    {
        0, IDM_COMPILEFILE, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        1, IDM_MAKE, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        2, IDM_BUILDALL, TBSTATE_ENABLED, TBSTYLE_BUTTON
    }
    , 
    {
        0, 0, 0, 0
    }
    , 
};

static TBBUTTON debugButtons[] = 
{
    {
        7, IDM_STARTSTOP, TBSTATE_ENABLED, TBSTYLE_CHECK
    }
    , 
    {
        0, 0, 0, TBSTYLE_SEP
    }
    , 
    {
        2, IDM_BREAKPOINT, 0, TBSTYLE_BUTTON
    }
    , 
    {
        0, 0, 0, TBSTYLE_SEP
    }

⌨️ 快捷键说明

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