id
int64
0
755k
file_name
stringlengths
3
109
file_path
stringlengths
13
185
content
stringlengths
31
9.38M
size
int64
31
9.38M
language
stringclasses
1 value
extension
stringclasses
11 values
total_lines
int64
1
340k
avg_line_length
float64
2.18
149k
max_line_length
int64
7
2.22M
alphanum_fraction
float64
0
1
repo_name
stringlengths
6
65
repo_stars
int64
100
47.3k
repo_forks
int64
0
12k
repo_open_issues
int64
0
3.4k
repo_license
stringclasses
9 values
repo_extraction_date
stringclasses
92 values
exact_duplicates_redpajama
bool
2 classes
near_duplicates_redpajama
bool
2 classes
exact_duplicates_githubcode
bool
2 classes
exact_duplicates_stackv2
bool
1 class
exact_duplicates_stackv1
bool
2 classes
near_duplicates_githubcode
bool
2 classes
near_duplicates_stackv1
bool
2 classes
near_duplicates_stackv2
bool
1 class
21,621
testservice.h
visualfc_liteide/liteidex/src/3rdparty/qjsonrpc/tests/manual/tcpserver/testservice.h
/* * Copyright (C) 2012-2013 Matt Broadstone * Contact: http://bitbucket.org/devonit/qjsonrpc * * This file is part of the QJsonRpc Library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. */ #ifndef TESTSERVICE_H #define TESTSERVICE_H #include "qjsonrpcservice.h" class TestService : public QJsonRpcService { Q_OBJECT Q_CLASSINFO("serviceName", "agent") public: TestService(QObject *parent = 0); public Q_SLOTS: void testMethod(); void testMethodWithParams(const QString &first, bool second, double third); void testMethodWithVariantParams(const QString &first, bool second, double third, const QVariant &fourth); QString testMethodWithParamsAndReturnValue(const QString &name); void testMethodWithDefaultParameter(const QString &first, const QString &second = QString()); void testNotifyConnectedClients(const QString &message); }; #endif
1,360
C++
.h
34
37.323529
110
0.775
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,622
testservices.h
visualfc_liteide/liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpcserver/testservices.h
/* * Copyright (C) 2012-2013 Matt Broadstone * Contact: http://bitbucket.org/devonit/qjsonrpc * * This file is part of the QJsonRpc Library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. */ #ifndef TESTSERVICES_H #define TESTSERVICES_H #include "qjsonrpcservice.h" class TestService : public QJsonRpcService { Q_OBJECT Q_CLASSINFO("serviceName", "service") public: explicit TestService(QObject *parent = 0); void resetCount(); int callCount() const; Q_SIGNALS: void numberParametersCalled(); public Q_SLOTS: void noParam() const; QString singleParam(const QString &string) const; QString multipleParam(const QString &first, const QString &second, const QString &third) const; void numberParameters(int intParam, double doubleParam); bool variantParameter(const QVariant &variantParam) const; QVariantList variantListParameter(const QVariantList &data); QVariant variantStringResult(); QVariantList variantListResult(); QVariantMap variantMapResult(); QVariantMap hugeResponse(); QString defaultParametersMethod(const QString &name = QString()); QString defaultParametersMethod2(const QString &name = QString(), int year = 2012); // NOTE: suppress binding warnings // bool methodWithListOfInts(const QList<int> &list); QString variantMapInvalidParam(const QVariantMap &map); void outputParameter(int in1, int &out, int in2); void outputParameterWithStrings(const QString &first, QString &output, const QString &last); bool overloadedMethod(int input); bool overloadedMethod(const QString &input); bool stringListParameter(int one, const QString &two, const QString &three, const QStringList &list); // return values QJsonArray returnQJsonArray(); QJsonObject returnQJsonObject(); private: int m_called; }; class TestServiceWithoutServiceName : public QJsonRpcService { Q_OBJECT public: TestServiceWithoutServiceName(QObject *parent = 0); public Q_SLOTS: QString testMethod(const QString &string) const; }; class TestComplexMethodService : public QJsonRpcService { Q_OBJECT Q_CLASSINFO("serviceName", "service.complex.prefix.for") public: TestComplexMethodService(QObject *parent = 0); public Q_SLOTS: void testMethod(); }; class TestDelayedResponseService : public QJsonRpcService { Q_OBJECT Q_CLASSINFO("serviceName", "service") public: TestDelayedResponseService(QObject *parent = 0); Q_SIGNALS: void responseResult(bool result); public Q_SLOTS: void delayedResponse(); void delayedResponseWithClosedSocket(); QString immediateResponse(); private Q_SLOTS: void delayedResponseComplete(); void delayedResponseWithClosedSocketComplete(); private: QJsonRpcServiceRequest m_request; }; #endif // TESTSERVICES_H
3,298
C++
.h
92
32.402174
105
0.76853
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,623
testhttpserver.h
visualfc_liteide/liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpchttpclient/testhttpserver.h
#ifndef TESTHTTPSERVER_H #define TESTHTTPSERVER_H #include <QTcpServer> #include <QNetworkAccessManager> #include <QNetworkRequest> class TestHttpServerRequestHandler { public: virtual ~TestHttpServerRequestHandler() {} virtual QByteArray handleRequest(QNetworkAccessManager::Operation operation, const QNetworkRequest &request, const QByteArray &body) = 0; }; class TestHttpServerPrivate; class TestHttpServer : public QTcpServer { Q_OBJECT public: explicit TestHttpServer(QObject *parent = 0); TestHttpServer(TestHttpServerRequestHandler *requestHandler, QObject *parent = 0); virtual ~TestHttpServer(); TestHttpServerRequestHandler *requestHandler() const; void setRequestHandler(TestHttpServerRequestHandler *requestHandler); void setResponseData(const QByteArray &data); protected: #if QT_VERSION >= 0x050000 virtual void incomingConnection(qintptr socketDescriptor); #else virtual void incomingConnection(int socketDescriptor); #endif private: Q_DISABLE_COPY(TestHttpServer) Q_DECLARE_PRIVATE(TestHttpServer) QScopedPointer<TestHttpServerPrivate> d_ptr; Q_PRIVATE_SLOT(d_func(), void _q_socketReadyRead()) Q_PRIVATE_SLOT(d_func(), void _q_socketError(QAbstractSocket::SocketError)) }; #endif
1,309
C++
.h
37
31.378378
97
0.782092
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,631
qjsonrpcservice_p.h
visualfc_liteide/liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcservice_p.h
/* * Copyright (C) 2012-2013 Matt Broadstone * Copyright (C) 2013 Fargier Sylvain * Contact: http://bitbucket.org/devonit/qjsonrpc * * This file is part of the QJsonRpc Library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. */ #ifndef QJSONRPCSERVICE_P_H #define QJSONRPCSERVICE_P_H #include <QHash> #include <QPointer> #include <QVarLengthArray> #include <QStringList> #include "qjsonrpcservice.h" class QJsonRpcAbstractSocket; class QJsonRpcServiceRequestPrivate : public QSharedData { public: QJsonRpcMessage request; QPointer<QJsonRpcAbstractSocket> socket; }; class QJsonRpcService; #if defined(USE_QT_PRIVATE_HEADERS) #include <private/qobject_p.h> class QJsonRpcServicePrivate : public QObjectPrivate #else class QJsonRpcServicePrivate #endif { public: QJsonRpcServicePrivate(QJsonRpcService *parent) : delayedResponse(false), q_ptr(parent) { } void cacheInvokableInfo(); static int qjsonRpcMessageType; static int convertVariantTypeToJSType(int type); static QJsonValue convertReturnValue(QVariant &returnValue); struct ParameterInfo { ParameterInfo(const QString &name = QString(), int type = 0, bool out = false); int type; int jsType; QString name; bool out; }; struct MethodInfo { MethodInfo(); MethodInfo(const QMetaMethod &method); QVarLengthArray<ParameterInfo> parameters; int returnType; bool valid; bool hasOut; }; QHash<int, MethodInfo > methodInfoHash; QHash<QByteArray, QList<int> > invokableMethodHash; QJsonRpcServiceRequest currentRequest; bool delayedResponse; QJsonRpcService * const q_ptr; Q_DECLARE_PUBLIC(QJsonRpcService) }; #endif
2,244
C++
.h
74
26.364865
87
0.74548
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,633
qjsonrpcserviceprovider.h
visualfc_liteide/liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcserviceprovider.h
/* * Copyright (C) 2012-2014 Matt Broadstone * Contact: http://bitbucket.org/devonit/qjsonrpc * * This file is part of the QJsonRpc Library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. */ #ifndef QJSONRPCSERVICEPROVIDER_H #define QJSONRPCSERVICEPROVIDER_H #include "qjsonrpcglobal.h" class QJsonRpcMessage; class QJsonRpcService; class QJsonRpcAbstractSocket; class QJsonRpcServiceProviderPrivate; class QJSONRPC_EXPORT QJsonRpcServiceProvider { public: ~QJsonRpcServiceProvider(); virtual bool addService(QJsonRpcService *service); virtual bool removeService(QJsonRpcService *service); protected: QJsonRpcServiceProvider(); void processMessage(QJsonRpcAbstractSocket *socket, const QJsonRpcMessage &message); private: QScopedPointer<QJsonRpcServiceProviderPrivate> d; }; #endif // QJSONRPCSERVICEPROVIDER_H
1,319
C++
.h
36
34.388889
88
0.806578
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,636
qjsonrpcmetatype.h
visualfc_liteide/liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcmetatype.h
/* * Copyright (C) 2012-2013 Matt Broadstone * Copyright (C) 2013 Fargier Sylvain * Contact: http://bitbucket.org/devonit/qjsonrpc * * This file is part of the QJsonRpc Library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. */ #ifndef QJSONRPCMETATYPE_H #define QJSONRPCMETATYPE_H #include <QMetaType> template <typename T> void qRegisterJsonRpcMetaType(const char *typeName, T * = 0) { Q_UNUSED(typeName) QMetaType::registerConverter<T, QJsonValue>(&T::toJson); QMetaType::registerConverter<QJsonValue, T>(&T::fromJson); } #endif
1,026
C++
.h
28
34.535714
69
0.767839
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,639
qjsonrpcglobal.h
visualfc_liteide/liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcglobal.h
/* * Copyright (C) 2012-2013 Matt Broadstone * Contact: http://bitbucket.org/devonit/qjsonrpc * * This file is part of the QJsonRpc Library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. */ #ifndef QJSONRPCGLOBAL_H #define QJSONRPCGLOBAL_H #include <QtGlobal> #include <QMetaType> // error codes defined by spec namespace QJsonRpc { enum ErrorCode { NoError = 0, ParseError = -32700, // Invalid JSON was received by the server. // An error occurred on the server while parsing the JSON text. InvalidRequest = -32600, // The JSON sent is not a valid Request object. MethodNotFound = -32601, // The method does not exist / is not available. InvalidParams = -32602, // Invalid method parameter(s). InternalError = -32603, // Internal JSON-RPC error. ServerErrorBase = -32000, // Reserved for implementation-defined server-errors. UserError = -32099, // Anything after this is user defined TimeoutError = -32100 }; } Q_DECLARE_METATYPE(QJsonRpc::ErrorCode) #define qJsonRpcDebug if (qgetenv("QJSONRPC_DEBUG").isEmpty()); else qDebug #ifdef QJSONRPC_SHARED # ifdef QJSONRPC_BUILD # define QJSONRPC_EXPORT Q_DECL_EXPORT # else # define QJSONRPC_EXPORT Q_DECL_IMPORT # endif #else # define QJSONRPC_EXPORT #endif #endif
1,939
C++
.h
47
37.191489
107
0.676206
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,640
qjsonrpcabstractserver_p.h
visualfc_liteide/liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcabstractserver_p.h
/* * Copyright (C) 2012-2013 Matt Broadstone * Contact: http://bitbucket.org/devonit/qjsonrpc * * This file is part of the QJsonRpc Library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. */ #ifndef QJSONRPCABSTRACTSERVER_P_H #define QJSONRPCABSTRACTSERVER_P_H #include "qjsonrpcabstractserver.h" class QJsonRpcSocket; #if defined(USE_QT_PRIVATE_HEADERS) #include <private/qobject_p.h> class QJsonRpcAbstractServerPrivate : public QObjectPrivate #else class QJsonRpcAbstractServerPrivate #endif { public: #if !defined(USE_QT_PRIVATE_HEADERS) virtual ~QJsonRpcAbstractServerPrivate() {} #endif void _q_notifyConnectedClients(const QJsonRpcMessage &message); void _q_notifyConnectedClients(const QString &method, const QJsonArray &params); QList<QJsonRpcSocket*> clients; }; #endif
1,280
C++
.h
36
33.527778
84
0.794023
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,641
qjson_export.h
visualfc_liteide/liteidex/src/3rdparty/qjsonrpc/src/json/qjson_export.h
/* * Copyright (C) 2012-2013 Matt Broadstone * Contact: http://bitbucket.org/devonit/qjsonrpc * * This file is part of the QJsonRpc Library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. */ #ifndef QJSON_EXPORT_H #define QJSON_EXPORT_H #ifdef QJSONRPC_SHARED # ifdef QJSONRPC_BUILD # define QJSON_EXPORT Q_DECL_EXPORT # else # define QJSON_EXPORT Q_DECL_IMPORT # endif #else # define QJSON_EXPORT #endif #endif
912
C++
.h
28
30.964286
69
0.758503
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,651
vterm_keycodes.h
visualfc_liteide/liteidex/src/3rdparty/libvterm/include/vterm_keycodes.h
#ifndef __VTERM_INPUT_H__ #define __VTERM_INPUT_H__ typedef enum { VTERM_MOD_NONE = 0x00, VTERM_MOD_SHIFT = 0x01, VTERM_MOD_ALT = 0x02, VTERM_MOD_CTRL = 0x04, VTERM_ALL_MODS_MASK = 0x07 } VTermModifier; typedef enum { VTERM_KEY_NONE, VTERM_KEY_ENTER, VTERM_KEY_TAB, VTERM_KEY_BACKSPACE, VTERM_KEY_ESCAPE, VTERM_KEY_UP, VTERM_KEY_DOWN, VTERM_KEY_LEFT, VTERM_KEY_RIGHT, VTERM_KEY_INS, VTERM_KEY_DEL, VTERM_KEY_HOME, VTERM_KEY_END, VTERM_KEY_PAGEUP, VTERM_KEY_PAGEDOWN, VTERM_KEY_FUNCTION_0 = 256, VTERM_KEY_FUNCTION_MAX = VTERM_KEY_FUNCTION_0 + 255, VTERM_KEY_KP_0, VTERM_KEY_KP_1, VTERM_KEY_KP_2, VTERM_KEY_KP_3, VTERM_KEY_KP_4, VTERM_KEY_KP_5, VTERM_KEY_KP_6, VTERM_KEY_KP_7, VTERM_KEY_KP_8, VTERM_KEY_KP_9, VTERM_KEY_KP_MULT, VTERM_KEY_KP_PLUS, VTERM_KEY_KP_COMMA, VTERM_KEY_KP_MINUS, VTERM_KEY_KP_PERIOD, VTERM_KEY_KP_DIVIDE, VTERM_KEY_KP_ENTER, VTERM_KEY_KP_EQUAL, VTERM_KEY_MAX, // Must be last VTERM_N_KEYS = VTERM_KEY_MAX } VTermKey; #define VTERM_KEY_FUNCTION(n) (VTERM_KEY_FUNCTION_0+(n)) #endif
1,106
C++
.h
50
19.2
56
0.695694
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,652
vterm.h
visualfc_liteide/liteidex/src/3rdparty/libvterm/include/vterm.h
#ifndef __VTERM_H__ #define __VTERM_H__ #ifdef __cplusplus extern "C" { #endif #include <stdint.h> #include <stdlib.h> #include <stdbool.h> #include "vterm_keycodes.h" #define VTERM_VERSION_MAJOR 0 #define VTERM_VERSION_MINOR 1 #define VTERM_CHECK_VERSION \ vterm_check_version(VTERM_VERSION_MAJOR, VTERM_VERSION_MINOR) typedef struct VTerm VTerm; typedef struct VTermState VTermState; typedef struct VTermScreen VTermScreen; typedef struct { int row; int col; } VTermPos; /* some small utility functions; we can just keep these static here */ /* order points by on-screen flow order */ static inline int vterm_pos_cmp(VTermPos a, VTermPos b) { return (a.row == b.row) ? a.col - b.col : a.row - b.row; } typedef struct { int start_row; int end_row; int start_col; int end_col; } VTermRect; /* true if the rect contains the point */ static inline int vterm_rect_contains(VTermRect r, VTermPos p) { return p.row >= r.start_row && p.row < r.end_row && p.col >= r.start_col && p.col < r.end_col; } /* move a rect */ static inline void vterm_rect_move(VTermRect *rect, int row_delta, int col_delta) { rect->start_row += row_delta; rect->end_row += row_delta; rect->start_col += col_delta; rect->end_col += col_delta; } /** * Bit-field describing the content of the tagged union `VTermColor`. */ typedef enum { /** * If the lower bit of `type` is not set, the colour is 24-bit RGB. */ VTERM_COLOR_RGB = 0x00, /** * The colour is an index into a palette of 256 colours. */ VTERM_COLOR_INDEXED = 0x01, /** * Mask that can be used to extract the RGB/Indexed bit. */ VTERM_COLOR_TYPE_MASK = 0x01, /** * If set, indicates that this colour should be the default foreground * color, i.e. there was no SGR request for another colour. When * rendering this colour it is possible to ignore "idx" and just use a * colour that is not in the palette. */ VTERM_COLOR_DEFAULT_FG = 0x02, /** * If set, indicates that this colour should be the default background * color, i.e. there was no SGR request for another colour. A common * option when rendering this colour is to not render a background at * all, for example by rendering the window transparently at this spot. */ VTERM_COLOR_DEFAULT_BG = 0x04, /** * Mask that can be used to extract the default foreground/background bit. */ VTERM_COLOR_DEFAULT_MASK = 0x06 } VTermColorType; /** * Returns true if the VTERM_COLOR_RGB `type` flag is set, indicating that the * given VTermColor instance is an indexed colour. */ #define VTERM_COLOR_IS_INDEXED(col) \ (((col)->type & VTERM_COLOR_TYPE_MASK) == VTERM_COLOR_INDEXED) /** * Returns true if the VTERM_COLOR_INDEXED `type` flag is set, indicating that * the given VTermColor instance is an rgb colour. */ #define VTERM_COLOR_IS_RGB(col) \ (((col)->type & VTERM_COLOR_TYPE_MASK) == VTERM_COLOR_RGB) /** * Returns true if the VTERM_COLOR_DEFAULT_FG `type` flag is set, indicating * that the given VTermColor instance corresponds to the default foreground * color. */ #define VTERM_COLOR_IS_DEFAULT_FG(col) \ (!!((col)->type & VTERM_COLOR_DEFAULT_FG)) /** * Returns true if the VTERM_COLOR_DEFAULT_BG `type` flag is set, indicating * that the given VTermColor instance corresponds to the default background * color. */ #define VTERM_COLOR_IS_DEFAULT_BG(col) \ (!!((col)->type & VTERM_COLOR_DEFAULT_BG)) /** * Tagged union storing either an RGB color or an index into a colour palette. * In order to convert indexed colours to RGB, you may use the * vterm_state_convert_color_to_rgb() or vterm_screen_convert_color_to_rgb() * functions which lookup the RGB colour from the palette maintained by a * VTermState or VTermScreen instance. */ typedef union { /** * Tag indicating which union member is actually valid. This variable * coincides with the `type` member of the `rgb` and the `indexed` struct * in memory. Please use the `VTERM_COLOR_IS_*` test macros to check whether * a particular type flag is set. */ uint8_t type; /** * Valid if `VTERM_COLOR_IS_RGB(type)` is true. Holds the RGB colour values. */ struct { /** * Same as the top-level `type` member stored in VTermColor. */ uint8_t type; /** * The actual 8-bit red, green, blue colour values. */ uint8_t red, green, blue; } rgb; /** * If `VTERM_COLOR_IS_INDEXED(type)` is true, this member holds the index into * the colour palette. */ struct { /** * Same as the top-level `type` member stored in VTermColor. */ uint8_t type; /** * Index into the colour map. */ uint8_t idx; } indexed; } VTermColor; /** * Constructs a new VTermColor instance representing the given RGB values. */ static inline void vterm_color_rgb(VTermColor *col, uint8_t red, uint8_t green, uint8_t blue) { col->type = VTERM_COLOR_RGB; col->rgb.red = red; col->rgb.green = green; col->rgb.blue = blue; } /** * Construct a new VTermColor instance representing an indexed color with the * given index. */ static inline void vterm_color_indexed(VTermColor *col, uint8_t idx) { col->type = VTERM_COLOR_INDEXED; col->indexed.idx = idx; } /** * Compares two colours. Returns true if the colors are equal, false otherwise. */ int vterm_color_is_equal(const VTermColor *a, const VTermColor *b); typedef enum { /* VTERM_VALUETYPE_NONE = 0 */ VTERM_VALUETYPE_BOOL = 1, VTERM_VALUETYPE_INT, VTERM_VALUETYPE_STRING, VTERM_VALUETYPE_COLOR, VTERM_N_VALUETYPES } VTermValueType; typedef union { int boolean; int number; char *string; VTermColor color; } VTermValue; typedef enum { /* VTERM_ATTR_NONE = 0 */ VTERM_ATTR_BOLD = 1, // bool: 1, 22 VTERM_ATTR_UNDERLINE, // number: 4, 21, 24 VTERM_ATTR_ITALIC, // bool: 3, 23 VTERM_ATTR_BLINK, // bool: 5, 25 VTERM_ATTR_REVERSE, // bool: 7, 27 VTERM_ATTR_STRIKE, // bool: 9, 29 VTERM_ATTR_FONT, // number: 10-19 VTERM_ATTR_FOREGROUND, // color: 30-39 90-97 VTERM_ATTR_BACKGROUND, // color: 40-49 100-107 VTERM_N_ATTRS } VTermAttr; typedef enum { /* VTERM_PROP_NONE = 0 */ VTERM_PROP_CURSORVISIBLE = 1, // bool VTERM_PROP_CURSORBLINK, // bool VTERM_PROP_ALTSCREEN, // bool VTERM_PROP_TITLE, // string VTERM_PROP_ICONNAME, // string VTERM_PROP_REVERSE, // bool VTERM_PROP_CURSORSHAPE, // number VTERM_PROP_MOUSE, // number VTERM_N_PROPS } VTermProp; enum { VTERM_PROP_CURSORSHAPE_BLOCK = 1, VTERM_PROP_CURSORSHAPE_UNDERLINE, VTERM_PROP_CURSORSHAPE_BAR_LEFT, VTERM_N_PROP_CURSORSHAPES }; enum { VTERM_PROP_MOUSE_NONE = 0, VTERM_PROP_MOUSE_CLICK, VTERM_PROP_MOUSE_DRAG, VTERM_PROP_MOUSE_MOVE, VTERM_N_PROP_MOUSES }; typedef struct { const uint32_t *chars; int width; unsigned int protected_cell:1; /* DECSCA-protected against DECSEL/DECSED */ unsigned int dwl:1; /* DECDWL or DECDHL double-width line */ unsigned int dhl:2; /* DECDHL double-height line (1=top 2=bottom) */ } VTermGlyphInfo; typedef struct { unsigned int doublewidth:1; /* DECDWL or DECDHL line */ unsigned int doubleheight:2; /* DECDHL line (1=top 2=bottom) */ } VTermLineInfo; typedef struct { /* libvterm relies on this memory to be zeroed out before it is returned * by the allocator. */ void *(*malloc)(size_t size, void *allocdata); void (*free)(void *ptr, void *allocdata); } VTermAllocatorFunctions; void vterm_check_version(int major, int minor); VTerm *vterm_new(int rows, int cols); VTerm *vterm_new_with_allocator(int rows, int cols, VTermAllocatorFunctions *funcs, void *allocdata); void vterm_free(VTerm* vt); void vterm_get_size(const VTerm *vt, int *rowsp, int *colsp); void vterm_set_size(VTerm *vt, int rows, int cols); int vterm_get_utf8(const VTerm *vt); void vterm_set_utf8(VTerm *vt, int is_utf8); size_t vterm_input_write(VTerm *vt, const char *bytes, size_t len); /* Setting output callback will override the buffer logic */ typedef void VTermOutputCallback(const char *s, size_t len, void *user); void vterm_output_set_callback(VTerm *vt, VTermOutputCallback *func, void *user); /* These buffer functions only work if output callback is NOT set * These are deprecated and will be removed in a later version */ size_t vterm_output_get_buffer_size(const VTerm *vt); size_t vterm_output_get_buffer_current(const VTerm *vt); size_t vterm_output_get_buffer_remaining(const VTerm *vt); /* This too */ size_t vterm_output_read(VTerm *vt, char *buffer, size_t len); void vterm_keyboard_unichar(VTerm *vt, uint32_t c, VTermModifier mod); void vterm_keyboard_key(VTerm *vt, VTermKey key, VTermModifier mod); void vterm_keyboard_start_paste(VTerm *vt); void vterm_keyboard_end_paste(VTerm *vt); void vterm_mouse_move(VTerm *vt, int row, int col, VTermModifier mod); void vterm_mouse_button(VTerm *vt, int button, bool pressed, VTermModifier mod); // ------------ // Parser layer // ------------ /* Flag to indicate non-final subparameters in a single CSI parameter. * Consider * CSI 1;2:3:4;5a * 1 4 and 5 are final. * 2 and 3 are non-final and will have this bit set * * Don't confuse this with the final byte of the CSI escape; 'a' in this case. */ #define CSI_ARG_FLAG_MORE (1U<<31) #define CSI_ARG_MASK (~(1U<<31)) #define CSI_ARG_HAS_MORE(a) ((a) & CSI_ARG_FLAG_MORE) #define CSI_ARG(a) ((a) & CSI_ARG_MASK) /* Can't use -1 to indicate a missing argument; use this instead */ #define CSI_ARG_MISSING ((1UL<<31)-1) #define CSI_ARG_IS_MISSING(a) (CSI_ARG(a) == CSI_ARG_MISSING) #define CSI_ARG_OR(a,def) (CSI_ARG(a) == CSI_ARG_MISSING ? (def) : CSI_ARG(a)) #define CSI_ARG_COUNT(a) (CSI_ARG(a) == CSI_ARG_MISSING || CSI_ARG(a) == 0 ? 1 : CSI_ARG(a)) typedef struct { int (*text)(const char *bytes, size_t len, void *user); int (*control)(unsigned char control, void *user); int (*escape)(const char *bytes, size_t len, void *user); int (*csi)(const char *leader, const long args[], int argcount, const char *intermed, char command, void *user); int (*osc)(const char *command, size_t cmdlen, void *user); int (*dcs)(const char *command, size_t cmdlen, void *user); int (*resize)(int rows, int cols, void *user); } VTermParserCallbacks; void vterm_parser_set_callbacks(VTerm *vt, const VTermParserCallbacks *callbacks, void *user); void *vterm_parser_get_cbdata(VTerm *vt); // ----------- // State layer // ----------- typedef struct { int (*putglyph)(VTermGlyphInfo *info, VTermPos pos, void *user); int (*movecursor)(VTermPos pos, VTermPos oldpos, int visible, void *user); int (*scrollrect)(VTermRect rect, int downward, int rightward, void *user); int (*moverect)(VTermRect dest, VTermRect src, void *user); int (*erase)(VTermRect rect, int selective, void *user); int (*initpen)(void *user); int (*setpenattr)(VTermAttr attr, VTermValue *val, void *user); int (*settermprop)(VTermProp prop, VTermValue *val, void *user); int (*bell)(void *user); int (*resize)(int rows, int cols, VTermPos *delta, void *user); int (*setlineinfo)(int row, const VTermLineInfo *newinfo, const VTermLineInfo *oldinfo, void *user); } VTermStateCallbacks; VTermState *vterm_obtain_state(VTerm *vt); void vterm_state_set_callbacks(VTermState *state, const VTermStateCallbacks *callbacks, void *user); void *vterm_state_get_cbdata(VTermState *state); // Only invokes control, csi, osc, dcs void vterm_state_set_unrecognised_fallbacks(VTermState *state, const VTermParserCallbacks *fallbacks, void *user); void *vterm_state_get_unrecognised_fbdata(VTermState *state); void vterm_state_reset(VTermState *state, int hard); void vterm_state_get_cursorpos(const VTermState *state, VTermPos *cursorpos); void vterm_state_get_default_colors(const VTermState *state, VTermColor *default_fg, VTermColor *default_bg); void vterm_state_get_palette_color(const VTermState *state, int index, VTermColor *col); void vterm_state_set_default_colors(VTermState *state, const VTermColor *default_fg, const VTermColor *default_bg); void vterm_state_set_palette_color(VTermState *state, int index, const VTermColor *col); void vterm_state_set_bold_highbright(VTermState *state, int bold_is_highbright); int vterm_state_get_penattr(const VTermState *state, VTermAttr attr, VTermValue *val); int vterm_state_set_termprop(VTermState *state, VTermProp prop, VTermValue *val); void vterm_state_focus_in(VTermState *state); void vterm_state_focus_out(VTermState *state); const VTermLineInfo *vterm_state_get_lineinfo(const VTermState *state, int row); /** * Makes sure that the given color `col` is indeed an RGB colour. After this * function returns, VTERM_COLOR_IS_RGB(col) will return true, while all other * flags stored in `col->type` will have been reset. * * @param state is the VTermState instance from which the colour palette should * be extracted. * @param col is a pointer at the VTermColor instance that should be converted * to an RGB colour. */ void vterm_state_convert_color_to_rgb(const VTermState *state, VTermColor *col); // ------------ // Screen layer // ------------ typedef struct { unsigned int bold : 1; unsigned int underline : 2; unsigned int italic : 1; unsigned int blink : 1; unsigned int reverse : 1; unsigned int strike : 1; unsigned int font : 4; /* 0 to 9 */ unsigned int dwl : 1; /* On a DECDWL or DECDHL line */ unsigned int dhl : 2; /* On a DECDHL line (1=top 2=bottom) */ } VTermScreenCellAttrs; enum { VTERM_UNDERLINE_OFF, VTERM_UNDERLINE_SINGLE, VTERM_UNDERLINE_DOUBLE, VTERM_UNDERLINE_CURLY, }; typedef struct { #define VTERM_MAX_CHARS_PER_CELL 6 uint32_t chars[VTERM_MAX_CHARS_PER_CELL]; char width; VTermScreenCellAttrs attrs; VTermColor fg, bg; } VTermScreenCell; typedef struct { int (*damage)(VTermRect rect, void *user); int (*moverect)(VTermRect dest, VTermRect src, void *user); int (*movecursor)(VTermPos pos, VTermPos oldpos, int visible, void *user); int (*settermprop)(VTermProp prop, VTermValue *val, void *user); int (*bell)(void *user); int (*resize)(int rows, int cols, void *user); int (*sb_pushline)(int cols, const VTermScreenCell *cells, void *user); int (*sb_popline)(int cols, VTermScreenCell *cells, void *user); } VTermScreenCallbacks; VTermScreen *vterm_obtain_screen(VTerm *vt); void vterm_screen_set_callbacks(VTermScreen *screen, const VTermScreenCallbacks *callbacks, void *user); void *vterm_screen_get_cbdata(VTermScreen *screen); // Only invokes control, csi, osc, dcs void vterm_screen_set_unrecognised_fallbacks(VTermScreen *screen, const VTermParserCallbacks *fallbacks, void *user); void *vterm_screen_get_unrecognised_fbdata(VTermScreen *screen); void vterm_screen_enable_altscreen(VTermScreen *screen, int altscreen); typedef enum { VTERM_DAMAGE_CELL, /* every cell */ VTERM_DAMAGE_ROW, /* entire rows */ VTERM_DAMAGE_SCREEN, /* entire screen */ VTERM_DAMAGE_SCROLL, /* entire screen + scrollrect */ VTERM_N_DAMAGES } VTermDamageSize; void vterm_screen_flush_damage(VTermScreen *screen); void vterm_screen_set_damage_merge(VTermScreen *screen, VTermDamageSize size); void vterm_screen_reset(VTermScreen *screen, int hard); /* Neither of these functions NUL-terminate the buffer */ size_t vterm_screen_get_chars(const VTermScreen *screen, uint32_t *chars, size_t len, const VTermRect rect); size_t vterm_screen_get_text(const VTermScreen *screen, char *str, size_t len, const VTermRect rect); typedef enum { VTERM_ATTR_BOLD_MASK = 1 << 0, VTERM_ATTR_UNDERLINE_MASK = 1 << 1, VTERM_ATTR_ITALIC_MASK = 1 << 2, VTERM_ATTR_BLINK_MASK = 1 << 3, VTERM_ATTR_REVERSE_MASK = 1 << 4, VTERM_ATTR_STRIKE_MASK = 1 << 5, VTERM_ATTR_FONT_MASK = 1 << 6, VTERM_ATTR_FOREGROUND_MASK = 1 << 7, VTERM_ATTR_BACKGROUND_MASK = 1 << 8, VTERM_ALL_ATTRS_MASK = (1 << 9) - 1 } VTermAttrMask; int vterm_screen_get_attrs_extent(const VTermScreen *screen, VTermRect *extent, VTermPos pos, VTermAttrMask attrs); int vterm_screen_get_cell(const VTermScreen *screen, VTermPos pos, VTermScreenCell *cell); int vterm_screen_is_eol(const VTermScreen *screen, VTermPos pos); /** * Same as vterm_state_convert_color_to_rgb(), but takes a `screen` instead of a `state` * instance. */ void vterm_screen_convert_color_to_rgb(const VTermScreen *screen, VTermColor *col); // --------- // Utilities // --------- VTermValueType vterm_get_attr_type(VTermAttr attr); VTermValueType vterm_get_prop_type(VTermProp prop); void vterm_scroll_rect(VTermRect rect, int downward, int rightward, int (*moverect)(VTermRect src, VTermRect dest, void *user), int (*eraserect)(VTermRect rect, int selective, void *user), void *user); void vterm_copy_cells(VTermRect dest, VTermRect src, void (*copycell)(VTermPos dest, VTermPos src, void *user), void *user); #ifdef __cplusplus } #endif #endif
17,306
C++
.h
438
36.570776
118
0.702319
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
21,653
utf8.h
visualfc_liteide/liteidex/src/3rdparty/libvterm/src/utf8.h
/* The following functions copied and adapted from libtermkey * * http://www.leonerd.org.uk/code/libtermkey/ */ static inline unsigned int utf8_seqlen(long codepoint) { if(codepoint < 0x0000080) return 1; if(codepoint < 0x0000800) return 2; if(codepoint < 0x0010000) return 3; if(codepoint < 0x0200000) return 4; if(codepoint < 0x4000000) return 5; return 6; } /* Does NOT NUL-terminate the buffer */ static int fill_utf8(long codepoint, char *str) { int nbytes = utf8_seqlen(codepoint); // This is easier done backwards int b = nbytes; while(b > 1) { b--; str[b] = 0x80 | (codepoint & 0x3f); codepoint >>= 6; } switch(nbytes) { case 1: str[0] = (codepoint & 0x7f); break; case 2: str[0] = 0xc0 | (codepoint & 0x1f); break; case 3: str[0] = 0xe0 | (codepoint & 0x0f); break; case 4: str[0] = 0xf0 | (codepoint & 0x07); break; case 5: str[0] = 0xf8 | (codepoint & 0x03); break; case 6: str[0] = 0xfc | (codepoint & 0x01); break; } return nbytes; } /* end copy */
1,040
C++
.h
35
26.685714
61
0.651349
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,654
vterm_internal.h
visualfc_liteide/liteidex/src/3rdparty/libvterm/src/vterm_internal.h
#ifndef __VTERM_INTERNAL_H__ #define __VTERM_INTERNAL_H__ #include "vterm.h" #include <stdarg.h> #if defined(__GNUC__) # define INTERNAL __attribute__((visibility("internal"))) #else # define INTERNAL #endif #ifdef DEBUG # define DEBUG_LOG(...) fprintf(stderr, __VA_ARGS__) #else # define DEBUG_LOG(...) #endif #define ESC_S "\x1b" #define INTERMED_MAX 16 #define CSI_ARGS_MAX 16 #define CSI_LEADER_MAX 16 typedef struct VTermEncoding VTermEncoding; typedef struct { VTermEncoding *enc; // This size should be increased if required by other stateful encodings char data[4*sizeof(uint32_t)]; } VTermEncodingInstance; struct VTermPen { VTermColor fg; VTermColor bg; unsigned int bold:1; unsigned int underline:2; unsigned int italic:1; unsigned int blink:1; unsigned int reverse:1; unsigned int strike:1; unsigned int font:4; /* To store 0-9 */ }; struct VTermState { VTerm *vt; const VTermStateCallbacks *callbacks; void *cbdata; const VTermParserCallbacks *fallbacks; void *fbdata; int rows; int cols; /* Current cursor position */ VTermPos pos; int at_phantom; /* True if we're on the "81st" phantom column to defer a wraparound */ int scrollregion_top; int scrollregion_bottom; /* -1 means unbounded */ #define SCROLLREGION_BOTTOM(state) ((state)->scrollregion_bottom > -1 ? (state)->scrollregion_bottom : (state)->rows) int scrollregion_left; #define SCROLLREGION_LEFT(state) ((state)->mode.leftrightmargin ? (state)->scrollregion_left : 0) int scrollregion_right; /* -1 means unbounded */ #define SCROLLREGION_RIGHT(state) ((state)->mode.leftrightmargin && (state)->scrollregion_right > -1 ? (state)->scrollregion_right : (state)->cols) /* Bitvector of tab stops */ unsigned char *tabstops; VTermLineInfo *lineinfo; #define ROWWIDTH(state,row) ((state)->lineinfo[(row)].doublewidth ? ((state)->cols / 2) : (state)->cols) #define THISROWWIDTH(state) ROWWIDTH(state, (state)->pos.row) /* Mouse state */ int mouse_col, mouse_row; int mouse_buttons; int mouse_flags; #define MOUSE_WANT_CLICK 0x01 #define MOUSE_WANT_DRAG 0x02 #define MOUSE_WANT_MOVE 0x04 enum { MOUSE_X10, MOUSE_UTF8, MOUSE_SGR, MOUSE_RXVT } mouse_protocol; /* Last glyph output, for Unicode recombining purposes */ uint32_t *combine_chars; size_t combine_chars_size; // Number of ELEMENTS in the above int combine_width; // The width of the glyph above VTermPos combine_pos; // Position before movement struct { unsigned int keypad:1; unsigned int cursor:1; unsigned int autowrap:1; unsigned int insert:1; unsigned int newline:1; unsigned int cursor_visible:1; unsigned int cursor_blink:1; unsigned int cursor_shape:2; unsigned int alt_screen:1; unsigned int origin:1; unsigned int screen:1; unsigned int leftrightmargin:1; unsigned int bracketpaste:1; unsigned int report_focus:1; } mode; VTermEncodingInstance encoding[4], encoding_utf8; int gl_set, gr_set, gsingle_set; struct VTermPen pen; VTermColor default_fg; VTermColor default_bg; VTermColor colors[16]; // Store the 8 ANSI and the 8 ANSI high-brights only int bold_is_highbright; unsigned int protected_cell : 1; /* Saved state under DEC mode 1048/1049 */ struct { VTermPos pos; struct VTermPen pen; struct { unsigned int cursor_visible:1; unsigned int cursor_blink:1; unsigned int cursor_shape:2; } mode; } saved; }; typedef enum { VTERM_PARSER_OSC, VTERM_PARSER_DCS, VTERM_N_PARSER_TYPES } VTermParserStringType; struct VTerm { VTermAllocatorFunctions *allocator; void *allocdata; int rows; int cols; struct { unsigned int utf8:1; unsigned int ctrl8bit:1; } mode; struct { enum VTermParserState { NORMAL, CSI_LEADER, CSI_ARGS, CSI_INTERMED, ESC, /* below here are the "string states" */ STRING, ESC_IN_STRING, } state; int intermedlen; char intermed[INTERMED_MAX]; int csi_leaderlen; char csi_leader[CSI_LEADER_MAX]; int csi_argi; long csi_args[CSI_ARGS_MAX]; const VTermParserCallbacks *callbacks; void *cbdata; VTermParserStringType stringtype; char *strbuffer; size_t strbuffer_len; size_t strbuffer_cur; } parser; /* len == malloc()ed size; cur == number of valid bytes */ VTermOutputCallback *outfunc; void *outdata; char *outbuffer; size_t outbuffer_len; size_t outbuffer_cur; char *tmpbuffer; size_t tmpbuffer_len; VTermState *state; VTermScreen *screen; }; struct VTermEncoding { void (*init) (VTermEncoding *enc, void *data); void (*decode)(VTermEncoding *enc, void *data, uint32_t cp[], int *cpi, int cplen, const char bytes[], size_t *pos, size_t len); }; typedef enum { ENC_UTF8, ENC_SINGLE_94 } VTermEncodingType; void *vterm_allocator_malloc(VTerm *vt, size_t size); void vterm_allocator_free(VTerm *vt, void *ptr); void vterm_push_output_bytes(VTerm *vt, const char *bytes, size_t len); void vterm_push_output_vsprintf(VTerm *vt, const char *format, va_list args); void vterm_push_output_sprintf(VTerm *vt, const char *format, ...); void vterm_push_output_sprintf_ctrl(VTerm *vt, unsigned char ctrl, const char *fmt, ...); void vterm_push_output_sprintf_dcs(VTerm *vt, const char *fmt, ...); void vterm_state_free(VTermState *state); void vterm_state_newpen(VTermState *state); void vterm_state_resetpen(VTermState *state); void vterm_state_setpen(VTermState *state, const long args[], int argcount); int vterm_state_getpen(VTermState *state, long args[], int argcount); void vterm_state_savepen(VTermState *state, int save); enum { C1_SS3 = 0x8f, C1_DCS = 0x90, C1_CSI = 0x9b, C1_ST = 0x9c, }; void vterm_state_push_output_sprintf_CSI(VTermState *vts, const char *format, ...); void vterm_screen_free(VTermScreen *screen); VTermEncoding *vterm_lookup_encoding(VTermEncodingType type, char designation); int vterm_unicode_width(uint32_t codepoint); int vterm_unicode_is_combining(uint32_t codepoint); #endif
6,146
C++
.h
193
28.476684
147
0.718018
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,655
rect.h
visualfc_liteide/liteidex/src/3rdparty/libvterm/src/rect.h
/* * Some utility functions on VTermRect structures */ #define STRFrect "(%d,%d-%d,%d)" #define ARGSrect(r) (r).start_row, (r).start_col, (r).end_row, (r).end_col /* Expand dst to contain src as well */ static void rect_expand(VTermRect *dst, VTermRect *src) { if(dst->start_row > src->start_row) dst->start_row = src->start_row; if(dst->start_col > src->start_col) dst->start_col = src->start_col; if(dst->end_row < src->end_row) dst->end_row = src->end_row; if(dst->end_col < src->end_col) dst->end_col = src->end_col; } /* Clip the dst to ensure it does not step outside of bounds */ static void rect_clip(VTermRect *dst, VTermRect *bounds) { if(dst->start_row < bounds->start_row) dst->start_row = bounds->start_row; if(dst->start_col < bounds->start_col) dst->start_col = bounds->start_col; if(dst->end_row > bounds->end_row) dst->end_row = bounds->end_row; if(dst->end_col > bounds->end_col) dst->end_col = bounds->end_col; /* Ensure it doesn't end up negatively-sized */ if(dst->end_row < dst->start_row) dst->end_row = dst->start_row; if(dst->end_col < dst->start_col) dst->end_col = dst->start_col; } /* True if the two rectangles are equal */ static int rect_equal(VTermRect *a, VTermRect *b) { return (a->start_row == b->start_row) && (a->start_col == b->start_col) && (a->end_row == b->end_row) && (a->end_col == b->end_col); } /* True if small is contained entirely within big */ static int rect_contains(VTermRect *big, VTermRect *small) { if(small->start_row < big->start_row) return 0; if(small->start_col < big->start_col) return 0; if(small->end_row > big->end_row) return 0; if(small->end_col > big->end_col) return 0; return 1; } /* True if the rectangles overlap at all */ static int rect_intersects(VTermRect *a, VTermRect *b) { if(a->start_row > b->end_row || b->start_row > a->end_row) return 0; if(a->start_col > b->end_col || b->start_col > a->end_col) return 0; return 1; }
2,022
C++
.h
50
37.78
76
0.64293
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
true
true
false
false
false
false
false
false
21,657
fakevimproxy.h
visualfc_liteide/liteidex/src/3rdparty/fakevim/python/fakevimproxy.h
#include <fakevim/fakevimhandler.h> #include <QObject> #include <QTextCursor> #include <QTextEdit> class QString; typedef FakeVim::Internal::ExCommand ExCommand; class FakeVimProxy : public QObject { Q_OBJECT public: explicit FakeVimProxy(QObject *handler, QObject *parent = 0); virtual void commandBufferChanged(const QString &, int, int, int, QObject *) {} virtual void statusDataChanged(const QString &) {} virtual void extraInformationChanged(const QString &) {} virtual void selectionChanged(const QList<QTextEdit::ExtraSelection> &) {} virtual void highlightMatches(const QString &) {} virtual QString writeAllRequested() { return QString(); } virtual QTextCursor moveToMatchingParenthesis() { return QTextCursor(); } virtual bool checkForElectricCharacter(QChar) { return false; } virtual void indentRegion(int, int, QChar) {} virtual void completionRequested() {} virtual void simpleCompletionRequested(const QString &, bool) {} virtual void windowCommandRequested(const QString &, int) {} virtual void findRequested(bool) {} virtual void findNextRequested(bool) {} virtual bool handleExCommand(const ExCommand &) { return false; } virtual void disableBlockSelection() {} virtual void enableBlockSelection(const QTextCursor &) {} virtual QTextCursor blockSelection() { return QTextCursor(); } virtual bool hasBlockSelection() { return false; } virtual void foldToggle(int) {} virtual void foldAll(bool) {} virtual void fold(int, bool) {} virtual void foldGoTo(int, bool) {} virtual void jumpToGlobalMark(QChar, bool, const QString &) {} private slots: void on_commandBufferChanged(const QString &msg, int cursorPos, int anchorPos, int messageLevel, QObject *eventFilter); void on_statusDataChanged(const QString &msg); void on_extraInformationChanged(const QString &msg); void on_selectionChanged(const QList<QTextEdit::ExtraSelection> &selection); void on_highlightMatches(const QString &needle); void on_writeAllRequested(QString *error); void on_moveToMatchingParenthesis(bool *moved, bool *forward, QTextCursor *cursor); void on_checkForElectricCharacter(bool *result, QChar c); void on_indentRegion(int beginLine, int endLine, QChar typedChar); void on_completionRequested(); void on_simpleCompletionRequested(const QString &needle, bool forward); void on_windowCommandRequested(const QString &key, int count); void on_findRequested(bool reverse); void on_findNextRequested(bool reverse); void on_handleExCommandRequested(bool *handled, const ExCommand &cmd); void on_requestDisableBlockSelection(); void on_requestSetBlockSelection(const QTextCursor&); void on_requestBlockSelection(QTextCursor *cursor); void on_requestHasBlockSelection(bool *on); void on_foldToggle(int depth); void on_foldAll(bool fold); void on_fold(int depth, bool fold); void on_foldGoTo(int count, bool current); void on_jumpToGlobalMark(QChar mark, bool backTickMode, const QString &fileName); };
3,174
C++
.h
62
45.548387
88
0.740155
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,658
fakevimhandler.h
visualfc_liteide/liteidex/src/3rdparty/fakevim/fakevim/fakevimhandler.h
/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ****************************************************************************/ #ifndef FAKEVIM_HANDLER_H #define FAKEVIM_HANDLER_H #include <QObject> #include <QTextEdit> namespace FakeVim { namespace Internal { enum RangeMode { // Reordering first three enum items here will break // compatibility with clipboard format stored by Vim. RangeCharMode, // v RangeLineMode, // V RangeBlockMode, // Ctrl-v RangeLineModeExclusive, RangeBlockAndTailMode // Ctrl-v for D and X }; struct Range { Range(); Range(int b, int e, RangeMode m = RangeCharMode); QString toString() const; bool isValid() const; int beginPos; int endPos; RangeMode rangemode; }; struct ExCommand { ExCommand() : hasBang(false), count(1) {} ExCommand(const QString &cmd, const QString &args = QString(), const Range &range = Range()); bool matches(const QString &min, const QString &full) const; QString cmd; bool hasBang; QString args; Range range; int count; }; // message levels sorted by severity enum MessageLevel { MessageMode, // show current mode (format "-- %1 --") MessageCommand, // show last Ex command or search MessageInfo, // result of a command MessageWarning, // warning MessageError, // error MessageShowCmd // partial command }; class FakeVimHandler : public QObject { Q_OBJECT public: explicit FakeVimHandler(QWidget *widget, QObject *parent = 0); ~FakeVimHandler(); QWidget *widget(); // call before widget is deleted void disconnectFromEditor(); public slots: void setCurrentFileName(const QString &fileName); QString currentFileName() const; void showMessage(MessageLevel level, const QString &msg); // This executes an "ex" style command taking context // information from the current widget. void handleCommand(const QString &cmd); void handleReplay(const QString &keys); void handleInput(const QString &keys); void installEventFilter(); // Convenience void setupWidget(); void restoreWidget(int tabSize); // Test only int physicalIndentation(const QString &line) const; int logicalIndentation(const QString &line) const; QString tabExpand(int n) const; void miniBufferTextEdited(const QString &text, int cursorPos, int anchorPos); // Set text cursor position. Keeps anchor if in visual mode. void setTextCursorPosition(int position); QTextCursor textCursor() const; void setTextCursor(const QTextCursor &cursor); bool jumpToLocalMark(QChar mark, bool backTickMode); bool eventFilter(QObject *ob, QEvent *ev); signals: void commandBufferChanged(const QString &msg, int cursorPos, int anchorPos, int messageLevel, QObject *eventFilter); void statusDataChanged(const QString &msg); void extraInformationChanged(const QString &msg); void selectionChanged(const QList<QTextEdit::ExtraSelection> &selection); void highlightMatches(const QString &needle); void writeAllRequested(QString *error); void moveToMatchingParenthesis(bool *moved, bool *forward, QTextCursor *cursor); void checkForElectricCharacter(bool *result, QChar c); void indentRegion(int beginLine, int endLine, QChar typedChar); void completionRequested(); void simpleCompletionRequested(const QString &needle, bool forward); void windowCommandRequested(const QString &key, int count); void findRequested(bool reverse); void findNextRequested(bool reverse); void handleExCommandRequested(bool *handled, const ExCommand &cmd); void requestDisableBlockSelection(); void requestSetBlockSelection(const QTextCursor&); void requestBlockSelection(QTextCursor*); void requestHasBlockSelection(bool *on); void foldToggle(int depth); void foldAll(bool fold); void fold(int depth, bool fold); void foldGoTo(int count, bool current); void jumpToGlobalMark(QChar mark, bool backTickMode, const QString &fileName); public: class Private; private: Private *d; }; } // namespace Internal } // namespace FakeVim Q_DECLARE_METATYPE(FakeVim::Internal::ExCommand) #endif // FAKEVIM_HANDLER_H
5,786
C++
.h
144
35.319444
85
0.705091
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,659
fakevimactions.h
visualfc_liteide/liteidex/src/3rdparty/fakevim/fakevim/fakevimactions.h
/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ****************************************************************************/ #ifndef FAKEVIM_ACTIONS_H #define FAKEVIM_ACTIONS_H #ifndef FAKEVIM_STANDALONE # include <utils/savedaction.h> #endif #include <QHash> #include <QObject> #include <QString> #include <QVariant> namespace FakeVim { namespace Internal { #ifdef FAKEVIM_STANDALONE namespace Utils { class SavedAction : public QObject { Q_OBJECT public: SavedAction(QObject *parent); void setValue(const QVariant &value); QVariant value() const; void setDefaultValue(const QVariant &value); QVariant defaultValue() const; void setSettingsKey(const QString &key); QString settingsKey() const; QVariant m_value; QVariant m_defaultValue; QString m_settingsKey; }; } // namespace Utils #endif // FAKEVIM_STANDALONE enum FakeVimSettingsCode { ConfigUseFakeVim, ConfigReadVimRc, ConfigVimRcPath, ConfigStartOfLine, ConfigHlSearch, ConfigTabStop, ConfigSmartTab, ConfigShiftWidth, ConfigExpandTab, ConfigAutoIndent, ConfigSmartIndent, ConfigIncSearch, ConfigUseCoreSearch, ConfigSmartCase, ConfigIgnoreCase, ConfigWrapScan, // command ~ behaves as g~ ConfigTildeOp, // indent allow backspacing over autoindent // eol allow backspacing over line breaks (join lines) // start allow backspacing over the start of insert; CTRL-W and CTRL-U // stop once at the start of insert. ConfigBackspace, // @,48-57,_,192-255 ConfigIsKeyword, // other actions ConfigShowMarks, ConfigPassControlKey, ConfigPassKeys, ConfigClipboard, ConfigShowCmd, ConfigScrollOff, ConfigRelativeNumber }; class FakeVimSettings : public QObject { Q_OBJECT public: FakeVimSettings(); ~FakeVimSettings(); void insertItem(int code, Utils::SavedAction *item, const QString &longname = QString(), const QString &shortname = QString()); Utils::SavedAction *item(int code); Utils::SavedAction *item(const QString &name); QString trySetValue(const QString &name, const QString &value); #ifndef FAKEVIM_STANDALONE void readSettings(QSettings *settings); void writeSettings(QSettings *settings); #endif private: QHash<int, Utils::SavedAction *> m_items; QHash<QString, int> m_nameToCode; QHash<int, QString> m_codeToName; }; FakeVimSettings *theFakeVimSettings(); Utils::SavedAction *theFakeVimSetting(int code); } // namespace Internal } // namespace FakeVim #endif // FAKEVIM_ACTTIONS_H
4,095
C++
.h
120
29.725
78
0.698752
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,660
utils_global.h
visualfc_liteide/liteidex/src/3rdparty/fakevim/fakevim/utils/utils_global.h
/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ****************************************************************************/ #ifndef UTILS_GLOBAL_H #define UTILS_GLOBAL_H #include <qglobal.h> #define QTCREATOR_UTILS_EXPORT //#if defined(QTCREATOR_UTILS_LIB) //# define QTCREATOR_UTILS_EXPORT Q_DECL_EXPORT //#elif defined(QTCREATOR_UTILS_STATIC_LIB) // Abuse single files for manual tests //# define QTCREATOR_UTILS_EXPORT //#else //# define QTCREATOR_UTILS_EXPORT Q_DECL_IMPORT //#endif #endif // UTILS_GLOBAL_H
1,895
C++
.h
40
45.125
84
0.692683
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,664
searchresultcolor.h
visualfc_liteide/liteidex/src/3rdparty/qtc_searchresult/searchresultcolor.h
#ifndef SEARCHRESULTCOLOR_H #define SEARCHRESULTCOLOR_H #include <QColor> namespace Find { namespace Internal { class SearchResultColor{ public: QColor textBackground; QColor textForeground; QColor highlightBackground; QColor highlightForeground; }; } // namespace Internal } // namespace Find #endif // SEARCHRESULTCOLOR_H
345
C++
.h
15
20.6
31
0.806154
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,667
searchresultitem.h
visualfc_liteide/liteidex/src/3rdparty/qtc_searchresult/searchresultitem.h
/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ****************************************************************************/ #ifndef SEARCHRESULTITEM_H #define SEARCHRESULTITEM_H #include <QStringList> #include <QVariant> #include <QIcon> namespace Find { enum AddMode { AddSorted, AddOrdered }; class SearchResultItem { public: SearchResultItem() : textMarkPos(-1), textMarkLength(0), lineNumber(-1), useTextEditorFont(false) { } SearchResultItem(const SearchResultItem &other) : path(other.path), text(other.text), textMarkPos(other.textMarkPos), textMarkLength(other.textMarkLength), icon(other.icon), lineNumber(other.lineNumber), useTextEditorFont(other.useTextEditorFont), userData(other.userData) { } QStringList path; // hierarchy to the parent item of this item QString text; // text to show for the item itself int textMarkPos; // 0-based starting position for a mark (-1 for no mark) int textMarkLength; // length of the mark (0 for no mark) QIcon icon; // icon to show in front of the item (by be null icon to hide) int lineNumber; // (0 or -1 for no line number) bool useTextEditorFont; QVariant userData; // user data for identification of the item }; //inline SearchResultItem makeResult(const QString &fileName, int lineNumber, const QString &rowText, // int searchTermStart, int searchTermLength, const QVariant &userData) //{ // SearchResultItem item; // item.path = QStringList() << QDir::toNativeSeparators(fileName); // item.lineNumber = lineNumber; // item.text = rowText; // item.textMarkPos = searchTermStart; // item.textMarkLength = searchTermLength; // item.useTextEditorFont = true; // item.userData = userData; // return item; //} } // namespace Find Q_DECLARE_METATYPE(Find::SearchResultItem) #endif //SEARCHRESULTITEM_H
3,280
C++
.h
84
36.011905
101
0.698901
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,671
syntaxhighlighter.h
visualfc_liteide/liteidex/src/3rdparty/qtc_texteditor/syntaxhighlighter.h
/**************************************************************************** ** ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtGui module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. ** ** ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef TEXTEDITOR_SYNTAXHIGHLIGHTER_H #define TEXTEDITOR_SYNTAXHIGHLIGHTER_H #include "texteditor_global.h" #include <QtCore/QObject> #include <QtGui/QTextLayout> QT_BEGIN_NAMESPACE class QTextDocument; class QSyntaxHighlighterPrivate; class QTextCharFormat; class QFont; class QColor; class QTextBlockUserData; class QTextEdit; QT_END_NAMESPACE namespace TextEditor { class SyntaxHighlighterPrivate; struct SyntaxComment { SyntaxComment() : isCommentAfterWhiteSpaces(true), isCommentAfterWhiteSpacesAddSpace (true) {} bool isEmpty() const { return singleLineComment.isEmpty() && multiLineCommentStart.isEmpty() && multiLineCommentEnd.isEmpty(); } QString singleLineComment; QString multiLineCommentStart; QString multiLineCommentEnd; bool isCommentAfterWhiteSpaces; bool isCommentAfterWhiteSpacesAddSpace; }; class TEXTEDITOR_EXPORT SyntaxHighlighter : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(SyntaxHighlighter) public: enum TextFormatId { Normal = 1, VisualWhitespace, Keyword, DataType, Decimal, BaseN, Float, Char, String, Comment, Alert, Error, Function, RegionMarker, Others, Symbol, BuiltinFunc, Predeclared, FuncDecl, Placeholder, ToDo, PreprocessorFormat, TextFormatId_MAX }; public: SyntaxHighlighter(QObject *parent); SyntaxHighlighter(QTextDocument *parent); SyntaxHighlighter(QTextEdit *parent); virtual ~SyntaxHighlighter(); void setDocument(QTextDocument *doc); QTextDocument *document() const; void setContextData(const QString &id, const QString &value) { m_contextMap[id] = value; } QString contextData(const QString &id) { return m_contextMap[id]; } void setExtraAdditionalFormats(const QTextBlock& block, const QList<QTextLayout::FormatRange> &formats); void configureFormat(TextFormatId id, const QTextCharFormat &format); virtual void setTabSize(int tabSize); public: SyntaxComment comment() const; void setupComment(const SyntaxComment &comment); signals: void foldIndentChanged(QTextBlock block); public Q_SLOTS: void rehighlight(); void rehighlightBlock(const QTextBlock &block); protected: virtual void highlightBlock(const QString &text) = 0; void setFormat(int start, int count, const QTextCharFormat &format, int id = 0); //void setFormat(int start, int count, const QColor &color); //void setFormat(int start, int count, const QFont &font); QTextCharFormat format(int pos) const; void applyFormatToSpaces(const QString &text, const QTextCharFormat &format); int previousBlockState() const; int currentBlockState() const; void setCurrentBlockState(int newState); void setCurrentBlockUserData(QTextBlockUserData *data); QTextBlockUserData *currentBlockUserData() const; QTextBlock currentBlock() const; QMap<QString,QString> m_contextMap; protected: struct KateFormatMap { KateFormatMap(); QHash<QString, TextFormatId> m_ids; }; static const KateFormatMap m_kateFormats; QTextCharFormat m_creatorFormats[TextFormatId_MAX]; private: Q_DISABLE_COPY(SyntaxHighlighter) Q_PRIVATE_SLOT(d_ptr, void _q_reformatBlocks(int from, int charsRemoved, int charsAdded)) Q_PRIVATE_SLOT(d_ptr, void _q_delayedRehighlight()) QScopedPointer<SyntaxHighlighterPrivate> d_ptr; }; } // namespace TextEditor #endif // TEXTEDITOR_SYNTAXHIGHLIGHTER_H
5,139
C++
.h
154
29.201299
108
0.715811
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,673
katehighlighter.h
visualfc_liteide/liteidex/src/3rdparty/qtc_texteditor/katehighlighter.h
#ifndef KATEHIGHLIGHTER_H #define KATEHIGHLIGHTER_H #include "texteditor_global.h" #include <QObject> #include <QTextDocument> #include <QSharedPointer> #include <QFileInfo> #include "syntaxhighlighter.h" #include "colorscheme.h" class ColorStyleScheme; class TEXTEDITOR_EXPORT KateHighlighter : public QObject { Q_OBJECT public: explicit KateHighlighter(QObject *parent = 0); public: void loadPath(const QString &definitionsPaths); QStringList mimeTypes() const; QStringList mimeTypePatterns(const QString &mimeType) const; QString mimeTypeName(const QString &mimeType) const; TextEditor::SyntaxHighlighter *create(QTextDocument *doc, const QString &mimeType); QTextCharFormat toTextCharFormat(const QString &name); }; #endif // KATEHIGHLIGHTER_H
784
C++
.h
24
30.166667
87
0.80291
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,674
texteditor_global.h
visualfc_liteide/liteidex/src/3rdparty/qtc_texteditor/texteditor_global.h
#ifndef TEXTEDITOR_GLOBAL_H #define TEXTEDITOR_GLOBAL_H #include <QtCore/qglobal.h> #define TEXTEDITOR_EXPORT /* #if defined(TEXTEDITOR_LIBRARY) # define TEXTEDITOR_EXPORT Q_DECL_EXPORT #else # define TEXTEDITOR_EXPORT Q_DECL_IMPORT #endif */ #endif // TEXTEDITOR_GLOBAL_H
277
C++
.h
12
21.916667
41
0.806084
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,678
basetextblockselection.h
visualfc_liteide/liteidex/src/3rdparty/qtc_texteditor/basetextblockselection.h
#ifndef BASETEXTBLOCKSELECTION_H /**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ****************************************************************************/ #define BASETEXTBLOCKSELECTION_H #include "qtc_texteditor/tabsettings.h" #include <QTextBlock> #include <QTextCursor> namespace TextEditor { class BaseTextBlockSelection { public: BaseTextBlockSelection(); bool isValid() const{ return !firstBlock.isNull() && !lastBlock.isNull(); } void clear() { firstBlock = lastBlock = QTextCursor(); } void moveAnchor(int blockNumber, int visualColumn); int position(const TabSettings &ts) const; inline int anchorColumnNumber() const { return (anchor % 2) ? lastVisualColumn : firstVisualColumn; } inline int anchorBlockNumber() const { return (anchor <= TopRight ? firstBlock.blockNumber() : lastBlock.blockNumber()); } QTextCursor selection(const TabSettings &ts) const; void fromSelection(const TabSettings &ts, const QTextCursor &selection); public: QTextCursor firstBlock; // defines the first block QTextCursor lastBlock; // defines the last block int firstVisualColumn; // defines the first visual column of the selection int lastVisualColumn; // defines the last visual column of the selection enum Anchor {TopLeft = 0, TopRight, BottomLeft, BottomRight} anchor; }; } //namespace TextEditor #endif // BASETEXTBLOCKSELECTION_H
2,728
C++
.h
56
46.464286
105
0.724681
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,682
manager2.h
visualfc_liteide/liteidex/src/3rdparty/qtc_texteditor/generichighlighter/manager2.h
/************************************************************************** ** ** This file is part of Qt Creator ** ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** No Commercial Usage ** ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. ** ** GNU Lesser General Public License Usage ** ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. ** **************************************************************************/ #ifndef MANAGER2_H #define MANAGER2_H #include "highlightdefinitionmetadata.h" #include "highlightdefinition.h" #include <QtCore/QString> #include <QtCore/QHash> #include <QtCore/QSet> #include <QtCore/QUrl> #include <QtCore/QList> #include <QtCore/QSharedPointer> #include <QtCore/QFutureWatcher> QT_BEGIN_NAMESPACE class QFileInfo; class QStringList; class QIODevice; template <class> class QFutureInterface; template <class> class QSharedPointer; QT_END_NAMESPACE namespace TextEditor { namespace Internal { // This is the generic highlighter manager. It is not thread-safe. class Manager2 : public QObject { Q_OBJECT public: static Manager2 *instance(); void loadPath(const QStringList &definitionsPaths); public: QSharedPointer<HighlightDefinitionMetaData> parseMetadata(const QFileInfo &fileInfo); QString definitionIdByName(const QString &name) const; QString definitionIdByMimeType(const QString &mimeType) const; QString definitionIdByAnyMimeType(const QStringList &mimeTypes) const; QSharedPointer<HighlightDefinition> definition(const QString &id); QSharedPointer<HighlightDefinitionMetaData> definitionMetaData(const QString &id) const; bool isBuildingDefinition(const QString &id) const; public: QStringList mimeTypes() const; protected: QHash<QString, QString> m_idByName; QHash<QString, QString> m_idByMimeType; QHash<QString, QSharedPointer<TextEditor::Internal::HighlightDefinition> > m_definitions; QHash<QString, QSharedPointer<TextEditor::Internal::HighlightDefinitionMetaData> > m_definitionsMetaData; QSet<QString> m_isBuilding; }; } // namespace Internal } // namespace TextEditor #endif // MANAGER2_H
3,076
C++
.h
79
37
109
0.752595
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,689
context.h
visualfc_liteide/liteidex/src/3rdparty/qtc_texteditor/generichighlighter/context.h
/************************************************************************** ** ** This file is part of Qt Creator ** ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** No Commercial Usage ** ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. ** ** GNU Lesser General Public License Usage ** ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. ** **************************************************************************/ #ifndef CONTEXT_H #define CONTEXT_H #include "includerulesinstruction.h" #include "reuse.h" #include "dynamicrule.h" #include "highlightdefinition.h" #include <QtCore/QString> #include <QtCore/QList> #include <QtCore/QSharedPointer> namespace TextEditor { namespace Internal { class Context { public: Context(); Context(const Context &context); ~Context(); const Context &operator=(Context copy) { swap(copy); return *this; } void swap(Context &context) { qSwap(m_id, context.m_id); qSwap(m_name, context.m_name); qSwap(m_lineBeginContext, context.m_lineBeginContext); qSwap(m_lineEndContext, context.m_lineEndContext); qSwap(m_fallthroughContext, context.m_fallthroughContext); qSwap(m_itemData, context.m_itemData); qSwap(m_fallthrough, context.m_fallthrough); qSwap(m_dynamic, context.m_dynamic); qSwap(m_rules, context.m_rules); qSwap(m_instructions, context.m_instructions); qSwap(m_definition, context.m_definition); } void configureId(const int unique) { m_id.append(QString::number(unique)); } const QString &id() const { return m_id; } void setName(const QString &name) { m_name = name; m_id = name; } const QString &name() const { return m_name; } void setLineBeginContext(const QString &context) { m_lineBeginContext = context; } const QString &lineBeginContext() const { return m_lineBeginContext; } void setLineEndContext(const QString &context) { m_lineEndContext = context; } const QString &lineEndContext() const { return m_lineEndContext; } void setFallthroughContext(const QString &context) { m_fallthroughContext = context; } const QString &fallthroughContext() const { return m_fallthroughContext; } void setItemData(const QString &itemData) { m_itemData = itemData; } const QString &itemData() const { return m_itemData; } void setFallthrough(const QString &fallthrough) { m_fallthrough = toBool(fallthrough); } bool isFallthrough() const { return m_fallthrough; } void setDynamic(const QString &dynamic) { m_dynamic = toBool(dynamic); } bool isDynamic() const { return m_dynamic; } void updateDynamicRules(const QStringList &captures) const { TextEditor::Internal::updateDynamicRules(m_rules, captures); } void addRule(const QSharedPointer<Rule> &rule) { m_rules.append(rule); } void addRule(const QSharedPointer<Rule> &rule, int index) { m_rules.insert(index, rule); } const QList<QSharedPointer<Rule> > & rules() const { return m_rules; } void addIncludeRulesInstruction(const IncludeRulesInstruction &instruction) { m_instructions.append(instruction); } const QList<IncludeRulesInstruction> &includeRulesInstructions() const { return m_instructions; } void clearIncludeRulesInstructions() { m_instructions.clear(); } void setDefinition(const QSharedPointer<HighlightDefinition> &definition) { m_definition = definition; } const QSharedPointer<HighlightDefinition> &definition() const { return m_definition; } protected: QString m_id; QString m_name; QString m_lineBeginContext; QString m_lineEndContext; QString m_fallthroughContext; QString m_itemData; bool m_fallthrough; bool m_dynamic; QList<QSharedPointer<Rule> > m_rules; QList<IncludeRulesInstruction> m_instructions; QSharedPointer<HighlightDefinition> m_definition; }; } // namespace Internal } // namespace TextEditor #endif // CONTEXT_H
5,051
C++
.h
139
32.093525
79
0.701046
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,693
manager.h
visualfc_liteide/liteidex/src/3rdparty/qtc_texteditor/generichighlighter/manager.h
/************************************************************************** ** ** This file is part of Qt Creator ** ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** No Commercial Usage ** ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. ** ** GNU Lesser General Public License Usage ** ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. ** **************************************************************************/ #ifndef MANAGER_H #define MANAGER_H #include "highlightdefinitionmetadata.h" #include <QtCore/QString> #include <QtCore/QHash> #include <QtCore/QSet> #include <QtCore/QUrl> #include <QtCore/QList> #include <QtCore/QSharedPointer> #include <QtCore/QFutureWatcher> //#include <QtNetwork/QNetworkAccessManager> QT_BEGIN_NAMESPACE class QFileInfo; class QStringList; class QIODevice; template <class> class QFutureInterface; template <class> class QSharedPointer; QT_END_NAMESPACE namespace TextEditor { namespace Internal { class HighlightDefinition; class DefinitionDownloader; // This is the generic highlighter manager. It is not thread-safe. class Manager : public QObject { Q_OBJECT public: virtual ~Manager(); static Manager *instance(); QString definitionIdByName(const QString &name) const; QString definitionIdByMimeType(const QString &mimeType) const; QString definitionIdByAnyMimeType(const QStringList &mimeTypes) const; bool isBuildingDefinition(const QString &id) const; QSharedPointer<HighlightDefinition> definition(const QString &id); QSharedPointer<HighlightDefinitionMetaData> definitionMetaData(const QString &id) const; void downloadAvailableDefinitionsMetaData(); void downloadDefinitions(const QList<QUrl> &urls, const QString &savePath); bool isDownloadingDefinitions() const; static QSharedPointer<HighlightDefinitionMetaData> parseMetadata(const QFileInfo &fileInfo); void loadFromPath(const QStringList & definitionsPaths); public slots: void registerMimeTypes(); private slots: void registerMimeType(int index) const; void registerMimeTypesFinished(); void downloadAvailableDefinitionsListFinished(); void downloadDefinitionsFinished(); signals: void mimeTypesRegistered(); private: Manager(); Q_DISABLE_COPY(Manager) // void gatherDefinitionsMimeTypes(QFutureInterface<Core::MimeType> &future); QList<HighlightDefinitionMetaData> parseAvailableDefinitionsList(QIODevice *device) const; void clear(); bool m_downloadingDefinitions; bool m_registeringMimeTypes; int m_queuedMimeTypeRegistrations; QHash<QString, QString> m_idByName; QHash<QString, QString> m_idByMimeType; QHash<QString, QSharedPointer<HighlightDefinition> > m_definitions; QHash<QString, QSharedPointer<HighlightDefinitionMetaData> > m_definitionsMetaData; QSet<QString> m_isBuilding; //QList<DefinitionDownloader *> m_downloaders; //QNetworkAccessManager m_networkManager; QFutureWatcher<void> m_downloadWatcher; //QFutureWatcher<Core::MimeType> m_mimeTypeWatcher; struct PriorityComp { bool operator()(const QSharedPointer<HighlightDefinitionMetaData> &a, const QSharedPointer<HighlightDefinitionMetaData> &b) { return a->priority() > b->priority(); } }; signals: void definitionsMetaDataReady(const QList<Internal::HighlightDefinitionMetaData>&); void errorDownloadingDefinitionsMetaData(); }; } // namespace Internal } // namespace TextEditor #endif // MANAGER_H
4,479
C++
.h
113
36.513274
96
0.754261
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,705
person.h
visualfc_liteide/liteidex/src/3rdparty/qjson/tests/qobjecthelper/person.h
/* This file is part of qjson * * Copyright (C) 2009 Till Adam <adam@kde.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1, as published by the Free Software Foundation. * * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef PERSON_H #define PERSON_H #include <QtCore/QDate> #include <QtCore/QObject> #include <QtCore/QVariant> class Person : public QObject { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName) Q_PROPERTY(int phoneNumber READ phoneNumber WRITE setPhoneNumber) Q_PROPERTY(Gender gender READ gender WRITE setGender) Q_PROPERTY(QDate dob READ dob WRITE setDob) Q_PROPERTY(QVariant customField READ customField WRITE setCustomField) Q_ENUMS(Gender) public: Person(QObject* parent = 0); ~Person(); QString name() const; void setName(const QString& name); int phoneNumber() const; void setPhoneNumber(const int phoneNumber); enum Gender {Male, Female}; void setGender(Gender gender); Gender gender() const; QDate dob() const; void setDob(const QDate& dob); QVariant customField() const; void setCustomField(const QVariant& customField); private: QString m_name; int m_phoneNumber; Gender m_gender; QDate m_dob; QVariant m_customField; }; #endif
1,864
C++
.h
55
30.381818
76
0.740679
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
21,707
qjson_debug.h
visualfc_liteide/liteidex/src/3rdparty/qjson/src/qjson_debug.h
/* This file is part of qjson * * Copyright (C) 2009 Michael Leupold <lemma@confuego.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1, as published by the Free Software Foundation. * * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef QJSON_DEBUG_H #define QJSON_DEBUG_H #include <QtCore/QDebug> // define qjsonDebug() #ifdef QJSON_VERBOSE_DEBUG_OUTPUT inline QDebug qjsonDebug() { return QDebug(QtDebugMsg); } #else inline QNoDebug qjsonDebug() { return QNoDebug(); } #endif #endif
1,092
C++
.h
29
35.103448
76
0.74882
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
true
true
false
false
false
false
false
false
21,708
qjson_export.h
visualfc_liteide/liteidex/src/3rdparty/qjson/src/qjson_export.h
/* This file is part of the KDE project Copyright (C) 2009 Pino Toscano <pino@kde.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1, as published by the Free Software Foundation. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef QJSON_EXPORT_H #define QJSON_EXPORT_H #include <QtCore/qglobal.h> #define QJSON_EXPORT #ifndef QJSON_EXPORT # if defined(QJSON_MAKEDLL) /* We are building this library */ # define QJSON_EXPORT Q_DECL_EXPORT # else /* We are using this library */ # define QJSON_EXPORT Q_DECL_IMPORT # endif #endif #endif
1,140
C++
.h
28
37.321429
76
0.756142
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,720
libcmark.h
visualfc_liteide/liteidex/src/3rdparty/cmark/libcmark.h
#ifndef LIBCMARK_H #define LIBCMARK_H #include <QByteArray> namespace cmark { QByteArray markdown_to_html(const QByteArray &data); } inline QByteArray md2html(const QByteArray &data) { return cmark::markdown_to_html(data); } #endif // LIBCMARK_H
257
C++
.h
10
23.7
52
0.784232
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,721
cmark_version.h
visualfc_liteide/liteidex/src/3rdparty/cmark/cmark_version.h
#ifndef CMARK_VERSION_H #define CMARK_VERSION_H #define CMARK_VERSION ((0 << 16) | (29 << 8) | 0) #define CMARK_VERSION_STRING "0.29.0" #endif
146
C++
.h
5
27.8
50
0.690647
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,722
config.h
visualfc_liteide/liteidex/src/3rdparty/cmark/config.h
#ifndef CMARK_CONFIG_H #define CMARK_CONFIG_H #ifdef __cplusplus extern "C" { #endif #define HAVE_STDBOOL_H #ifdef HAVE_STDBOOL_H #include <stdbool.h> #elif !defined(__cplusplus) typedef char bool; #endif #ifndef _MSC_VER #define HAVE___BUILTIN_EXPECT #endif #define HAVE___ATTRIBUTE__ #ifdef HAVE___ATTRIBUTE__ #define CMARK_ATTRIBUTE(list) __attribute__ (list) #else #define CMARK_ATTRIBUTE(list) #endif #ifndef CMARK_INLINE #if defined(_MSC_VER) && !defined(__cplusplus) #define CMARK_INLINE __inline #else #define CMARK_INLINE inline #endif #endif /* snprintf and vsnprintf fallbacks for MSVC before 2015, due to Valentin Milea http://stackoverflow.com/questions/2915672/ */ #if defined(_MSC_VER) && _MSC_VER < 1900 #include <stdio.h> #include <stdarg.h> #define snprintf c99_snprintf #define vsnprintf c99_vsnprintf CMARK_INLINE int c99_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap) { int count = -1; if (size != 0) count = _vsnprintf_s(outBuf, size, _TRUNCATE, format, ap); if (count == -1) count = _vscprintf(format, ap); return count; } CMARK_INLINE int c99_snprintf(char *outBuf, size_t size, const char *format, ...) { int count; va_list ap; va_start(ap, format); count = c99_vsnprintf(outBuf, size, format, ap); va_end(ap); return count; } #endif #ifdef __cplusplus } #endif #endif
1,417
C++
.h
58
21.689655
89
0.708738
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,723
parser.h
visualfc_liteide/liteidex/src/3rdparty/cmark/src/parser.h
#ifndef CMARK_AST_H #define CMARK_AST_H #include <stdio.h> #include "references.h" #include "node.h" #include "buffer.h" #ifdef __cplusplus extern "C" { #endif #define MAX_LINK_LABEL_LENGTH 1000 struct cmark_parser { struct cmark_mem *mem; struct cmark_reference_map *refmap; struct cmark_node *root; struct cmark_node *current; int line_number; bufsize_t offset; bufsize_t column; bufsize_t first_nonspace; bufsize_t first_nonspace_column; bufsize_t thematic_break_kill_pos; int indent; bool blank; bool partially_consumed_tab; cmark_strbuf curline; bufsize_t last_line_length; cmark_strbuf linebuf; int options; bool last_buffer_ended_with_cr; }; #ifdef __cplusplus } #endif #endif
726
C++
.h
34
19.117647
37
0.759475
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
21,724
utf8.h
visualfc_liteide/liteidex/src/3rdparty/cmark/src/utf8.h
#ifndef CMARK_UTF8_H #define CMARK_UTF8_H #include <stdint.h> #include "buffer.h" #ifdef __cplusplus extern "C" { #endif void cmark_utf8proc_case_fold(cmark_strbuf *dest, const uint8_t *str, bufsize_t len); void cmark_utf8proc_encode_char(int32_t uc, cmark_strbuf *buf); int cmark_utf8proc_iterate(const uint8_t *str, bufsize_t str_len, int32_t *dst); void cmark_utf8proc_check(cmark_strbuf *dest, const uint8_t *line, bufsize_t size); int cmark_utf8proc_is_space(int32_t uc); int cmark_utf8proc_is_punctuation(int32_t uc); #ifdef __cplusplus } #endif #endif
620
C++
.h
19
28.421053
80
0.697987
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
21,725
houdini.h
visualfc_liteide/liteidex/src/3rdparty/cmark/src/houdini.h
#ifndef CMARK_HOUDINI_H #define CMARK_HOUDINI_H #ifdef __cplusplus extern "C" { #endif #include <stdint.h> #include "config.h" #include "buffer.h" #ifdef HAVE___BUILTIN_EXPECT #define likely(x) __builtin_expect((x), 1) #define unlikely(x) __builtin_expect((x), 0) #else #define likely(x) (x) #define unlikely(x) (x) #endif #ifdef HOUDINI_USE_LOCALE #define _isxdigit(c) isxdigit(c) #define _isdigit(c) isdigit(c) #else /* * Helper _isdigit methods -- do not trust the current locale * */ #define _isxdigit(c) (strchr("0123456789ABCDEFabcdef", (c)) != NULL) #define _isdigit(c) ((c) >= '0' && (c) <= '9') #endif #define HOUDINI_ESCAPED_SIZE(x) (((x)*12) / 10) #define HOUDINI_UNESCAPED_SIZE(x) (x) extern bufsize_t houdini_unescape_ent(cmark_strbuf *ob, const uint8_t *src, bufsize_t size); extern int houdini_escape_html(cmark_strbuf *ob, const uint8_t *src, bufsize_t size); extern int houdini_escape_html0(cmark_strbuf *ob, const uint8_t *src, bufsize_t size, int secure); extern int houdini_unescape_html(cmark_strbuf *ob, const uint8_t *src, bufsize_t size); extern void houdini_unescape_html_f(cmark_strbuf *ob, const uint8_t *src, bufsize_t size); extern int houdini_escape_href(cmark_strbuf *ob, const uint8_t *src, bufsize_t size); #ifdef __cplusplus } #endif #endif
1,486
C++
.h
43
28.651163
75
0.632056
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
21,726
iterator.h
visualfc_liteide/liteidex/src/3rdparty/cmark/src/iterator.h
#ifndef CMARK_ITERATOR_H #define CMARK_ITERATOR_H #ifdef __cplusplus extern "C" { #endif #include "cmark.h" typedef struct { cmark_event_type ev_type; cmark_node *node; } cmark_iter_state; struct cmark_iter { cmark_mem *mem; cmark_node *root; cmark_iter_state cur; cmark_iter_state next; }; #ifdef __cplusplus } #endif #endif
344
C++
.h
20
15.3
27
0.745283
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
21,727
render.h
visualfc_liteide/liteidex/src/3rdparty/cmark/src/render.h
#ifndef CMARK_RENDER_H #define CMARK_RENDER_H #ifdef __cplusplus extern "C" { #endif #include <stdlib.h> #include "buffer.h" #include "chunk.h" typedef enum { LITERAL, NORMAL, TITLE, URL } cmark_escaping; struct cmark_renderer { cmark_mem *mem; cmark_strbuf *buffer; cmark_strbuf *prefix; int column; int width; int need_cr; bufsize_t last_breakable; bool begin_line; bool begin_content; bool no_linebreaks; bool in_tight_list_item; void (*outc)(struct cmark_renderer *, cmark_escaping, int32_t, unsigned char); void (*cr)(struct cmark_renderer *); void (*blankline)(struct cmark_renderer *); void (*out)(struct cmark_renderer *, const char *, bool, cmark_escaping); }; typedef struct cmark_renderer cmark_renderer; void cmark_render_ascii(cmark_renderer *renderer, const char *s); void cmark_render_code_point(cmark_renderer *renderer, uint32_t c); char *cmark_render(cmark_node *root, int options, int width, void (*outc)(cmark_renderer *, cmark_escaping, int32_t, unsigned char), int (*render_node)(cmark_renderer *renderer, cmark_node *node, cmark_event_type ev_type, int options)); #ifdef __cplusplus } #endif #endif
1,308
C++
.h
39
27.769231
80
0.660842
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
21,728
buffer.h
visualfc_liteide/liteidex/src/3rdparty/cmark/src/buffer.h
#ifndef CMARK_BUFFER_H #define CMARK_BUFFER_H #include <stddef.h> #include <stdarg.h> #include <string.h> #include <limits.h> #include <stdint.h> #include "config.h" #include "cmark.h" #ifdef __cplusplus extern "C" { #endif typedef int32_t bufsize_t; typedef struct { cmark_mem *mem; unsigned char *ptr; bufsize_t asize, size; } cmark_strbuf; extern unsigned char cmark_strbuf__initbuf[]; #define CMARK_BUF_INIT(mem) \ { mem, cmark_strbuf__initbuf, 0, 0 } /** * Initialize a cmark_strbuf structure. * * For the cases where CMARK_BUF_INIT cannot be used to do static * initialization. */ void cmark_strbuf_init(cmark_mem *mem, cmark_strbuf *buf, bufsize_t initial_size); /** * Grow the buffer to hold at least `target_size` bytes. */ void cmark_strbuf_grow(cmark_strbuf *buf, bufsize_t target_size); void cmark_strbuf_free(cmark_strbuf *buf); void cmark_strbuf_swap(cmark_strbuf *buf_a, cmark_strbuf *buf_b); bufsize_t cmark_strbuf_len(const cmark_strbuf *buf); int cmark_strbuf_cmp(const cmark_strbuf *a, const cmark_strbuf *b); unsigned char *cmark_strbuf_detach(cmark_strbuf *buf); void cmark_strbuf_copy_cstr(char *data, bufsize_t datasize, const cmark_strbuf *buf); static CMARK_INLINE const char *cmark_strbuf_cstr(const cmark_strbuf *buf) { return (char *)buf->ptr; } #define cmark_strbuf_at(buf, n) ((buf)->ptr[n]) void cmark_strbuf_set(cmark_strbuf *buf, const unsigned char *data, bufsize_t len); void cmark_strbuf_sets(cmark_strbuf *buf, const char *string); void cmark_strbuf_putc(cmark_strbuf *buf, int c); void cmark_strbuf_put(cmark_strbuf *buf, const unsigned char *data, bufsize_t len); void cmark_strbuf_puts(cmark_strbuf *buf, const char *string); void cmark_strbuf_clear(cmark_strbuf *buf); bufsize_t cmark_strbuf_strchr(const cmark_strbuf *buf, int c, bufsize_t pos); bufsize_t cmark_strbuf_strrchr(const cmark_strbuf *buf, int c, bufsize_t pos); void cmark_strbuf_drop(cmark_strbuf *buf, bufsize_t n); void cmark_strbuf_truncate(cmark_strbuf *buf, bufsize_t len); void cmark_strbuf_rtrim(cmark_strbuf *buf); void cmark_strbuf_trim(cmark_strbuf *buf); void cmark_strbuf_normalize_whitespace(cmark_strbuf *s); void cmark_strbuf_unescape(cmark_strbuf *s); #ifdef __cplusplus } #endif #endif
2,390
C++
.h
64
34.3125
80
0.711438
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
true
true
false
false
false
false
false
false
21,729
node.h
visualfc_liteide/liteidex/src/3rdparty/cmark/src/node.h
#ifndef CMARK_NODE_H #define CMARK_NODE_H #ifdef __cplusplus extern "C" { #endif #include <stdio.h> #include <stdint.h> #include "cmark.h" #include "buffer.h" #include "chunk.h" typedef struct { cmark_list_type list_type; int marker_offset; int padding; int start; cmark_delim_type delimiter; unsigned char bullet_char; bool tight; } cmark_list; typedef struct { cmark_chunk info; cmark_chunk literal; uint8_t fence_length; uint8_t fence_offset; unsigned char fence_char; int8_t fenced; } cmark_code; typedef struct { int level; bool setext; } cmark_heading; typedef struct { cmark_chunk url; cmark_chunk title; } cmark_link; typedef struct { cmark_chunk on_enter; cmark_chunk on_exit; } cmark_custom; enum cmark_node__internal_flags { CMARK_NODE__OPEN = (1 << 0), CMARK_NODE__LAST_LINE_BLANK = (1 << 1), CMARK_NODE__LAST_LINE_CHECKED = (1 << 2), }; struct cmark_node { cmark_strbuf content; struct cmark_node *next; struct cmark_node *prev; struct cmark_node *parent; struct cmark_node *first_child; struct cmark_node *last_child; void *user_data; int start_line; int start_column; int end_line; int end_column; int internal_offset; uint16_t type; uint16_t flags; union { cmark_chunk literal; cmark_list list; cmark_code code; cmark_heading heading; cmark_link link; cmark_custom custom; int html_block_type; } as; }; static CMARK_INLINE cmark_mem *cmark_node_mem(cmark_node *node) { return node->content.mem; } CMARK_EXPORT int cmark_node_check(cmark_node *node, FILE *out); #ifdef __cplusplus } #endif #endif
1,635
C++
.h
77
18.636364
65
0.722258
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
21,730
references.h
visualfc_liteide/liteidex/src/3rdparty/cmark/src/references.h
#ifndef CMARK_REFERENCES_H #define CMARK_REFERENCES_H #include "chunk.h" #ifdef __cplusplus extern "C" { #endif #define REFMAP_SIZE 16 struct cmark_reference { struct cmark_reference *next; unsigned char *label; cmark_chunk url; cmark_chunk title; unsigned int hash; }; typedef struct cmark_reference cmark_reference; struct cmark_reference_map { cmark_mem *mem; cmark_reference *table[REFMAP_SIZE]; }; typedef struct cmark_reference_map cmark_reference_map; cmark_reference_map *cmark_reference_map_new(cmark_mem *mem); void cmark_reference_map_free(cmark_reference_map *map); cmark_reference *cmark_reference_lookup(cmark_reference_map *map, cmark_chunk *label); extern void cmark_reference_create(cmark_reference_map *map, cmark_chunk *label, cmark_chunk *url, cmark_chunk *title); #ifdef __cplusplus } #endif #endif
919
C++
.h
30
26.333333
80
0.722412
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
21,731
cmark_ctype.h
visualfc_liteide/liteidex/src/3rdparty/cmark/src/cmark_ctype.h
#ifndef CMARK_CMARK_CTYPE_H #define CMARK_CMARK_CTYPE_H #ifdef __cplusplus extern "C" { #endif /** Locale-independent versions of functions from ctype.h. * We want cmark to behave the same no matter what the system locale. */ int cmark_isspace(char c); int cmark_ispunct(char c); int cmark_isalnum(char c); int cmark_isdigit(char c); int cmark_isalpha(char c); #ifdef __cplusplus } #endif #endif
407
C++
.h
17
22.294118
69
0.769029
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
true
true
false
false
false
false
false
false
21,732
cmark.h
visualfc_liteide/liteidex/src/3rdparty/cmark/src/cmark.h
#ifndef CMARK_H #define CMARK_H #include <stdio.h> #include <cmark_export.h> #include <cmark_version.h> #ifdef __cplusplus extern "C" { #endif /** # NAME * * **cmark** - CommonMark parsing, manipulating, and rendering */ /** # DESCRIPTION * * ## Simple Interface */ /** Convert 'text' (assumed to be a UTF-8 encoded string with length * 'len') from CommonMark Markdown to HTML, returning a null-terminated, * UTF-8-encoded string. It is the caller's responsibility * to free the returned buffer. */ CMARK_EXPORT char *cmark_markdown_to_html(const char *text, size_t len, int options); /** ## Node Structure */ typedef enum { /* Error status */ CMARK_NODE_NONE, /* Block */ CMARK_NODE_DOCUMENT, CMARK_NODE_BLOCK_QUOTE, CMARK_NODE_LIST, CMARK_NODE_ITEM, CMARK_NODE_CODE_BLOCK, CMARK_NODE_HTML_BLOCK, CMARK_NODE_CUSTOM_BLOCK, CMARK_NODE_PARAGRAPH, CMARK_NODE_HEADING, CMARK_NODE_THEMATIC_BREAK, CMARK_NODE_FIRST_BLOCK = CMARK_NODE_DOCUMENT, CMARK_NODE_LAST_BLOCK = CMARK_NODE_THEMATIC_BREAK, /* Inline */ CMARK_NODE_TEXT, CMARK_NODE_SOFTBREAK, CMARK_NODE_LINEBREAK, CMARK_NODE_CODE, CMARK_NODE_HTML_INLINE, CMARK_NODE_CUSTOM_INLINE, CMARK_NODE_EMPH, CMARK_NODE_STRONG, CMARK_NODE_LINK, CMARK_NODE_IMAGE, CMARK_NODE_FIRST_INLINE = CMARK_NODE_TEXT, CMARK_NODE_LAST_INLINE = CMARK_NODE_IMAGE, } cmark_node_type; /* For backwards compatibility: */ #define CMARK_NODE_HEADER CMARK_NODE_HEADING #define CMARK_NODE_HRULE CMARK_NODE_THEMATIC_BREAK #define CMARK_NODE_HTML CMARK_NODE_HTML_BLOCK #define CMARK_NODE_INLINE_HTML CMARK_NODE_HTML_INLINE typedef enum { CMARK_NO_LIST, CMARK_BULLET_LIST, CMARK_ORDERED_LIST } cmark_list_type; typedef enum { CMARK_NO_DELIM, CMARK_PERIOD_DELIM, CMARK_PAREN_DELIM } cmark_delim_type; typedef struct cmark_node cmark_node; typedef struct cmark_parser cmark_parser; typedef struct cmark_iter cmark_iter; /** * ## Custom memory allocator support */ /** Defines the memory allocation functions to be used by CMark * when parsing and allocating a document tree */ typedef struct cmark_mem { void *(*calloc)(size_t, size_t); void *(*realloc)(void *, size_t); void (*free)(void *); } cmark_mem; /** * ## Creating and Destroying Nodes */ /** Creates a new node of type 'type'. Note that the node may have * other required properties, which it is the caller's responsibility * to assign. */ CMARK_EXPORT cmark_node *cmark_node_new(cmark_node_type type); /** Same as `cmark_node_new`, but explicitly listing the memory * allocator used to allocate the node. Note: be sure to use the same * allocator for every node in a tree, or bad things can happen. */ CMARK_EXPORT cmark_node *cmark_node_new_with_mem(cmark_node_type type, cmark_mem *mem); /** Frees the memory allocated for a node and any children. */ CMARK_EXPORT void cmark_node_free(cmark_node *node); /** * ## Tree Traversal */ /** Returns the next node in the sequence after 'node', or NULL if * there is none. */ CMARK_EXPORT cmark_node *cmark_node_next(cmark_node *node); /** Returns the previous node in the sequence after 'node', or NULL if * there is none. */ CMARK_EXPORT cmark_node *cmark_node_previous(cmark_node *node); /** Returns the parent of 'node', or NULL if there is none. */ CMARK_EXPORT cmark_node *cmark_node_parent(cmark_node *node); /** Returns the first child of 'node', or NULL if 'node' has no children. */ CMARK_EXPORT cmark_node *cmark_node_first_child(cmark_node *node); /** Returns the last child of 'node', or NULL if 'node' has no children. */ CMARK_EXPORT cmark_node *cmark_node_last_child(cmark_node *node); /** * ## Iterator * * An iterator will walk through a tree of nodes, starting from a root * node, returning one node at a time, together with information about * whether the node is being entered or exited. The iterator will * first descend to a child node, if there is one. When there is no * child, the iterator will go to the next sibling. When there is no * next sibling, the iterator will return to the parent (but with * a 'cmark_event_type' of `CMARK_EVENT_EXIT`). The iterator will * return `CMARK_EVENT_DONE` when it reaches the root node again. * One natural application is an HTML renderer, where an `ENTER` event * outputs an open tag and an `EXIT` event outputs a close tag. * An iterator might also be used to transform an AST in some systematic * way, for example, turning all level-3 headings into regular paragraphs. * * void * usage_example(cmark_node *root) { * cmark_event_type ev_type; * cmark_iter *iter = cmark_iter_new(root); * * while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) { * cmark_node *cur = cmark_iter_get_node(iter); * // Do something with `cur` and `ev_type` * } * * cmark_iter_free(iter); * } * * Iterators will never return `EXIT` events for leaf nodes, which are nodes * of type: * * * CMARK_NODE_HTML_BLOCK * * CMARK_NODE_THEMATIC_BREAK * * CMARK_NODE_CODE_BLOCK * * CMARK_NODE_TEXT * * CMARK_NODE_SOFTBREAK * * CMARK_NODE_LINEBREAK * * CMARK_NODE_CODE * * CMARK_NODE_HTML_INLINE * * Nodes must only be modified after an `EXIT` event, or an `ENTER` event for * leaf nodes. */ typedef enum { CMARK_EVENT_NONE, CMARK_EVENT_DONE, CMARK_EVENT_ENTER, CMARK_EVENT_EXIT } cmark_event_type; /** Creates a new iterator starting at 'root'. The current node and event * type are undefined until 'cmark_iter_next' is called for the first time. * The memory allocated for the iterator should be released using * 'cmark_iter_free' when it is no longer needed. */ CMARK_EXPORT cmark_iter *cmark_iter_new(cmark_node *root); /** Frees the memory allocated for an iterator. */ CMARK_EXPORT void cmark_iter_free(cmark_iter *iter); /** Advances to the next node and returns the event type (`CMARK_EVENT_ENTER`, * `CMARK_EVENT_EXIT` or `CMARK_EVENT_DONE`). */ CMARK_EXPORT cmark_event_type cmark_iter_next(cmark_iter *iter); /** Returns the current node. */ CMARK_EXPORT cmark_node *cmark_iter_get_node(cmark_iter *iter); /** Returns the current event type. */ CMARK_EXPORT cmark_event_type cmark_iter_get_event_type(cmark_iter *iter); /** Returns the root node. */ CMARK_EXPORT cmark_node *cmark_iter_get_root(cmark_iter *iter); /** Resets the iterator so that the current node is 'current' and * the event type is 'event_type'. The new current node must be a * descendant of the root node or the root node itself. */ CMARK_EXPORT void cmark_iter_reset(cmark_iter *iter, cmark_node *current, cmark_event_type event_type); /** * ## Accessors */ /** Returns the user data of 'node'. */ CMARK_EXPORT void *cmark_node_get_user_data(cmark_node *node); /** Sets arbitrary user data for 'node'. Returns 1 on success, * 0 on failure. */ CMARK_EXPORT int cmark_node_set_user_data(cmark_node *node, void *user_data); /** Returns the type of 'node', or `CMARK_NODE_NONE` on error. */ CMARK_EXPORT cmark_node_type cmark_node_get_type(cmark_node *node); /** Like 'cmark_node_get_type', but returns a string representation of the type, or `"<unknown>"`. */ CMARK_EXPORT const char *cmark_node_get_type_string(cmark_node *node); /** Returns the string contents of 'node', or an empty string if none is set. Returns NULL if called on a node that does not have string content. */ CMARK_EXPORT const char *cmark_node_get_literal(cmark_node *node); /** Sets the string contents of 'node'. Returns 1 on success, * 0 on failure. */ CMARK_EXPORT int cmark_node_set_literal(cmark_node *node, const char *content); /** Returns the heading level of 'node', or 0 if 'node' is not a heading. */ CMARK_EXPORT int cmark_node_get_heading_level(cmark_node *node); /* For backwards compatibility */ #define cmark_node_get_header_level cmark_node_get_heading_level #define cmark_node_set_header_level cmark_node_set_heading_level /** Sets the heading level of 'node', returning 1 on success and 0 on error. */ CMARK_EXPORT int cmark_node_set_heading_level(cmark_node *node, int level); /** Returns the list type of 'node', or `CMARK_NO_LIST` if 'node' * is not a list. */ CMARK_EXPORT cmark_list_type cmark_node_get_list_type(cmark_node *node); /** Sets the list type of 'node', returning 1 on success and 0 on error. */ CMARK_EXPORT int cmark_node_set_list_type(cmark_node *node, cmark_list_type type); /** Returns the list delimiter type of 'node', or `CMARK_NO_DELIM` if 'node' * is not a list. */ CMARK_EXPORT cmark_delim_type cmark_node_get_list_delim(cmark_node *node); /** Sets the list delimiter type of 'node', returning 1 on success and 0 * on error. */ CMARK_EXPORT int cmark_node_set_list_delim(cmark_node *node, cmark_delim_type delim); /** Returns starting number of 'node', if it is an ordered list, otherwise 0. */ CMARK_EXPORT int cmark_node_get_list_start(cmark_node *node); /** Sets starting number of 'node', if it is an ordered list. Returns 1 * on success, 0 on failure. */ CMARK_EXPORT int cmark_node_set_list_start(cmark_node *node, int start); /** Returns 1 if 'node' is a tight list, 0 otherwise. */ CMARK_EXPORT int cmark_node_get_list_tight(cmark_node *node); /** Sets the "tightness" of a list. Returns 1 on success, 0 on failure. */ CMARK_EXPORT int cmark_node_set_list_tight(cmark_node *node, int tight); /** Returns the info string from a fenced code block. */ CMARK_EXPORT const char *cmark_node_get_fence_info(cmark_node *node); /** Sets the info string in a fenced code block, returning 1 on * success and 0 on failure. */ CMARK_EXPORT int cmark_node_set_fence_info(cmark_node *node, const char *info); /** Returns the URL of a link or image 'node', or an empty string if no URL is set. Returns NULL if called on a node that is not a link or image. */ CMARK_EXPORT const char *cmark_node_get_url(cmark_node *node); /** Sets the URL of a link or image 'node'. Returns 1 on success, * 0 on failure. */ CMARK_EXPORT int cmark_node_set_url(cmark_node *node, const char *url); /** Returns the title of a link or image 'node', or an empty string if no title is set. Returns NULL if called on a node that is not a link or image. */ CMARK_EXPORT const char *cmark_node_get_title(cmark_node *node); /** Sets the title of a link or image 'node'. Returns 1 on success, * 0 on failure. */ CMARK_EXPORT int cmark_node_set_title(cmark_node *node, const char *title); /** Returns the literal "on enter" text for a custom 'node', or an empty string if no on_enter is set. Returns NULL if called on a non-custom node. */ CMARK_EXPORT const char *cmark_node_get_on_enter(cmark_node *node); /** Sets the literal text to render "on enter" for a custom 'node'. Any children of the node will be rendered after this text. Returns 1 on success 0 on failure. */ CMARK_EXPORT int cmark_node_set_on_enter(cmark_node *node, const char *on_enter); /** Returns the literal "on exit" text for a custom 'node', or an empty string if no on_exit is set. Returns NULL if called on a non-custom node. */ CMARK_EXPORT const char *cmark_node_get_on_exit(cmark_node *node); /** Sets the literal text to render "on exit" for a custom 'node'. Any children of the node will be rendered before this text. Returns 1 on success 0 on failure. */ CMARK_EXPORT int cmark_node_set_on_exit(cmark_node *node, const char *on_exit); /** Returns the line on which 'node' begins. */ CMARK_EXPORT int cmark_node_get_start_line(cmark_node *node); /** Returns the column at which 'node' begins. */ CMARK_EXPORT int cmark_node_get_start_column(cmark_node *node); /** Returns the line on which 'node' ends. */ CMARK_EXPORT int cmark_node_get_end_line(cmark_node *node); /** Returns the column at which 'node' ends. */ CMARK_EXPORT int cmark_node_get_end_column(cmark_node *node); /** * ## Tree Manipulation */ /** Unlinks a 'node', removing it from the tree, but not freeing its * memory. (Use 'cmark_node_free' for that.) */ CMARK_EXPORT void cmark_node_unlink(cmark_node *node); /** Inserts 'sibling' before 'node'. Returns 1 on success, 0 on failure. */ CMARK_EXPORT int cmark_node_insert_before(cmark_node *node, cmark_node *sibling); /** Inserts 'sibling' after 'node'. Returns 1 on success, 0 on failure. */ CMARK_EXPORT int cmark_node_insert_after(cmark_node *node, cmark_node *sibling); /** Replaces 'oldnode' with 'newnode' and unlinks 'oldnode' (but does * not free its memory). * Returns 1 on success, 0 on failure. */ CMARK_EXPORT int cmark_node_replace(cmark_node *oldnode, cmark_node *newnode); /** Adds 'child' to the beginning of the children of 'node'. * Returns 1 on success, 0 on failure. */ CMARK_EXPORT int cmark_node_prepend_child(cmark_node *node, cmark_node *child); /** Adds 'child' to the end of the children of 'node'. * Returns 1 on success, 0 on failure. */ CMARK_EXPORT int cmark_node_append_child(cmark_node *node, cmark_node *child); /** Consolidates adjacent text nodes. */ CMARK_EXPORT void cmark_consolidate_text_nodes(cmark_node *root); /** * ## Parsing * * Simple interface: * * cmark_node *document = cmark_parse_document("Hello *world*", 13, * CMARK_OPT_DEFAULT); * * Streaming interface: * * cmark_parser *parser = cmark_parser_new(CMARK_OPT_DEFAULT); * FILE *fp = fopen("myfile.md", "rb"); * while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) { * cmark_parser_feed(parser, buffer, bytes); * if (bytes < sizeof(buffer)) { * break; * } * } * document = cmark_parser_finish(parser); * cmark_parser_free(parser); */ /** Creates a new parser object. */ CMARK_EXPORT cmark_parser *cmark_parser_new(int options); /** Creates a new parser object with the given memory allocator */ CMARK_EXPORT cmark_parser *cmark_parser_new_with_mem(int options, cmark_mem *mem); /** Frees memory allocated for a parser object. */ CMARK_EXPORT void cmark_parser_free(cmark_parser *parser); /** Feeds a string of length 'len' to 'parser'. */ CMARK_EXPORT void cmark_parser_feed(cmark_parser *parser, const char *buffer, size_t len); /** Finish parsing and return a pointer to a tree of nodes. */ CMARK_EXPORT cmark_node *cmark_parser_finish(cmark_parser *parser); /** Parse a CommonMark document in 'buffer' of length 'len'. * Returns a pointer to a tree of nodes. The memory allocated for * the node tree should be released using 'cmark_node_free' * when it is no longer needed. */ CMARK_EXPORT cmark_node *cmark_parse_document(const char *buffer, size_t len, int options); /** Parse a CommonMark document in file 'f', returning a pointer to * a tree of nodes. The memory allocated for the node tree should be * released using 'cmark_node_free' when it is no longer needed. */ CMARK_EXPORT cmark_node *cmark_parse_file(FILE *f, int options); /** * ## Rendering */ /** Render a 'node' tree as XML. It is the caller's responsibility * to free the returned buffer. */ CMARK_EXPORT char *cmark_render_xml(cmark_node *root, int options); /** Render a 'node' tree as an HTML fragment. It is up to the user * to add an appropriate header and footer. It is the caller's * responsibility to free the returned buffer. */ CMARK_EXPORT char *cmark_render_html(cmark_node *root, int options); /** Render a 'node' tree as a groff man page, without the header. * It is the caller's responsibility to free the returned buffer. */ CMARK_EXPORT char *cmark_render_man(cmark_node *root, int options, int width); /** Render a 'node' tree as a commonmark document. * It is the caller's responsibility to free the returned buffer. */ CMARK_EXPORT char *cmark_render_commonmark(cmark_node *root, int options, int width); /** Render a 'node' tree as a LaTeX document. * It is the caller's responsibility to free the returned buffer. */ CMARK_EXPORT char *cmark_render_latex(cmark_node *root, int options, int width); /** * ## Options */ /** Default options. */ #define CMARK_OPT_DEFAULT 0 /** * ### Options affecting rendering */ /** Include a `data-sourcepos` attribute on all block elements. */ #define CMARK_OPT_SOURCEPOS (1 << 1) /** Render `softbreak` elements as hard line breaks. */ #define CMARK_OPT_HARDBREAKS (1 << 2) /** `CMARK_OPT_SAFE` is defined here for API compatibility, but it no longer has any effect. "Safe" mode is now the default: set `CMARK_OPT_UNSAFE` to disable it. */ #define CMARK_OPT_SAFE (1 << 3) /** Render raw HTML and unsafe links (`javascript:`, `vbscript:`, * `file:`, and `data:`, except for `image/png`, `image/gif`, * `image/jpeg`, or `image/webp` mime types). By default, * raw HTML is replaced by a placeholder HTML comment. Unsafe * links are replaced by empty strings. */ #define CMARK_OPT_UNSAFE (1 << 17) /** Render `softbreak` elements as spaces. */ #define CMARK_OPT_NOBREAKS (1 << 4) /** * ### Options affecting parsing */ /** Legacy option (no effect). */ #define CMARK_OPT_NORMALIZE (1 << 8) /** Validate UTF-8 in the input before parsing, replacing illegal * sequences with the replacement character U+FFFD. */ #define CMARK_OPT_VALIDATE_UTF8 (1 << 9) /** Convert straight quotes to curly, --- to em dashes, -- to en dashes. */ #define CMARK_OPT_SMART (1 << 10) /** * ## Version information */ /** The library version as integer for runtime checks. Also available as * macro CMARK_VERSION for compile time checks. * * * Bits 16-23 contain the major version. * * Bits 8-15 contain the minor version. * * Bits 0-7 contain the patchlevel. * * In hexadecimal format, the number 0x010203 represents version 1.2.3. */ CMARK_EXPORT int cmark_version(void); /** The library version string for runtime checks. Also available as * macro CMARK_VERSION_STRING for compile time checks. */ CMARK_EXPORT const char *cmark_version_string(void); /** # AUTHORS * * John MacFarlane, Vicent Marti, Kārlis Gaņģis, Nick Wellnhofer. */ #ifndef CMARK_NO_SHORT_NAMES #define NODE_DOCUMENT CMARK_NODE_DOCUMENT #define NODE_BLOCK_QUOTE CMARK_NODE_BLOCK_QUOTE #define NODE_LIST CMARK_NODE_LIST #define NODE_ITEM CMARK_NODE_ITEM #define NODE_CODE_BLOCK CMARK_NODE_CODE_BLOCK #define NODE_HTML_BLOCK CMARK_NODE_HTML_BLOCK #define NODE_CUSTOM_BLOCK CMARK_NODE_CUSTOM_BLOCK #define NODE_PARAGRAPH CMARK_NODE_PARAGRAPH #define NODE_HEADING CMARK_NODE_HEADING #define NODE_HEADER CMARK_NODE_HEADER #define NODE_THEMATIC_BREAK CMARK_NODE_THEMATIC_BREAK #define NODE_HRULE CMARK_NODE_HRULE #define NODE_TEXT CMARK_NODE_TEXT #define NODE_SOFTBREAK CMARK_NODE_SOFTBREAK #define NODE_LINEBREAK CMARK_NODE_LINEBREAK #define NODE_CODE CMARK_NODE_CODE #define NODE_HTML_INLINE CMARK_NODE_HTML_INLINE #define NODE_CUSTOM_INLINE CMARK_NODE_CUSTOM_INLINE #define NODE_EMPH CMARK_NODE_EMPH #define NODE_STRONG CMARK_NODE_STRONG #define NODE_LINK CMARK_NODE_LINK #define NODE_IMAGE CMARK_NODE_IMAGE #define BULLET_LIST CMARK_BULLET_LIST #define ORDERED_LIST CMARK_ORDERED_LIST #define PERIOD_DELIM CMARK_PERIOD_DELIM #define PAREN_DELIM CMARK_PAREN_DELIM #endif #ifdef __cplusplus } #endif #endif
19,431
C++
.h
541
33.57671
80
0.717009
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
true
true
false
false
false
false
false
false
21,733
chunk.h
visualfc_liteide/liteidex/src/3rdparty/cmark/src/chunk.h
#ifndef CMARK_CHUNK_H #define CMARK_CHUNK_H #include <string.h> #include <stdlib.h> #include <assert.h> #include "cmark.h" #include "buffer.h" #include "cmark_ctype.h" #define CMARK_CHUNK_EMPTY \ { NULL, 0, 0 } typedef struct { unsigned char *data; bufsize_t len; bufsize_t alloc; // also implies a NULL-terminated string } cmark_chunk; static CMARK_INLINE void cmark_chunk_free(cmark_mem *mem, cmark_chunk *c) { if (c->alloc) mem->free(c->data); c->data = NULL; c->alloc = 0; c->len = 0; } static CMARK_INLINE void cmark_chunk_ltrim(cmark_chunk *c) { assert(!c->alloc); while (c->len && cmark_isspace(c->data[0])) { c->data++; c->len--; } } static CMARK_INLINE void cmark_chunk_rtrim(cmark_chunk *c) { assert(!c->alloc); while (c->len > 0) { if (!cmark_isspace(c->data[c->len - 1])) break; c->len--; } } static CMARK_INLINE void cmark_chunk_trim(cmark_chunk *c) { cmark_chunk_ltrim(c); cmark_chunk_rtrim(c); } static CMARK_INLINE bufsize_t cmark_chunk_strchr(cmark_chunk *ch, int c, bufsize_t offset) { const unsigned char *p = (unsigned char *)memchr(ch->data + offset, c, ch->len - offset); return p ? (bufsize_t)(p - ch->data) : ch->len; } static CMARK_INLINE const char *cmark_chunk_to_cstr(cmark_mem *mem, cmark_chunk *c) { unsigned char *str; if (c->alloc) { return (char *)c->data; } str = (unsigned char *)mem->calloc(c->len + 1, 1); if (c->len > 0) { memcpy(str, c->data, c->len); } str[c->len] = 0; c->data = str; c->alloc = 1; return (char *)str; } static CMARK_INLINE void cmark_chunk_set_cstr(cmark_mem *mem, cmark_chunk *c, const char *str) { unsigned char *old = c->alloc ? c->data : NULL; if (str == NULL) { c->len = 0; c->data = NULL; c->alloc = 0; } else { c->len = (bufsize_t)strlen(str); c->data = (unsigned char *)mem->calloc(c->len + 1, 1); c->alloc = 1; memcpy(c->data, str, c->len + 1); } if (old != NULL) { mem->free(old); } } static CMARK_INLINE cmark_chunk cmark_chunk_literal(const char *data) { bufsize_t len = data ? (bufsize_t)strlen(data) : 0; cmark_chunk c = {(unsigned char *)data, len, 0}; return c; } static CMARK_INLINE cmark_chunk cmark_chunk_dup(const cmark_chunk *ch, bufsize_t pos, bufsize_t len) { cmark_chunk c = {ch->data + pos, len, 0}; return c; } static CMARK_INLINE cmark_chunk cmark_chunk_buf_detach(cmark_strbuf *buf) { cmark_chunk c; c.len = buf->size; c.data = cmark_strbuf_detach(buf); c.alloc = 1; return c; } #endif
2,802
C++
.h
97
24
80
0.583675
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,734
scanners.h
visualfc_liteide/liteidex/src/3rdparty/cmark/src/scanners.h
#include "cmark.h" #include "chunk.h" #ifdef __cplusplus extern "C" { #endif bufsize_t _scan_at(bufsize_t (*scanner)(const unsigned char *), cmark_chunk *c, bufsize_t offset); bufsize_t _scan_scheme(const unsigned char *p); bufsize_t _scan_autolink_uri(const unsigned char *p); bufsize_t _scan_autolink_email(const unsigned char *p); bufsize_t _scan_html_tag(const unsigned char *p); bufsize_t _scan_html_block_start(const unsigned char *p); bufsize_t _scan_html_block_start_7(const unsigned char *p); bufsize_t _scan_html_block_end_1(const unsigned char *p); bufsize_t _scan_html_block_end_2(const unsigned char *p); bufsize_t _scan_html_block_end_3(const unsigned char *p); bufsize_t _scan_html_block_end_4(const unsigned char *p); bufsize_t _scan_html_block_end_5(const unsigned char *p); bufsize_t _scan_link_title(const unsigned char *p); bufsize_t _scan_spacechars(const unsigned char *p); bufsize_t _scan_atx_heading_start(const unsigned char *p); bufsize_t _scan_setext_heading_line(const unsigned char *p); bufsize_t _scan_open_code_fence(const unsigned char *p); bufsize_t _scan_close_code_fence(const unsigned char *p); bufsize_t _scan_entity(const unsigned char *p); bufsize_t _scan_dangerous_url(const unsigned char *p); #define scan_scheme(c, n) _scan_at(&_scan_scheme, c, n) #define scan_autolink_uri(c, n) _scan_at(&_scan_autolink_uri, c, n) #define scan_autolink_email(c, n) _scan_at(&_scan_autolink_email, c, n) #define scan_html_tag(c, n) _scan_at(&_scan_html_tag, c, n) #define scan_html_block_start(c, n) _scan_at(&_scan_html_block_start, c, n) #define scan_html_block_start_7(c, n) _scan_at(&_scan_html_block_start_7, c, n) #define scan_html_block_end_1(c, n) _scan_at(&_scan_html_block_end_1, c, n) #define scan_html_block_end_2(c, n) _scan_at(&_scan_html_block_end_2, c, n) #define scan_html_block_end_3(c, n) _scan_at(&_scan_html_block_end_3, c, n) #define scan_html_block_end_4(c, n) _scan_at(&_scan_html_block_end_4, c, n) #define scan_html_block_end_5(c, n) _scan_at(&_scan_html_block_end_5, c, n) #define scan_link_title(c, n) _scan_at(&_scan_link_title, c, n) #define scan_spacechars(c, n) _scan_at(&_scan_spacechars, c, n) #define scan_atx_heading_start(c, n) _scan_at(&_scan_atx_heading_start, c, n) #define scan_setext_heading_line(c, n) \ _scan_at(&_scan_setext_heading_line, c, n) #define scan_open_code_fence(c, n) _scan_at(&_scan_open_code_fence, c, n) #define scan_close_code_fence(c, n) _scan_at(&_scan_close_code_fence, c, n) #define scan_entity(c, n) _scan_at(&_scan_entity, c, n) #define scan_dangerous_url(c, n) _scan_at(&_scan_dangerous_url, c, n) #ifdef __cplusplus } #endif
2,685
C++
.h
49
53.285714
80
0.702508
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
21,735
inlines.h
visualfc_liteide/liteidex/src/3rdparty/cmark/src/inlines.h
#ifndef CMARK_INLINES_H #define CMARK_INLINES_H #ifdef __cplusplus extern "C" { #endif cmark_chunk cmark_clean_url(cmark_mem *mem, cmark_chunk *url); cmark_chunk cmark_clean_title(cmark_mem *mem, cmark_chunk *title); void cmark_parse_inlines(cmark_mem *mem, cmark_node *parent, cmark_reference_map *refmap, int options); bufsize_t cmark_parse_reference_inline(cmark_mem *mem, cmark_chunk *input, cmark_reference_map *refmap); #ifdef __cplusplus } #endif #endif
531
C++
.h
15
29.733333
74
0.682353
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
21,736
Lexer.h
visualfc_liteide/liteidex/src/3rdparty/cplusplus/Lexer.h
// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. #ifndef CPLUSPLUS_LEXER_H #define CPLUSPLUS_LEXER_H #include "Token.h" namespace CPlusPlus { class Lexer { Lexer(const Lexer &other); void operator =(const Lexer &other); public: //Lexer(TranslationUnit *unit); Lexer(const char *firstChar, const char *lastChar); ~Lexer(); //Control *control() const { return _control; } //TranslationUnit *translationUnit() const; void scan(Token *tok); inline void operator()(Token *tok) { scan(tok); } unsigned tokenOffset() const; unsigned tokenLength() const; const char *tokenBegin() const; const char *tokenEnd() const; unsigned currentLine() const; bool scanCommentTokens() const; void setScanCommentTokens(bool onoff); bool scanKeywords() const; void setScanKeywords(bool onoff); bool scanAngleStringLiteralTokens() const; void setScanAngleStringLiteralTokens(bool onoff); void setStartWithNewline(bool enabled); int state() const; void setState(int state); LanguageFeatures languageFeatures() const { return _languageFeatures; } void setLanguageFeatures(LanguageFeatures features) { _languageFeatures = features; } private: void scan_helper(Token *tok); void setSource(const char *firstChar, const char *lastChar); static int classify(const char *string, int length, LanguageFeatures features); static int classifyObjCAtKeyword(const char *s, int n); static int golangTypes(const char *s, int n); static int golangKeywords(const char *s, int n); static int golangPredecl(const char *s, int n); static int golangBuiltinFunc(const char *s, int n); static int classifyOperator(const char *string, int length); void scanStringLiteral(Token *tok, unsigned char hint = 0); void scanGoRawStringLiteral(Token *tok, unsigned char hint = 0); void scanRawStringLiteral(Token *tok, unsigned char hint = 0); void scanCharLiteral(Token *tok, unsigned char hint = 0); void scanUntilQuote(Token *tok, unsigned char quote, bool containNewLines = false); void scanNumericLiteral(Token *tok); void scanIdentifier(Token *tok, unsigned extraProcessedChars = 0); void scanBackslash(Kind type); void scanCppComment(Kind type); inline void yyinp() { _yychar = *++_currentChar; if (_yychar == '\n') pushLineStartOffset(); } void pushLineStartOffset(); private: struct Flags { unsigned _scanCommentTokens: 1; unsigned _scanKeywords: 1; unsigned _scanAngleStringLiteralTokens: 1; }; struct State { unsigned char _tokenKind : 7; unsigned char _newlineExpected : 1; }; //TranslationUnit *_translationUnit; //Control *_control; const char *_firstChar; const char *_currentChar; const char *_lastChar; const char *_tokenStart; unsigned char _yychar; union { unsigned char _state; State s; }; union { unsigned _flags; Flags f; }; unsigned _currentLine; LanguageFeatures _languageFeatures; }; } // namespace CPlusPlus #endif // CPLUSPLUS_LEXER_H
4,278
C++
.h
108
35.046296
89
0.722316
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,742
quickopenfilesystem.h
visualfc_liteide/liteidex/src/plugins/quickopen/quickopenfilesystem.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: quickopenfilesystem.h // Creator: visualfc <visualfc@gmail.com> #ifndef QUICKOPENFILESYSTEM_H #define QUICKOPENFILESYSTEM_H #include "quickopenapi/quickopenapi.h" class QFileSystemModel; class QSortFilterProxyModel; class FileSystemModelEx; class QuickOpenFileSystem : public LiteApi::IQuickOpenFileSystem { Q_OBJECT public: QuickOpenFileSystem(LiteApi::IApplication *app, QObject *parent); virtual QString id() const; virtual QString info() const; virtual QString placeholderText() const; virtual void activate(); virtual QAbstractItemModel *model() const; virtual QModelIndex rootIndex() const; virtual void updateModel(); virtual QModelIndex filterChanged(const QString &text); virtual void indexChanged(const QModelIndex &index); virtual bool selected(const QString &text, const QModelIndex &index); virtual void cancel(); virtual void setRootPath(const QString &path); virtual void setPlaceholderText(const QString &text); virtual QModelIndex indexForPath(const QString &indexForPath) const; virtual QString pathForIndex(const QModelIndex &index) const; protected: LiteApi::IApplication *m_liteApp; FileSystemModelEx *m_model; QSortFilterProxyModel *m_proxy; QModelIndex m_rootIndex; QString m_placehoderText; }; #endif // QUICKOPENFILESYSTEM_H
2,360
C++
.h
56
39.5
82
0.72913
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,743
quickopenmimetype.h
visualfc_liteide/liteidex/src/plugins/quickopen/quickopenmimetype.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: quickopenmimetype.h // Creator: visualfc <visualfc@gmail.com> #ifndef QUICKOPENMIMETYPE_H #define QUICKOPENMIMETYPE_H #include "quickopenapi/quickopenapi.h" #include <QPointer> class QStandardItemModel; class QuickOpenMimeType : public LiteApi::IQuickOpenMimeType { Q_OBJECT public: QuickOpenMimeType(LiteApi::IApplication *app, QObject *parent); virtual QString id() const; virtual QString info() const; virtual QString placeholderText() const; virtual void activate(); virtual QAbstractItemModel *model() const; virtual QModelIndex rootIndex() const; virtual void updateModel(); virtual QModelIndex filterChanged(const QString &text); virtual void indexChanged(const QModelIndex &index); virtual bool selected(const QString &text, const QModelIndex &index); virtual void addAdapter(LiteApi::IQuickOpenAdapter *factory); virtual void setId(const QString &id); virtual void setInfo(const QString &info); virtual void setNoFoundMessage(const QString &message); virtual void cancel(); protected: LiteApi::IApplication *m_liteApp; QPointer<LiteApi::IQuickOpen> m_symbol; QList<LiteApi::IQuickOpenAdapter*> m_adapterList; QStandardItemModel *m_model; QString m_id; QString m_info; QString m_message; }; #endif // QUICKOPENMIMETYPE_H
2,410
C++
.h
57
38.45614
83
0.700213
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,744
quickopeneditor.h
visualfc_liteide/liteidex/src/plugins/quickopen/quickopeneditor.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: quickopeneditor.h // Creator: visualfc <visualfc@gmail.com> #ifndef QUICKOPENEDITOR_H #define QUICKOPENEDITOR_H #include "quickopenapi/quickopenapi.h" class QStandardItemModel; class QSortFilterProxyModel; class QuickOpenEditor : public LiteApi::IQuickOpen { Q_OBJECT public: QuickOpenEditor(LiteApi::IApplication *app, QObject *parent = 0); virtual QString id() const; virtual QString info() const; virtual QString placeholderText() const; virtual void activate(); virtual QAbstractItemModel *model() const; virtual QModelIndex rootIndex() const; virtual void updateModel(); virtual QModelIndex filterChanged(const QString &text); virtual void indexChanged(const QModelIndex &index); virtual bool selected(const QString &text, const QModelIndex &index); virtual void cancel(); protected: LiteApi::IApplication *m_liteApp; QStandardItemModel *m_model; QSortFilterProxyModel *m_proxyModel; Qt::CaseSensitivity m_matchCase; }; #endif // QUICKOPENEDITOR_H
2,097
C++
.h
50
38.42
83
0.69642
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,745
quickopenplugin.h
visualfc_liteide/liteidex/src/plugins/quickopen/quickopenplugin.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: quickopenplugin.h // Creator: visualfc <visualfc@gmail.com> #ifndef QUICKOPENPLUGIN_H #define QUICKOPENPLUGIN_H #include "quickopen_global.h" #include "liteapi/liteapi.h" class QuickOpenPlugin : public LiteApi::IPlugin { Q_OBJECT public: QuickOpenPlugin(); virtual bool load(LiteApi::IApplication *app); }; class PluginFactory : public LiteApi::PluginFactoryT<QuickOpenPlugin> { Q_OBJECT Q_INTERFACES(LiteApi::IPluginFactory) #if QT_VERSION >= 0x050000 Q_PLUGIN_METADATA(IID "liteidex.QuickOpenPlugin") #endif public: PluginFactory() { m_info->setId("plugin/QuickOpen"); m_info->setVer("X36"); m_info->setName("QuickOpen"); m_info->setAuthor("visualfc"); m_info->setInfo("QuickOpen"); m_info->setMustLoad(true); //m_info->appendDepend("plugin/liteenv"); } }; #endif // QUICKOPENPLUGIN_H
1,957
C++
.h
52
33.711538
83
0.659799
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,746
quickopen_global.h
visualfc_liteide/liteidex/src/plugins/quickopen/quickopen_global.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: quickopen_global.h // Creator: visualfc <visualfc@gmail.com> #ifndef QUICKOPEN_GLOBAL_H #define QUICKOPEN_GLOBAL_H #include <QtCore/qglobal.h> #if defined(QUICKOPEN_LIBRARY) # define QUICKOPENSHARED_EXPORT Q_DECL_EXPORT #else # define QUICKOPENSHARED_EXPORT Q_DECL_IMPORT #endif #define OPTION_QUICKOPEN "option/quickopen" #define QUICKOPEN_FILES_MAXCOUNT "quickopen/filesmaxcount" #define QUICKOPNE_FILES_MATCHCASE "quickopen/filesmatchscase" #define QUICKOPEN_FOLDER_MAXCOUNT "quickopen/foldermaxcount" #define QUICKOPNE_FOLDER_MATCHCASE "quickopen/foldermatchscase" #define QUICKOPNE_EDITOR_MATCHCASE "quickopen/editormatchcase" #endif // QUICKOPEN_GLOBAL_H
1,728
C++
.h
37
44.432432
83
0.710291
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,747
quickopenaction.h
visualfc_liteide/liteidex/src/plugins/quickopen/quickopenaction.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2017 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: quickopenaction.h // Creator: visualfc <visualfc@gmail.com> #ifndef QUICKOPENACTION_H #define QUICKOPENACTION_H #include "quickopenapi/quickopenapi.h" class QStandardItem; class QStandardItemModel; class QSortFilterProxyModel; class QuickOpenAction : public LiteApi::IQuickOpen { Q_OBJECT public: QuickOpenAction(LiteApi::IApplication *app, QObject *parent = 0); virtual QString id() const; virtual QString info() const; virtual QString placeholderText() const; virtual void activate(); virtual QAbstractItemModel *model() const; virtual QModelIndex rootIndex() const; virtual void updateModel(); virtual QModelIndex filterChanged(const QString &text); virtual void indexChanged(const QModelIndex &index); virtual bool selected(const QString &text, const QModelIndex &index); virtual void cancel(); protected: LiteApi::IApplication *m_liteApp; QStandardItemModel *m_model; QSortFilterProxyModel *m_proxyModel; QMap<QStandardItem*,QAction*> m_itemActionMap; }; #endif // QUICKOPENACTION_H
2,136
C++
.h
51
38.392157
83
0.697641
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,748
quickopenmanager.h
visualfc_liteide/liteidex/src/plugins/quickopen/quickopenmanager.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: quickopenmanager.h // Creator: visualfc <visualfc@gmail.com> #ifndef QUICKOPENMANAGER_H #define QUICKOPENMANAGER_H #include "liteapi/liteapi.h" #include "quickopenapi/quickopenapi.h" #include "quickopenwidget.h" #include <QPointer> using namespace LiteApi; class QuickOpenFiles; class QuickOpenFolder; class QuickOpenFileSystem; class QuickOpenManager : public IQuickOpenManager { Q_OBJECT public: QuickOpenManager(QObject *parent = 0); virtual bool initWithApp(IApplication *app); public: virtual void addFilter(const QString &sym, IQuickOpen *filter); virtual void removeFilter(IQuickOpen *filter); virtual QList<IQuickOpen*> filterList() const; virtual QMap<QString, IQuickOpen *> symFilterMap() const; virtual void setCurrentFilter(IQuickOpen *filter); virtual IQuickOpen *currentFilter() const; virtual QModelIndex currentIndex() const; virtual void showById(const QString &id); virtual void showBySymbol(const QString &sym); virtual IQuickOpen *findById(const QString &id); virtual IQuickOpen *findBySymbol(const QString &sym); virtual QWidget *widget() const; virtual QTreeView *modelView() const; virtual QLineEdit *lineEdit() const; virtual void setTempToolBar(QToolBar *toolBar); virtual bool showOpenFolder(const QString &folder, QPoint *pos); public: virtual IQuickOpenMimeType *registerQuickOpenMimeType(const QString &sym); virtual void showPopup(QPoint *pos = 0); virtual void hidePopup(); public slots: void quickOpen(); void quickOpenEditor(); void quickOpenSymbol(); void quickOpenCommand(); void quickOpenHelp(); void filterChanged(const QString &text); void indexChanage(const QModelIndex &index); void selected(); void appAboutToQuit(); protected slots: void hideWidget(); protected: QuickOpenWidget *m_widget; QAction *m_quickOpenAct; QAction *m_quickOpenEditAct; QAction *m_quickOpenSymbolAct; QAction *m_quickOpenActionAct; QAction *m_quickOpenHelpAct; QList<IQuickOpen*> m_filterList; QMap<QString,IQuickOpen*> m_symFilterMap; QMap<IQuickOpen*,bool> m_updateMap; QMap<QString,IQuickOpenMimeType*> m_quickOpenSymbolMap; QString m_sym; QPointer<IQuickOpen> m_currentFilter; QuickOpenFiles *m_quickOpenFiles; QuickOpenFolder *m_quickOpenFolder; QuickOpenFileSystem *m_quickOpenFileSystem; protected: void updateModel(); }; #endif // QUICKOPENMANAGER_H
3,607
C++
.h
91
35.395604
83
0.710331
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,749
quickopenwidget.h
visualfc_liteide/liteidex/src/plugins/quickopen/quickopenwidget.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: quickopenwidget.h // Creator: visualfc <visualfc@gmail.com> #ifndef QUICKOPENWIDGET_H #define QUICKOPENWIDGET_H #include "liteapi/liteapi.h" #include "../3rdparty/qtc_editutil/filterlineedit.h" #include <QAbstractItemModel> #include <QScopedPointer> class QTreeView; class QVBoxLayout; class QuickOpenWidget : public QWidget { Q_OBJECT public: explicit QuickOpenWidget(LiteApi::IApplication *app, QWidget *parent = 0); void setModel(QAbstractItemModel *model, const QModelIndex &rootIndex); QLineEdit *editor(); QTreeView *view(); void setTempToolBar(QToolBar *toolBar); virtual void hideEvent(QHideEvent *e); void closeWidget(); signals: void hideWidget(); void indexChanage(const QModelIndex &index); void indexEnter(const QModelIndex &index); void filterChanged(const QString &filter); public: void showView(QPoint *pos = 0); protected: virtual bool eventFilter(QObject *o, QEvent *e); protected: LiteApi::IApplication *m_liteApp; Utils::FilterLineEdit *m_edit; QTreeView *m_view; QVBoxLayout *m_layout; QScopedPointer<QToolBar> m_tmpToolBar; bool m_wrap; }; #endif // QUICKOPENWIDGET_H
2,266
C++
.h
59
34.915254
83
0.686676
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,750
quickopenhelp.h
visualfc_liteide/liteidex/src/plugins/quickopen/quickopenhelp.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: quickopenhelp.h // Creator: visualfc <visualfc@gmail.com> #ifndef QUICKOPENHELP_H #define QUICKOPENHELP_H #include "quickopenapi/quickopenapi.h" class QStandardItemModel; class QuickOpenHelp : public LiteApi::IQuickOpen { Q_OBJECT public: QuickOpenHelp(LiteApi::IApplication *app, QObject *parent); virtual QString id() const; virtual QString info() const; virtual QString placeholderText() const; virtual void activate(); virtual QAbstractItemModel *model() const; virtual QModelIndex rootIndex() const; virtual void updateModel(); virtual QModelIndex filterChanged(const QString &text); virtual void indexChanged(const QModelIndex &index); virtual bool selected(const QString &text, const QModelIndex &index); virtual void cancel(); protected: LiteApi::IApplication *m_liteApp; QStandardItemModel *m_model; bool update(const QString &text); }; #endif // QUICKOPENHELP_H
2,013
C++
.h
48
38.4375
83
0.688809
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,751
quickopenoption.h
visualfc_liteide/liteidex/src/plugins/quickopen/quickopenoption.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: quickopenoption.h // Creator: visualfc <visualfc@gmail.com> #ifndef QUICKOPENOPTION_H #define QUICKOPENOPTION_H #include "liteapi/liteapi.h" namespace Ui { class QuickOpenOption; } class QuickOpenOption : public LiteApi::IOption { Q_OBJECT public: explicit QuickOpenOption(LiteApi::IApplication *app, QObject *parent = 0); ~QuickOpenOption(); virtual QWidget *widget(); virtual QString name() const; virtual QString mimeType() const; virtual void load(); virtual void save(); private: LiteApi::IApplication *m_liteApp; QWidget *m_widget; Ui::QuickOpenOption *ui; }; #endif // QUICKOPENOPTION_H
1,729
C++
.h
45
35.088889
83
0.663876
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,752
quickopenoptionfactory.h
visualfc_liteide/liteidex/src/plugins/quickopen/quickopenoptionfactory.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: quickopenoptionfactory.h // Creator: visualfc <visualfc@gmail.com> #ifndef QUICKOPENOPTIONFACTORY_H #define QUICKOPENOPTIONFACTORY_H #include "liteapi/liteapi.h" class QuickOpenOptionFactory : public LiteApi::IOptionFactory { public: QuickOpenOptionFactory(LiteApi::IApplication *app, QObject *parent); virtual QStringList mimeTypes() const; virtual LiteApi::IOption *create(const QString &mimeType); protected: LiteApi::IApplication *m_liteApp; }; #endif // QUICKOPENOPTIONFACTORY_H
1,561
C++
.h
35
41.914286
83
0.688406
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,753
quickopenlines.h
visualfc_liteide/liteidex/src/plugins/quickopen/quickopenlines.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: quickopenlines.h // Creator: visualfc <visualfc@gmail.com> #ifndef QUICKOPENLINES_H #define QUICKOPENLINES_H #include "quickopenapi/quickopenapi.h" class QStandardItemModel; class QuickOpenLines : public LiteApi::IQuickOpen { Q_OBJECT public: QuickOpenLines(LiteApi::IApplication *app, QObject *parent); virtual QString id() const; virtual QString info() const; virtual QString placeholderText() const; virtual void activate(); virtual QAbstractItemModel *model() const; virtual QModelIndex rootIndex() const; virtual void updateModel(); virtual QModelIndex filterChanged(const QString &text); virtual void indexChanged(const QModelIndex &index); virtual bool selected(const QString &text, const QModelIndex &index); virtual void cancel(); protected: LiteApi::IApplication *m_liteApp; QStandardItemModel *m_model; bool update(const QString &text); }; #endif // QUICKOPENLINES_H
2,019
C++
.h
48
38.5625
83
0.689761
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,754
quickopenfiles.h
visualfc_liteide/liteidex/src/plugins/quickopen/quickopenfiles.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: quickopenfiles.h // Creator: visualfc <visualfc@gmail.com> #ifndef QUICKOPENFILES_H #define QUICKOPENFILES_H #include "quickopenapi/quickopenapi.h" #include "fileutil/findfilesthread.h" class QStandardItemModel; class QSortFilterProxyModel; class QuickOpenFiles : public LiteApi::IQuickOpen { Q_OBJECT public: QuickOpenFiles(LiteApi::IApplication *app, QObject *parent = 0); virtual ~QuickOpenFiles(); virtual QString id() const; virtual QString info() const; virtual QString placeholderText() const; virtual void activate(); virtual QAbstractItemModel *model() const; virtual QModelIndex rootIndex() const; virtual void updateModel(); virtual QModelIndex filterChanged(const QString &text); virtual void indexChanged(const QModelIndex &index); virtual bool selected(const QString &text, const QModelIndex &index); virtual void cancel(); void startFindThread(); public slots: void findResult(const QStringList &fileList); protected: LiteApi::IApplication *m_liteApp; FindFilesThread *m_thread; QStandardItemModel *m_model; QStandardItemModel *m_filesModel; QSortFilterProxyModel *m_proxyModel; QStringList m_editors; Qt::CaseSensitivity m_matchCase; int m_maxCount; }; #endif // QUICKOPENFILES_H
2,403
C++
.h
59
36.932203
83
0.692374
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,755
quickopenfolder.h
visualfc_liteide/liteidex/src/plugins/quickopen/quickopenfolder.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2018 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: quickopenfolder.h // Creator: visualfc <visualfc@gmail.com> #ifndef QUICKOPENFOLDER_H #define QUICKOPENFOLDER_H #include "quickopenapi/quickopenapi.h" #include "fileutil/findfilesthread.h" class QStandardItemModel; class QSortFilterProxyModel; class QuickOpenFolder : public LiteApi::IQuickOpenFolder { Q_OBJECT public: QuickOpenFolder(LiteApi::IApplication *app, QObject *parent = 0); virtual ~QuickOpenFolder(); virtual QString id() const; virtual QString info() const; virtual QString placeholderText() const; virtual void activate(); virtual QAbstractItemModel *model() const; virtual QModelIndex rootIndex() const; virtual void updateModel(); virtual QModelIndex filterChanged(const QString &text); virtual void indexChanged(const QModelIndex &index); virtual bool selected(const QString &text, const QModelIndex &index); virtual void cancel(); virtual void setFolder(const QString &folder); virtual void setPlaceholderText(const QString &text); public slots: void findResult(const QStringList &fileList); protected: void startFindThread(); LiteApi::IApplication *m_liteApp; FindFilesThread *m_thread; QStandardItemModel *m_model; QSortFilterProxyModel *m_proxyModel; Qt::CaseSensitivity m_matchCase; int m_maxCount; QString m_folder; QString m_placeholderText; }; #endif // QUICKOPENFOLDER_H
2,531
C++
.h
61
37.622951
83
0.691463
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,756
envmanager.h
visualfc_liteide/liteidex/src/plugins/liteenv/envmanager.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: envmanager.h // Creator: visualfc <visualfc@gmail.com> #ifndef ENVMANAGER_H #define ENVMANAGER_H #include "liteenvapi/liteenvapi.h" class QComboBox; class EnvManager; class GoEnvManager; class Process; class Env : public LiteApi::IEnv { Q_OBJECT public: Env(LiteApi::IApplication *app, QObject *parent = 0); public: virtual QString id() const; virtual QString filePath() const; virtual QProcessEnvironment& environment(); virtual QStringList orgEnvLines() const; virtual QMap<QString,QString> goEnvMap() const; virtual void reload(); void loadGoEnv(); public: void loadEnvFile(QIODevice *dev); static void loadEnv(EnvManager *manager, const QString &filePath); protected slots: void readStdout(); void readStderr(); void finished(int code, QProcess::ExitStatus); void error(QProcess::ProcessError error); protected: void updateIdeEnv(QProcessEnvironment &env); protected: LiteApi::IApplication *m_liteApp; QString m_filePath; QStringList m_orgEnvLines; QString m_id; QProcessEnvironment m_env; QMap<QString,QString> m_ideEnvMap; QMap<QString,QString> m_goEnvMap; Process *m_process; }; class EnvManager : public LiteApi::IEnvManager { Q_OBJECT public: EnvManager(QObject *parent = 0); ~EnvManager(); public: virtual bool initWithApp(LiteApi::IApplication *app); virtual QList<LiteApi::IEnv*> envList() const; virtual LiteApi::IEnv *findEnv(const QString &id, const QString &backup = "system") const; virtual void setCurrentEnvId(const QString &id); virtual LiteApi::IEnv *currentEnv() const; virtual QProcessEnvironment currentEnvironment() const; protected slots: virtual void reloadCurrentEnv(); void appLoaded(); void envActivated(QString); void editCurrentEnv(); void editorSaved(LiteApi::IEditor*); void goenvError(const QString &id, const QString &msg); void goenvChanged(const QString &id); void selectEnvAction(QAction* act); public: void setCurrentEnv(LiteApi::IEnv *env); void addEnv(LiteApi::IEnv *build); void removeEnv(LiteApi::IEnv *build); void loadEnvFiles(const QString &path); void emitEnvChanged(); public slots: void broadcast(QString module, QString id, QVariant); protected: QList<LiteApi::IEnv*> m_envList; LiteApi::IEnv *m_curEnv; QToolBar *m_toolBar; QComboBox *m_envCmb; bool m_appLoaded; GoEnvManager *m_goEnvManager; QActionGroup *m_selectActionGroup; QMenu *m_selectMenu; }; #endif // ENVMANAGER_H
3,639
C++
.h
103
32.029126
94
0.701133
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,757
liteenvoptionfactory.h
visualfc_liteide/liteidex/src/plugins/liteenv/liteenvoptionfactory.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: liteenvoptionfactory.h // Creator: visualfc <visualfc@gmail.com> #ifndef LITEENVOPTIONFACTORY_H #define LITEENVOPTIONFACTORY_H #include "liteapi/liteapi.h" class LiteEnvOptionFactory : public LiteApi::IOptionFactory { public: LiteEnvOptionFactory(LiteApi::IApplication *app, QObject *parent); virtual QStringList mimeTypes() const; virtual LiteApi::IOption *create(const QString &mimeType); protected: LiteApi::IApplication *m_liteApp; }; #endif // LITEENVOPTIONFACTORY_H
1,510
C++
.h
35
41.571429
82
0.702243
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,758
liteenvoption.h
visualfc_liteide/liteidex/src/plugins/liteenv/liteenvoption.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: liteenvoption.h // Creator: visualfc <visualfc@gmail.com> #ifndef LITEENVOPTION_H #define LITEENVOPTION_H #include "liteapi/liteapi.h" #include <QModelIndex> namespace Ui { class LiteEnvOption; } class QFileSystemModel; class LiteEnvOption : public LiteApi::IOption { Q_OBJECT public: explicit LiteEnvOption(LiteApi::IApplication *app, QObject *parent = 0); ~LiteEnvOption(); virtual QWidget *widget(); virtual QString name() const; virtual QString mimeType() const; virtual void load(); virtual void save(); public slots: void doubleClickedFile(QModelIndex); private: LiteApi::IApplication *m_liteApp; QWidget *m_widget; Ui::LiteEnvOption *ui; QFileSystemModel *m_fileModel; }; #endif // LITEENVOPTION_H
1,797
C++
.h
50
33.7
82
0.689259
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,759
liteenv_global.h
visualfc_liteide/liteidex/src/plugins/liteenv/liteenv_global.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: liteenv_global.h // Creator: visualfc <visualfc@gmail.com> #ifndef LITEENV_GLOBAL_H #define LITEENV_GLOBAL_H #include <QtCore/qglobal.h> #if defined(LITEENV_LIBRARY) # define LITEENVSHARED_EXPORT Q_DECL_EXPORT #else # define LITEENVSHARED_EXPORT Q_DECL_IMPORT #endif #define LITEENV_CURRENTENV "liteenv/currentenvid" #endif // LITEENV_GLOBAL_H
1,369
C++
.h
32
41.625
82
0.692192
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,760
goenvmanager.h
visualfc_liteide/liteidex/src/plugins/liteenv/goenvmanager.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2017 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: goenvmanager.h // Creator: visualfc <visualfc@gmail.com> #ifndef GOENVMANAGER_H #define GOENVMANAGER_H #include "liteenvapi/liteenvapi.h" class GoEnvManager : public LiteApi::IGoEnvManger { Q_OBJECT public: GoEnvManager(QObject *parent); virtual bool initWithApp(LiteApi::IApplication *app); virtual QString gocmd() const; virtual QString gotools() const; virtual QString GOROOT() const; virtual QStringList GOPATH() const; virtual QProcessEnvironment environment() const; virtual QProcessEnvironment customEnvironment(const QString &buildFilePath, QString *pCustomBuildPath) const; virtual QStringList customGOPATH(const QString &buildPath, QString *pCustomBuildPath) const; virtual QString findRealCustomBuildPath(const QString &buildPath) const; virtual bool hasCustomGOPATH(const QString &buildPath) const; virtual void updateGoEnv(); virtual void updateCustomGOPATH(const QString &buildPath); protected: QString m_gocmd; QString m_gotools; QString m_goroot; QStringList m_gopathList; LiteApi::IEnvManager *m_envManager; }; #endif // GOENVMANAGER_H
2,205
C++
.h
50
40.42
114
0.704704
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,761
liteenvplugin.h
visualfc_liteide/liteidex/src/plugins/liteenv/liteenvplugin.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: liteenvplugin.h // Creator: visualfc <visualfc@gmail.com> #ifndef LITEENVPLUGIN_H #define LITEENVPLUGIN_H #include "liteenv_global.h" #include "liteapi/liteapi.h" #include <QtPlugin> class EnvManager; class LiteEnvPlugin : public LiteApi::IPlugin { Q_OBJECT public: LiteEnvPlugin(); virtual bool load(LiteApi::IApplication *app); protected: EnvManager *m_envManager; }; class PluginFactory : public LiteApi::PluginFactoryT<LiteEnvPlugin> { Q_OBJECT #if QT_VERSION >= 0x050000 Q_PLUGIN_METADATA(IID "liteidex.LiteEnvPlugin") #endif Q_INTERFACES(LiteApi::IPluginFactory) public: PluginFactory() { m_info->setId("plugin/LiteEnv"); m_info->setName("LiteEnv"); m_info->setAuthor("visualfc"); m_info->setVer("X38.3"); m_info->setInfo("Environment Manager"); m_info->setMustLoad(true); } }; #endif // LITEENVPLUGIN_H
1,921
C++
.h
55
32.236364
82
0.680817
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,762
rustedit.h
visualfc_liteide/liteidex/src/plugins/rustedit/rustedit.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: rustedit.h // Creator: visualfc <visualfc@gmail.com> #ifndef RUSTEDIT_H #define RUSTEDIT_H #include <liteapi/liteapi.h> #include <liteeditorapi/liteeditorapi.h> #include <liteenvapi/liteenvapi.h> class RustEdit : public QObject { Q_OBJECT public: explicit RustEdit(LiteApi::IApplication *app, QObject *parent = 0); public slots: void currentEnvChanged(LiteApi::IEnv *env); void editorCreated(LiteApi::IEditor *editor); void currentEditorChanged(LiteApi::IEditor *editor); void prefixChanged(const QTextCursor &cur,const QString &pre,bool force); void wordCompleted(QString,QString,QString); void finished(int code,QProcess::ExitStatus); protected: void setCompleter(LiteApi::ICompleter *completer); LiteApi::IApplication *m_liteApp; LiteApi::ICompleter *m_completer; LiteApi::ILiteEditor *m_editor; QProcess *m_process; QString m_racerCmd; QString m_preWord; QString m_prefix; QString m_lastPrefix; }; #endif // RUSTEDIT_H
2,035
C++
.h
51
37.490196
82
0.697475
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,764
rusteditplugin.h
visualfc_liteide/liteidex/src/plugins/rustedit/rusteditplugin.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: rusteditplugin.h // Creator: visualfc <visualfc@gmail.com> #ifndef RUSTEDITPLUGIN_H #define RUSTEDITPLUGIN_H #include "rustedit_global.h" #include "liteapi/liteapi.h" class RustEditPlugin : public LiteApi::IPlugin { Q_OBJECT public: RustEditPlugin(); virtual bool load(LiteApi::IApplication *app); }; class PluginFactory : public LiteApi::PluginFactoryT<RustEditPlugin> { Q_OBJECT Q_INTERFACES(LiteApi::IPluginFactory) #if QT_VERSION >= 0x050000 Q_PLUGIN_METADATA(IID "liteidex.RustEditPlugin") #endif public: PluginFactory() { m_info->setId("plugin/RustEdit"); m_info->setVer("x27"); m_info->setName("RustEdit"); m_info->setAuthor("visualfc"); m_info->setInfo("RustEdit"); m_info->appendDepend("plugin/liteeditor"); } }; #endif // RUSTEDITPLUGIN_H
1,853
C++
.h
51
33.647059
82
0.679287
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,765
dlvdebugger.h
visualfc_liteide/liteidex/src/plugins/dlvdebugger/dlvdebugger.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: dlvdebugger.h // Creator: visualfc <visualfc@gmail.com> #ifndef DLVDEBUGGER_H #define DLVDEBUGGER_H #include "litedebugapi/litedebugapi.h" #include "liteenvapi/liteenvapi.h" #include "litettyapi/litettyapi.h" #include "qtc_gdbmi/gdbmi.h" #include <QSet> class QProcess; class LiteProcess; class DlvHandleState { public: DlvHandleState() : m_exited(false),m_stopped(false) {} void clear() { m_reason.clear(); m_exited = false; m_stopped = false; } void setExited(bool b) {m_exited = b;} void setStopped(bool b) {m_stopped = b;} void setReason(const QByteArray &reason) { m_reason = reason; } bool exited() const { return m_exited; } bool stopped() const { return m_stopped; } QByteArray reason() const { return m_reason; } public: bool m_exited; bool m_stopped; QByteArray m_reason; }; class QStandardItemModel; class QStandardItem; class DlvDebugger : public LiteApi::IDebugger { Q_OBJECT public: DlvDebugger(LiteApi::IApplication *app, QObject *parent = 0); ~DlvDebugger(); enum VarItemDataRole{ VarNameRole = Qt::UserRole + 1, VarNumChildRole, VarExpanded }; public: virtual QString mimeType() const; virtual QAbstractItemModel *debugModel(LiteApi::DEBUG_MODEL_TYPE type); virtual void setWorkingDirectory(const QString &dir); virtual void setEnvironment (const QStringList &environment); virtual bool start(const QString &cmd, const QString &arguments); virtual void stop(); virtual bool isRunning(); virtual void stepOver(); virtual void stepInto(); virtual void stepOut(); virtual void continueRun(); virtual void runToLine(const QString &fileName, int line); virtual void command(const QByteArray &cmd); virtual void enterAppText(const QString &text); virtual void enterDebugText(const QString &text); virtual void expandItem(QModelIndex index, LiteApi::DEBUG_MODEL_TYPE type); virtual void setInitBreakTable(const QMultiMap<QString,int> &bks); virtual void setInitWatchList(const QStringList &names); virtual void insertBreakPoint(const QString &fileName, int line); virtual void removeBreakPoint(const QString &fileName, int line); bool findBreakPoint(const QString &fileName,int line); public: virtual void createWatch(const QString &var); virtual void removeWatch(const QString &value); virtual void removeAllWatch(); virtual void dbclickItem(QModelIndex index, LiteApi::DEBUG_MODEL_TYPE type); void showFrame(QModelIndex index); protected: void insertBreakPointHelper(const QString &fileName, int line, bool force); void command_helper(const QByteArray &cmd, bool force); public slots: void appLoaded(); void readStdError(); void readStdOutput(); void finished(int); void error(QProcess::ProcessError); void readTty(const QByteArray &data); void headlessReadStdError(); void headlessReadStdOutput(); void headlessFinished(int); void headlessError(QProcess::ProcessError err); protected: void handleResponse(const QByteArray &buff); protected: void cleanup(); void clear(); void initDebug(); protected: QString m_lastFileName; int m_lastFileLine; LiteApi::IApplication *m_liteApp; LiteApi::IEnvManager *m_envManager; QMap<QString,QString> m_watchNameMap; QStringList m_updateCmdList; QStringList m_updateCmdHistroy; QString m_lastCmd; QString m_processId; LiteProcess *m_process; LiteProcess *m_headlessProcess; QStandardItemModel *m_asyncModel; QStandardItemModel *m_varsModel; QStandardItemModel *m_watchModel; QStandardItemModel *m_framesModel; QStandardItemModel *m_libraryModel; QStandardItem *m_asyncItem; QMap<QString,QString> m_varNameMap; QList<QString> m_watchList; QMap<QString,QStandardItem*> m_nameItemMap; QSet<QStandardItem*> m_varChangedItemList; QString m_dlvFilePath; QString m_runtimeFilePath; QByteArray m_inbuffer; DlvHandleState m_handleState; QMultiMap<QString,int> m_initBks; QMap<QString,QString> m_locationBkMap; QList<QByteArray> m_cmdList; QList<QByteArray> m_dlvRunningCmdList; bool m_readDataBusy; bool m_writeDataBusy; bool m_dlvInit; bool m_dlvExit; bool m_headlessInitAddress; bool m_headlessMode; }; #endif // DLVDEBUGGER_H
5,553
C++
.h
151
32.89404
82
0.704541
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,766
dlvdebugger_global.h
visualfc_liteide/liteidex/src/plugins/dlvdebugger/dlvdebugger_global.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: dlvdebugger_global.h // Creator: visualfc <visualfc@gmail.com> #ifndef DLVDEBUGGER_GLOBAL_H #define DLVDEBUGGER_GLOBAL_H #include <QtCore/qglobal.h> #if defined(GDBDEBUGER_LIBRARY) # define GDBDEBUGERSHARED_EXPORT Q_DECL_EXPORT #else # define GDBDEBUGERSHARED_EXPORT Q_DECL_IMPORT #endif #define OPTION_DLVDEBUGGER "option/dlvdebugger" #define DLVDEBUGGER_EXTFLAGS "dlvdebugger/extflags" #define DLVDEBUGGER_ASMSYNTAX "dlvdebugger/asmsyntax" #endif // DLVDEBUGGER_GLOBAL_H
1,498
C++
.h
34
42.911765
82
0.70939
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,767
dlvdebuggeroptionfactory.h
visualfc_liteide/liteidex/src/plugins/dlvdebugger/dlvdebuggeroptionfactory.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: dlvdebuggeroptionfactory.h // Creator: visualfc <visualfc@gmail.com> #ifndef DLVDEBUGGEROPTIONFACTORY_H #define DLVDEBUGGEROPTIONFACTORY_H #include "liteapi/liteapi.h" class DlvDebuggerOptionFactory : public LiteApi::IOptionFactory { public: DlvDebuggerOptionFactory(LiteApi::IApplication *app, QObject *parent); virtual QStringList mimeTypes() const; virtual LiteApi::IOption *create(const QString &mimeType); protected: LiteApi::IApplication *m_liteApp; }; #endif // DLVDEBUGGEROPTIONFACTORY_H
1,534
C++
.h
35
42.257143
82
0.707023
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,768
dlvdebuggeroption.h
visualfc_liteide/liteidex/src/plugins/dlvdebugger/dlvdebuggeroption.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: dlvdebuggeroption.h // Creator: visualfc <visualfc@gmail.com> #ifndef DLVDEBUGGEROPTION_H #define DLVDEBUGGEROPTION_H #include "liteapi/liteapi.h" namespace Ui { class DlvDebuggerOption; } class DlvDebuggerOption : public LiteApi::IOption { Q_OBJECT public: explicit DlvDebuggerOption(LiteApi::IApplication *app, QObject *parent = 0); ~DlvDebuggerOption(); virtual QWidget *widget(); virtual QString name() const; virtual QString mimeType() const; virtual void load(); virtual void save(); private: LiteApi::IApplication *m_liteApp; QWidget *m_widget; Ui::DlvDebuggerOption *ui; }; bool isGdbDebuggerUseTty(LiteApi::IApplication *app); #endif // DLVDEBUGGEROPTION_H
1,751
C++
.h
46
35.869565
82
0.690813
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,769
dlvrpcdebugger.h
visualfc_liteide/liteidex/src/plugins/dlvdebugger/dlvrpcdebugger.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2018 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: dlvrpcdebugger.h // Creator: visualfc <visualfc@gmail.com> #ifndef DLVRPCDEBUGGER_H #define DLVRPCDEBUGGER_H #include "litedebugapi/litedebugapi.h" #include "liteenvapi/liteenvapi.h" #include "litettyapi/litettyapi.h" #include "qtc_gdbmi/gdbmi.h" #include "dlvclient/dlvclient.h" #include <QSet> class QProcess; class LiteProcess; class Process; class GdbHandleState { public: GdbHandleState() : m_exited(false),m_stopped(false) {} void clear() { m_reason.clear(); m_exited = false; m_stopped = false; } void setExited(bool b) {m_exited = b;} void setStopped(bool b) {m_stopped = b;} void setReason(const QByteArray &reason) { m_reason = reason; } bool exited() const { return m_exited; } bool stopped() const { return m_stopped; } QByteArray reason() const { return m_reason; } public: bool m_exited; bool m_stopped; QByteArray m_reason; }; class QStandardItemModel; class QStandardItem; struct funcDecl { funcDecl() { clear(); } void clear() { fileName.clear();; funcName.clear(); start = -1; end = -1; } QString fileName; QString funcName; int start; int end; }; class DlvRpcDebugger : public LiteApi::IDebugger { Q_OBJECT public: DlvRpcDebugger(LiteApi::IApplication *app, QObject *parent = 0); ~DlvRpcDebugger(); enum VarItemDataRole{ VarNameRole = Qt::UserRole + 1, VarNumChildRole, VarExpanded }; public: virtual QString mimeType() const; virtual QAbstractItemModel *debugModel(LiteApi::DEBUG_MODEL_TYPE type); virtual void setWorkingDirectory(const QString &dir); virtual void setEnvironment (const QStringList &environment); virtual bool start(const QString &cmd, const QString &arguments); virtual void stop(); virtual bool isRunning(); virtual void stepOver(); virtual void stepInto(); virtual void stepOut(); virtual void continueRun(); virtual void runToLine(const QString &fileName, int line); virtual void command(const QByteArray &cmd); virtual void enterAppText(const QString &text); virtual void enterDebugText(const QString &text); virtual void expandItem(QModelIndex index, LiteApi::DEBUG_MODEL_TYPE type); virtual void setInitBreakTable(const QMultiMap<QString,int> &bks); virtual void setInitWatchList(const QStringList &names); virtual void insertBreakPoint(const QString &fileName, int line); virtual void removeBreakPoint(const QString &fileName, int line); bool findBreakPoint(const QString &fileName,int line); public: virtual void createWatch(const QString &var); virtual void removeWatch(const QString &value); virtual void removeAllWatch(); virtual void dbclickItem(QModelIndex index, LiteApi::DEBUG_MODEL_TYPE type); void gotoFileByIndex(const QStandardItemModel *model, QModelIndex index, int file, int line); protected: void insertBreakPointHelper(const QString &fileName, int line, bool force); void removeBreakPointHelper(const QString &fileName, int line, bool force); void command_helper(const QByteArray &cmd, bool force); void updateWatch(int id); void updateVariable(int id); void updateStackframe(int id); void updateThreads(const QList<Thread> &ths); void updateGoroutines(); void updateAsm(int id, quint64 pc); void updateRegisters(int threadid, bool includeFp); void updateVariableHelper(const QList<Variable> &vars, QStandardItemModel *model, QStandardItem *parent, const QString &parentName, int flag, QMap<QString,QString> &saveMap, const QMap<QString,QString> &checkMap); public slots: void appLoaded(); void readStdError(); void readStdOutput(); void finished(int); void error(QProcess::ProcessError); void readTty(const QByteArray &data); void headlessReadStdError(); void headlessReadStdOutput(); void headlessFinished(int); void headlessError(QProcess::ProcessError err); void clientCommandSuccess(const QString &method, const DebuggerState &state, const QVariant &jsonData); void updateState(const DebuggerState &state, const QVariant &jsonData); void watchItemChanged(QStandardItem* item); protected: void handleResponse(const QByteArray &buff); protected: void cleanup(); void clear(); void initDebug(); protected: QString m_lastFileName; int m_lastFileLine; LiteApi::IApplication *m_liteApp; LiteApi::IEnvManager *m_envManager; QMap<QString,QString> m_watchNameMap; QStringList m_updateCmdList; QStringList m_updateCmdHistroy; QString m_lastCmd; QString m_processId; LiteProcess *m_process; Process *m_headlessProcess; DlvClient *m_dlvClient; QStandardItemModel *m_asyncModel; QStandardItemModel *m_varsModel; QStandardItemModel *m_watchModel; QStandardItemModel *m_framesModel; QStandardItemModel *m_threadsModel; QStandardItemModel *m_goroutinesModel; QStandardItemModel *m_registersModel; QStandardItemModel *m_asmModel; QStandardItem *m_asyncItem; QStandardItem *m_varsItem; QMap<QString,QString> m_checkVarsMap; QMap<QString,QString> m_checkWatchMap; QMap<QString,QString> m_checkRegsMap; QList<QString> m_watchList; QMap<QString,QStandardItem*> m_nameItemMap; QSet<QStandardItem*> m_varChangedItemList; QString m_dlvFilePath; QString m_runtimeFilePath; QByteArray m_inbuffer; GdbHandleState m_handleState; QMultiMap<QString,int> m_initBks; QMap<QString,QString> m_locationBkMap; QList<QByteArray> m_cmdList; QList<QByteArray> m_dlvRunningCmdList; bool m_readDataBusy; bool m_writeDataBusy; bool m_dlvInit; bool m_dlvExit; bool m_headlessInitAddress; }; #endif // DLVRPCDEBUGGER_H
6,988
C++
.h
188
33.047872
217
0.708671
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,770
dlvdebuggerplugin.h
visualfc_liteide/liteidex/src/plugins/dlvdebugger/dlvdebuggerplugin.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: dlvdebuggerplugin.h // Creator: visualfc <visualfc@gmail.com> #ifndef DLVDEBUGGERPLUGIN_H #define DLVDEBUGGERPLUGIN_H #include "dlvdebugger_global.h" #include "liteapi/liteapi.h" #include <QtPlugin> class DlvDebuggerPlugin : public LiteApi::IPlugin { Q_OBJECT public: DlvDebuggerPlugin(); virtual bool load(LiteApi::IApplication *app); virtual QStringList dependPluginList() const; }; class PluginFactory : public LiteApi::PluginFactoryT<DlvDebuggerPlugin> { Q_OBJECT Q_INTERFACES(LiteApi::IPluginFactory) #if QT_VERSION >= 0x050000 Q_PLUGIN_METADATA(IID "liteidex.DlvDebuggerPlugin") #endif public: PluginFactory() { m_info->setId("plugin/DlvDebugger"); m_info->setName("DlvDebugger"); m_info->setAuthor("visualfc"); m_info->setVer("X38.2"); m_info->setInfo("Core Delve Debugger"); m_info->setMustLoad(true); } }; #endif // DLVDEBUGGERPLUGIN_H
1,956
C++
.h
54
33.5
82
0.687401
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,771
golangpackageoptionfactory.h
visualfc_liteide/liteidex/src/plugins/golangpackage/golangpackageoptionfactory.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: golangpackageoptionfactory.h // Creator: visualfc <visualfc@gmail.com> #ifndef GOLANGPACKAGEOPTIONFACTORY_H #define GOLANGPACKAGEOPTIONFACTORY_H #include "liteapi/liteapi.h" class GolangPackageOptionFactory : public LiteApi::IOptionFactory { public: GolangPackageOptionFactory(LiteApi::IApplication *app, QObject *parent); virtual QStringList mimeTypes() const; virtual LiteApi::IOption *create(const QString &mimeType); protected: LiteApi::IApplication *m_liteApp; }; #endif // GOLANGPACKAGEOPTIONFACTORY_H
1,547
C++
.h
35
42.628571
82
0.708886
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,772
gotool.h
visualfc_liteide/liteidex/src/plugins/golangpackage/gotool.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: gotool.h // Creator: visualfc <visualfc@gmail.com> #ifndef GOTOOL_H #define GOTOOL_H #include "liteapi/liteapi.h" #include "liteenvapi/liteenvapi.h" #include <QProcess> inline QStringList liteGopath(LiteApi::IApplication *app) { QStringList pathList; QStringList list = app->settings()->value("liteide/gopath").toStringList(); foreach(QString path, list) { pathList.append(QDir::toNativeSeparators(path)); } pathList.removeDuplicates(); return pathList; } inline void setLiteGopath(LiteApi::IApplication *app, const QStringList &pathList) { app->settings()->setValue("liteide/gopath",pathList); } inline QStringList sysGopath(LiteApi::IApplication *app) { QProcessEnvironment env = LiteApi::getSysEnvironment(app); // QString goroot = env.value("GOROOT"); QStringList pathList; #ifdef Q_OS_WIN QString sep = ";"; #else QString sep = ":"; #endif foreach (QString path, env.value("GOPATH").split(sep,qtSkipEmptyParts)) { pathList.append(QDir::toNativeSeparators(path)); } pathList.removeDuplicates(); return pathList; } class Process; class GoTool : public QObject { Q_OBJECT public: explicit GoTool(LiteApi::IApplication *app,QObject *parent = 0); virtual ~GoTool(); void setProcessEnvironment(const QProcessEnvironment &environment); void setLiteGopath(const QStringList &pathList); void kill(); void setWorkDir(const QString &dir); QString workDir() const; void start_list_json(); QByteArray stdOutputData() const { return m_stdOutput; } QString stdOutputUtf8() const { return QString::fromUtf8(m_stdOutput,m_stdOutput.size()); } QByteArray stdError() const { return m_stdError; } signals: void error(QProcess::ProcessError); void finished(int,QProcess::ExitStatus); protected slots: void readError(); void readOutput(); protected: LiteApi::IApplication *m_liteApp; Process *m_process; QByteArray m_stdOutput; QByteArray m_stdError; }; #endif // GOTOOL_H
3,054
C++
.h
88
31.704545
82
0.703178
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,773
filepathmodel.h
visualfc_liteide/liteidex/src/plugins/golangpackage/filepathmodel.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: filepathmodel.h // Creator: visualfc <visualfc@gmail.com> #ifndef FILEPATHMODEL_H #define FILEPATHMODEL_H #include <QAbstractItemModel> #include <QStringList> #include <QIcon> #include <QFileInfo> #include <QDir> class FilePathModel; class PathNode { public: PathNode(FilePathModel *model); PathNode(FilePathModel *model,const QString &path, PathNode *parent); ~PathNode(); PathNode* parent(); PathNode* child(int row); int childCount(); int row() const; QList<PathNode*>* children(); QString path() const; QString text() const; QFileInfo fileInfo() const; bool isDir() const; bool isFile() const; void clear(); void reload(); PathNode *findPath(const QString &path); protected: FilePathModel *m_model; PathNode *m_parent; QList<PathNode*> *m_children; QString m_path; QString m_text; }; class QFileIconProvider; class QFileSystemWatcher; class QTreeView; class FilePathModel : public QAbstractItemModel { Q_OBJECT public: explicit FilePathModel(QObject *parent = 0); ~FilePathModel(); void setFilter(QDir::Filters filters); void setSort(QDir::SortFlags flags); QDir::Filters filter() const; QDir::SortFlags sort() const; void setRootPathList(const QStringList &pathList); void setRootPath(const QString &path); QList<QModelIndex> findPaths(const QString &path) const; QModelIndex findPath(const QString &path) const; QString filePath(const QModelIndex &index) const; PathNode *nodeFromIndex(const QModelIndex &index) const; void setStartIndex(const QModelIndex &index); void setStartPath(const QString &path); QModelIndex startIndex() const; QString startPath() const; virtual int rowCount(const QModelIndex &parent = QModelIndex()) const; virtual int columnCount(const QModelIndex &parent = QModelIndex()) const; virtual QModelIndex parent(const QModelIndex &child) const; virtual QModelIndex index(int row, int column,const QModelIndex &parent = QModelIndex()) const; virtual QVariant data(const QModelIndex &index, int role) const; QFileSystemWatcher* fileWatcher() const; public slots: void directoryChanged(const QString&); protected: QModelIndex findPathHelper(const QString &path, const QModelIndex &parentIndex) const; QStringList m_pathList; PathNode *m_rootNode; QString m_startPath; QFileIconProvider *m_iconProvider; QFileSystemWatcher *m_fileWatcher; QTreeView *m_treeView; QDir::Filters m_filters; QDir::SortFlags m_sorts; }; #endif // FILEPATHMODEL_H
3,608
C++
.h
99
33.212121
99
0.718607
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,774
golangpackage_global.h
visualfc_liteide/liteidex/src/plugins/golangpackage/golangpackage_global.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: golangpackage_global.h // Creator: visualfc <visualfc@gmail.com> #ifndef GOLANGPACKAGE_GLOBAL_H #define GOLANGPACKAGE_GLOBAL_H #include <QtCore/qglobal.h> #if defined(GOLANGPACKAGE_LIBRARY) # define GOLANGPACKAGESHARED_EXPORT Q_DECL_EXPORT #else # define GOLANGPACKAGESHARED_EXPORT Q_DECL_IMPORT #endif #define LITEIDE_USESYSGOPATH "liteide/usesysgopath" #define LITEIDE_USELITEIDEGOPATH "liteide/uselitegopath" #define LITEIDE_CUSTOMGO111MODULE "liteide/use111gomodule" #define LITEIDE_GO111MODULE "liteide/go111module" #define LITEIDE_USEGOPROXY "liteide/usegoproxy" #define LITEIDE_GOPROXY "liteide/goproxy" #define LITEIDE_USEGOPRIVATE "liteide/usegoprivate" #define LITEIDE_GOPRIVATE "liteide/goprivate" #define LITEIDE_USEGONOPROXY "liteide/usegonoproxy" #define LITEIDE_GONOPROXY "liteide/gonoproxy" #define LITEIDE_USEGONOSUMDB "liteide/usegonosumdb" #define LITEIDE_GONOSUMDB "liteide/gonosumdb" #endif // GOLANGPACKAGE_GLOBAL_H
1,964
C++
.h
43
44.534884
82
0.745692
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,775
packageproject.h
visualfc_liteide/liteidex/src/plugins/golangpackage/packageproject.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: packageproject.h // Creator: visualfc <visualfc@gmail.com> #ifndef PACKAGEPROJECT_H #define PACKAGEPROJECT_H #include "liteapi/liteapi.h" #include "packagetree.h" #include "packagebrowser.h" #include <QModelIndex> #include <QProcess> class QTreeView; class FilePathModel; class QStandardItemModel; class QStandardItem; class QDir; class GoTool; class PackageProject : public LiteApi::IProject { Q_OBJECT public: enum { ITEM_NONE = 0, ITEM_SOURCE = 1 }; enum { RoleItem = Qt::UserRole+1, RolePath }; public: PackageProject(LiteApi::IApplication *app); ~PackageProject(); static void loadProject(LiteApi::IApplication *app, const QString &path); void setPath(const QString &path); void setJson(const QMap<QString,QVariant> &json); virtual QWidget *widget(); virtual QString name() const; virtual QString filePath() const; virtual QString mimeType() const; virtual QStringList folderList() const; virtual QStringList fileNameList() const; virtual QStringList filePathList() const; virtual QString fileNameToFullPath(const QString &filePath); virtual QMap<QString,QString> targetInfo() const; virtual void load(); public slots: void reload(); void finished(int,QProcess::ExitStatus); void doubleClicked(QModelIndex); void editorSaved(LiteApi::IEditor*); void addSource(); void openExplorer(); void customContextMenuRequested(QPoint); protected: LiteApi::IApplication *m_liteApp; QWidget *m_widget; QMenu *m_contextMenu; PackageTree *m_treeView; QMap<QString,QVariant> m_json; GoTool *m_goTool; QTimer *m_reloadTimer; QString m_filePath; }; #endif // PACKAGEPROJECT_H
2,775
C++
.h
82
30.682927
82
0.698661
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,776
packageprojectfactory.h
visualfc_liteide/liteidex/src/plugins/golangpackage/packageprojectfactory.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: packageprojectfactory.h // Creator: visualfc <visualfc@gmail.com> #ifndef PACKAGEPROJECTFACTORY_H #define PACKAGEPROJECTFACTORY_H #include "liteapi/liteapi.h" #include "packagebrowser.h" class PackageProjectFactory : public LiteApi::IProjectFactory { public: PackageProjectFactory(LiteApi::IApplication *app, QObject *parnet); virtual QStringList mimeTypes() const; virtual LiteApi::IProject *open(const QString &fileName, const QString &mimeType); virtual bool findTargetInfo(const QString &fileName, const QString &mimetype, QMap<QString,QString>& targetInfo) const; public: LiteApi::IApplication *m_liteApp; QStringList m_mimeTypes; }; #endif // PACKAGEPROJECTFACTORY_H
1,720
C++
.h
38
43.526316
124
0.713349
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,777
golangpackageoption.h
visualfc_liteide/liteidex/src/plugins/golangpackage/golangpackageoption.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: golangpackageoption.h // Creator: visualfc <visualfc@gmail.com> #ifndef SETUPGOPATHDIALOG_H #define SETUPGOPATHDIALOG_H #include <QDialog> #include "liteapi/liteapi.h" namespace Ui { class GolangPackageOption; } enum ENUM_GO_PRIVATE{ GO_PRIVATE = 0, GO_NOPROXY = 1, GO_NOSUMDB = 2, }; class GolangPackageOption : public LiteApi::IOption { Q_OBJECT public: explicit GolangPackageOption(LiteApi::IApplication *app, QObject *parent = 0); ~GolangPackageOption(); void setSysPathList(const QStringList &litePathList); void setLitePathList(const QStringList &litePathList); void setUseSysGopath(bool b); bool isUseSysGopath() const; void setUseLiteGopath(bool b); bool isUseLiteGopath() const; void setUseGoModule(bool b); bool isUseGoModule() const; void setSysGoModuleInfo(const QString &value); void setGo111Module(const QString &value); QString go111Module() const; QStringList litePathList() const; void setUseGoProxy(bool b); bool isUseGoProxy() const; void setGoProxy(const QString &v); QString goProxy() const; void setUseGoPrivate(ENUM_GO_PRIVATE id, bool b); bool isUseGoPrivate(ENUM_GO_PRIVATE id) const; void setGoPrivate(ENUM_GO_PRIVATE id, const QString &value); QString goPrivate(ENUM_GO_PRIVATE id) const; public: virtual QString name() const; virtual QString mimeType() const; virtual void save(); virtual void load(); virtual QWidget *widget(); protected slots: void browser(); private: LiteApi::IApplication *m_liteApp; Ui::GolangPackageOption *ui; QWidget *m_widget; }; #endif // SETUPGOPATHDIALOG_H
2,683
C++
.h
74
33.216216
82
0.707533
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,778
packagetree.h
visualfc_liteide/liteidex/src/plugins/golangpackage/packagetree.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: packagetree.h // Creator: visualfc <visualfc@gmail.com> #ifndef PACKAGETREE_H #define PACKAGETREE_H #include "symboltreeview/symboltreeview.h" class QStandardItemModel; class QStandardItem; class PackageTree : public SymbolTreeView { Q_OBJECT public: explicit PackageTree(QWidget *parent = 0); void loadJson(const QMap<QString,QVariant> &json); public: QStandardItem *root; QStandardItem *src; QStandardItem *imports; QStandardItem *deps; QStandardItemModel *model; QStringList fileList; QStringList nameList; }; #endif // PACKAGETREE_H
1,599
C++
.h
43
35.162791
82
0.697809
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,779
golangpackageplugin.h
visualfc_liteide/liteidex/src/plugins/golangpackage/golangpackageplugin.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: golangpackageplugin.h // Creator: visualfc <visualfc@gmail.com> #ifndef GOLANGPACKAGEPLUGIN_H #define GOLANGPACKAGEPLUGIN_H #include "golangpackage_global.h" #include "liteapi/liteapi.h" #include <QtPlugin> class GolangPackagePlugin : public LiteApi::IPlugin { Q_OBJECT public: GolangPackagePlugin(); virtual bool load(LiteApi::IApplication *app); }; class PluginFactory : public LiteApi::PluginFactoryT<GolangPackagePlugin> { Q_OBJECT Q_INTERFACES(LiteApi::IPluginFactory) #if QT_VERSION >= 0x050000 Q_PLUGIN_METADATA(IID "liteidex.GolangPackagePlugin") #endif public: PluginFactory() { m_info->setId("plugin/GolangPackage"); m_info->setName("GolangPackage"); m_info->setAuthor("visualfc"); m_info->setVer("X36.3"); m_info->setMustLoad(true); m_info->setInfo("Golang Packages Browser"); m_info->appendDepend("plugin/liteenv"); } }; #endif // GOLANGPACKAGEPLUGIN_H
1,976
C++
.h
53
34.528302
82
0.688738
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,780
packagebrowser.h
visualfc_liteide/liteidex/src/plugins/golangpackage/packagebrowser.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: packagebrowser.h // Creator: visualfc <visualfc@gmail.com> #ifndef PACKAGEBROWSER_H #define PACKAGEBROWSER_H #include "liteapi/liteapi.h" #include "liteenvapi/liteenvapi.h" #include "symboltreeview/symboltreeview.h" #include "gotool.h" class QTreeView; namespace PackageType { enum ITEM_TYPE{ ITEM_NONE = 0, ITEM_PACKAGE, ITEM_SOURCE, ITEM_IMPORT, ITEM_DEP }; enum Role_Type{ RoleItem = Qt::UserRole+1, RoleImportPath, RoleDir }; } class QStandardItemModel; class PackageBrowser : public QObject { Q_OBJECT public: explicit PackageBrowser(LiteApi::IApplication *app, QObject *parent = 0); ~PackageBrowser(); signals: public slots: void toggledToolWindow(bool); void currentEnvChanged(LiteApi::IEnv*); void reloadAll(); void setupGopath(); void loadPackageDoc(); void loadPackageInNewWindow(); void addPackageToFolders(); void finished(int,QProcess::ExitStatus); void error(QProcess::ProcessError); void customContextMenuRequested(QPoint); void doubleClicked(); void enterKeyPressed(const QModelIndex &index); void resetTree(const QByteArray &jsonData); void copyPackageName(); void fileWizardFinished(const QString &type, const QString &scheme, const QString &location); protected: bool loadPackageFolderHelper(QModelIndex index, bool add = false); protected: QMap<QString,QString> m_modPkgMap; LiteApi::IApplication *m_liteApp; QWidget *m_widget; SymbolTreeView *m_treeView; QStandardItemModel *m_model; GoTool *m_goTool; bool m_groupByPath; bool m_hideStandard; QMenu *m_rootMenu; QMenu *m_pkgMenu; QMenu *m_fileMenu; QAction *m_reloadAct; QAction *m_setupGopathAct; QAction *m_godocAct; QAction *m_loadPackageInNewWindowAct; QAction *m_addToFoldersAct; QAction *m_openSrcAct; QAction *m_copyNameAct; QAction *m_toolWindowAct; QMap<QString,QVariant> m_pkgJson; bool m_bLoaded; }; #endif // PACKAGEBROWSER_H
3,166
C++
.h
93
30.344086
97
0.679713
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,781
liteshellplugin.h
visualfc_liteide/liteidex/src/plugins/liteshell/liteshellplugin.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2013 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: liteshellplugin.h // Creator: visualfc <visualfc@gmail.com> #ifndef LITESHELLPLUGIN_H #define LITESHELLPLUGIN_H #include "liteshell_global.h" #include "liteapi.h" #include <QtPlugin> class LiteShellPlugin : public LiteApi::IPlugin { Q_OBJECT Q_INTERFACES(LiteApi::IPlugin) public: LiteShellPlugin(); virtual bool initWithApp(LiteApi::IApplication *app); }; #endif // LITESHELLPLUGIN_H
1,423
C++
.h
36
37.972222
82
0.689082
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,782
liteshell_global.h
visualfc_liteide/liteidex/src/plugins/liteshell/liteshell_global.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2013 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: liteshell_global.h // Creator: visualfc <visualfc@gmail.com> #ifndef LITESHELL_GLOBAL_H #define LITESHELL_GLOBAL_H #include <QtCore/qglobal.h> #if defined(LITESHELL_LIBRARY) # define LITESHELLSHARED_EXPORT Q_DECL_EXPORT #else # define LITESHELLSHARED_EXPORT Q_DECL_IMPORT #endif #endif // LITESHELL_GLOBAL_H
1,332
C++
.h
31
41.83871
82
0.689283
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,783
golangplay_global.h
visualfc_liteide/liteidex/src/plugins/golangplay/golangplay_global.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: golangplay_global.h // Creator: visualfc <visualfc@gmail.com> #ifndef GOLANGPLAY_GLOBAL_H #define GOLANGPLAY_GLOBAL_H #include <QtCore/qglobal.h> #if defined(GOLANGPLAY_LIBRARY) # define GOLANGPLAYSHARED_EXPORT Q_DECL_EXPORT #else # define GOLANGPLAYSHARED_EXPORT Q_DECL_IMPORT #endif #endif // GOLANGPLAY_GLOBAL_H
1,339
C++
.h
31
42.064516
82
0.690951
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
21,784
goplaybrowser.h
visualfc_liteide/liteidex/src/plugins/golangplay/goplaybrowser.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: goplaybrowser.h // Creator: visualfc <visualfc@gmail.com> #ifndef GOPLAYBROWSER_H #define GOPLAYBROWSER_H #include "liteapi/liteapi.h" class QPlainTextEdit; class ProcessEx; class TextOutput; class QTextCodec; class QLabel; class GoplayBrowser : public LiteApi::IBrowserEditor { Q_OBJECT public: GoplayBrowser(LiteApi::IApplication *app, QObject *parent); virtual ~GoplayBrowser(); virtual QWidget *widget(); virtual QString name() const; virtual QString mimeType() const; virtual void onActive(); public slots: void run(); void stop(); void newPlay(); void loadPlay(); void savePlay(); void shell(); void runOutput(const QByteArray &data,bool); void runFinish(bool,int,const QString &msg); void runStarted(); protected: LiteApi::IApplication *m_liteApp; QWidget *m_widget; LiteApi::IEditor *m_editor; TextOutput *m_output; ProcessEx *m_process; QTextCodec *m_codec; QLabel *m_editLabel; QString m_dataPath; QString m_playFile; QString m_editFile; }; #endif // GOPLAYBROWSER_H
2,163
C++
.h
63
31.619048
82
0.670802
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,785
golangplayplugin.h
visualfc_liteide/liteidex/src/plugins/golangplay/golangplayplugin.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: golangplayplugin.h // Creator: visualfc <visualfc@gmail.com> #ifndef GOLANGPLAYPLUGIN_H #define GOLANGPLAYPLUGIN_H #include "golangplay_global.h" #include "liteapi/liteapi.h" #include <QtPlugin> class GolangPlayPlugin : public LiteApi::IPlugin { Q_OBJECT public: GolangPlayPlugin(); virtual bool load(LiteApi::IApplication *app); }; class PluginFactory : public LiteApi::PluginFactoryT<GolangPlayPlugin> { Q_OBJECT Q_INTERFACES(LiteApi::IPluginFactory) #if QT_VERSION >= 0x050000 Q_PLUGIN_METADATA(IID "liteidex.GolangPlayPlugin") #endif public: PluginFactory() { m_info->setId("plugin/golangplay"); m_info->setName("GolangPlay"); m_info->setAuthor("visualfc"); m_info->setVer("X38.1"); m_info->setInfo("Golang Playground"); m_info->appendDepend("plugin/liteeditor"); m_info->appendDepend("plugin/golangedit"); } }; #endif // GOLANGPLAYPLUGIN_H
1,956
C++
.h
53
34.150943
82
0.684405
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,786
litetty_global.h
visualfc_liteide/liteidex/src/plugins/litetty/litetty_global.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: litetty_global.h // Creator: visualfc <visualfc@gmail.com> #ifndef LITETTY_GLOBAL_H #define LITETTY_GLOBAL_H #include <QtCore/qglobal.h> #if defined(LITETTY_LIBRARY) # define LITETTYSHARED_EXPORT Q_DECL_EXPORT #else # define LITETTYSHARED_EXPORT Q_DECL_IMPORT #endif #endif // LITETTY_GLOBAL_H
1,318
C++
.h
31
41.387097
82
0.685892
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
21,787
sockettty.h
visualfc_liteide/liteidex/src/plugins/litetty/sockettty.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: sockettty.h // Creator: visualfc <visualfc@gmail.com> #ifndef SOCKETTTY_H #define SOCKETTTY_H #include "litettyapi/litettyapi.h" class QLocalServer; class QLocalSocket; class SocketTty : public LiteApi::ITty { Q_OBJECT public: explicit SocketTty(QObject *parent = 0); virtual ~SocketTty(); virtual QString serverName() const; virtual QString errorString() const; virtual bool listen(); virtual void shutdown(); virtual void write(const QByteArray &data); public slots: void newConnectionAvailable(); void bytesAvailable(); protected: QLocalServer *m_server; QLocalSocket *m_socket; }; #endif // SOCKETTTY_H
1,677
C++
.h
46
34.326087
82
0.690842
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,788
litettyplugin.h
visualfc_liteide/liteidex/src/plugins/litetty/litettyplugin.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: litettyplugin.h // Creator: visualfc <visualfc@gmail.com> #ifndef LITETTYPLUGIN_H #define LITETTYPLUGIN_H #include "litetty_global.h" #include "liteapi/liteapi.h" class LiteTtyPlugin : public LiteApi::IPlugin { Q_OBJECT public: LiteTtyPlugin(); virtual bool load(LiteApi::IApplication *app); }; class PluginFactory : public LiteApi::PluginFactoryT<LiteTtyPlugin> { Q_OBJECT Q_INTERFACES(LiteApi::IPluginFactory) #if QT_VERSION >= 0x050000 Q_PLUGIN_METADATA(IID "liteidex.LiteTtyPlugin") #endif public: PluginFactory() { m_info->setId("plugin/LiteTty"); m_info->setVer("X19"); m_info->setName("LiteTty"); m_info->setAuthor("visualfc"); m_info->setInfo("LiteIDE tty Util"); //m_info->appendDepend("plugin/liteenv"); } }; #endif // LITETTYPLUGIN_H
1,849
C++
.h
51
33.568627
82
0.676339
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,789
litetty.h
visualfc_liteide/liteidex/src/plugins/litetty/litetty.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: litetty.h // Creator: visualfc <visualfc@gmail.com> #ifndef LITETTY_H #define LITETTY_H #include <litettyapi/litettyapi.h> class LiteTty : public LiteApi::ILiteTty { Q_OBJECT public: explicit LiteTty(QObject *parent = 0); virtual LiteApi::ITty* createTty(QObject *parent) const; }; #endif // LITETTY_H
1,335
C++
.h
33
39
82
0.676674
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,790
fifotty.h
visualfc_liteide/liteidex/src/plugins/litetty/fifotty.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2019 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: fifotty.h // Creator: visualfc <visualfc@gmail.com> #ifndef FIFOTTY_H #define FIFOTTY_H #include "litettyapi/litettyapi.h" class QSocketNotifier; class FiFoTty : public LiteApi::ITty { Q_OBJECT public: FiFoTty(QObject *parent); virtual ~FiFoTty(); virtual QString serverName() const; virtual QString errorString() const; virtual bool listen(); virtual void shutdown(); virtual void write(const QByteArray &data); public slots: void bytesAvailable(); protected: QString m_serverPath; int m_serverFd; QSocketNotifier *m_serverNotifier; QString m_errorString; }; #endif // FIFOTTY_H
1,654
C++
.h
46
33.73913
82
0.687032
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,791
bookmarkmodel.h
visualfc_liteide/liteidex/src/plugins/bookmarks/bookmarkmodel.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2017 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: bookmarkmodel.h // Creator: visualfc <visualfc@gmail.com> #ifndef BOOKMARKMODEL_H #define BOOKMARKMODEL_H #include <QAbstractItemModel> #include <QSortFilterProxyModel> #include <QStyledItemDelegate> #include <QList> #include <QFileInfo> #include <QDir> #include "liteeditorapi/liteeditorapi.h" class BookmarkNode { public: BookmarkNode() : m_lineNumber(-1) { } public: void setFilePath(const QString &filePath) { m_filePath = QDir::toNativeSeparators(filePath); m_fileName = QFileInfo(m_filePath).fileName(); } void setLineNumber(int lineNumber) { m_lineNumber = lineNumber; } void setLineText(const QString &text) { m_lineText = text; m_lineText.replace("\t"," "); } void setNodeText(const QString &node) { m_nodeText = node; } public: QString fileName() const { return m_fileName; } QString filePath() const { return m_filePath; } int lineNumber() const { return m_lineNumber; } QString lineText() const { return m_lineText; } QString noteText() const { return m_nodeText; } protected: int m_lineNumber; QString m_filePath; QString m_fileName; QString m_lineText; QString m_nodeText; }; class BookmarkModel : public QAbstractItemModel { Q_OBJECT public: enum Roles { FileName = Qt::UserRole, LineNumber = Qt::UserRole + 1, FilePath = Qt::UserRole + 2, LineText = Qt::UserRole + 3, Note = Qt::UserRole + 4 }; void addNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node); void removeNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node); void updateNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node); BookmarkNode *createBookmarkNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node) const; BookmarkNode *bookmarkNodeForIndex(const QModelIndex &index) const; BookmarkNode *findBookmarkNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node) const; public: explicit BookmarkModel(QObject *parent = 0); // Basic functionality: QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; QModelIndex parent(const QModelIndex &index) const; int rowCount(const QModelIndex &parent = QModelIndex()) const; int columnCount(const QModelIndex &parent = QModelIndex()) const; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; private: QList<BookmarkNode*> m_nodeList; QMap<LiteApi::IEditorMarkNode*, BookmarkNode*> m_nodeMap; }; class BookmarkSortProxyModel : public QSortFilterProxyModel { public: explicit BookmarkSortProxyModel(QObject *parent = 0) : QSortFilterProxyModel(parent) { } virtual bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const { QString leftPath = source_left.data(BookmarkModel::FilePath).toString(); QString rightPath = source_right.data(BookmarkModel::FilePath).toString(); if (leftPath == rightPath) { int leftNumber = source_left.data(BookmarkModel::LineNumber).toInt(); int rightNumber = source_right.data(BookmarkModel::LineNumber).toInt(); return leftNumber < rightNumber; } return leftPath < rightPath; } }; class BookmarkDelegate : public QStyledItemDelegate { Q_OBJECT public: BookmarkDelegate(QObject *parent = 0); private: void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; void generateGradientPixmap(int width, int height, const QColor &color, bool selected) const; mutable QPixmap m_normalPixmap; mutable QPixmap m_selectedPixmap; }; #endif // BOOKMARKMODEL_H
5,151
C++
.h
145
29.951724
104
0.67276
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,792
bookmarkmanager.h
visualfc_liteide/liteidex/src/plugins/bookmarks/bookmarkmanager.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2017 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: bookmarkmanager.h // Creator: visualfc <visualfc@gmail.com> #ifndef BOOKMARKMANAGER_H #define BOOKMARKMANAGER_H #include "liteapi/liteapi.h" #include "liteeditorapi/liteeditorapi.h" #include "symboltreeview/symboltreeview.h" #include "bookmarkmodel.h" #include <QSortFilterProxyModel> enum BOOKMARK_EDITOR_MARKTYPE { BookMarkType = 1000 }; class QTreeView; class BookmarkManager : public LiteApi::IManager { Q_OBJECT public: BookmarkManager(QObject *parent = 0); virtual ~BookmarkManager(); virtual bool initWithApp(LiteApi::IApplication *app); public slots: void editorCreated(LiteApi::IEditor *editor); void editorAboutToClose(LiteApi::IEditor *editor); void toggledBookmark(); void editorMarkListChanged(LiteApi::IEditorMark *mark, int type); void editorMarkNodeCreated(LiteApi::IEditorMark *mark,LiteApi::IEditorMarkNode *node); void editorMarkNodeRemoved(LiteApi::IEditorMark *mark,LiteApi::IEditorMarkNode *node); void editorMarkNodeChanged(LiteApi::IEditorMark *mark,LiteApi::IEditorMarkNode *node); void gotoBookmark(const QModelIndex &index); void contextMenuRequested(QPoint pt); void gotoBookmarkAction(); void removeBookmarkAction(); void removeFileBookmarksAction(); void removeAllFileBookmarksAction(); protected: void removeFileBookmarks(const QString &filePath); protected: QAction *m_toggleBookmarkAct; BookmarkModel *m_bookmarkModel; BookmarkSortProxyModel *m_proxyModel; SymbolTreeView *m_treeView; QAction *m_gotoBookmarkAct; QAction *m_removeBookmarkAct; QAction *m_removeFileBookmaraksAct; QAction *m_removeAllFileBookmarksAct; QMenu *m_contextMenu; QModelIndex m_contextIndex; }; #endif // BOOKMARKMANAGER_H
2,852
C++
.h
69
37.42029
91
0.718829
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,793
bookmarksplugin.h
visualfc_liteide/liteidex/src/plugins/bookmarks/bookmarksplugin.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2017 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: bookmarksplugin.h // Creator: visualfc <visualfc@gmail.com> #ifndef BOOKMARKSPLUGIN_H #define BOOKMARKSPLUGIN_H #include "bookmarks_global.h" #include "liteapi/liteapi.h" class BookmarksPlugin : public LiteApi::IPlugin { Q_OBJECT public: BookmarksPlugin(); virtual bool load(LiteApi::IApplication *app); }; class PluginFactory : public LiteApi::PluginFactoryT<BookmarksPlugin> { Q_OBJECT Q_INTERFACES(LiteApi::IPluginFactory) #if QT_VERSION >= 0x050000 Q_PLUGIN_METADATA(IID "liteidex.BookmarksPlugin") #endif public: PluginFactory() { m_info->setId("plugin/Bookmarks"); m_info->setVer("X38.1"); m_info->setName("Bookmarks"); m_info->setAuthor("visualfc"); m_info->setInfo("Bookmarks"); //m_info->setMustLoad(true); m_info->appendDepend("plugin/liteeditor"); } }; #endif // BOOKMARKSPLUGIN_H
1,962
C++
.h
52
33.807692
83
0.660169
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,795
golanglintoptionfactory.h
visualfc_liteide/liteidex/src/plugins/golanglint/golanglintoptionfactory.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2014 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: golanglintoptionfactory.h // Creator: Hai Thanh Nguyen <phaikawl@gmail.com> #ifndef GOLANGLINTOPTIONFACTORY_H #define GOLANGLINTOPTIONFACTORY_H #include "liteapi/liteapi.h" class GolangLintOptionFactory : public LiteApi::IOptionFactory { public: GolangLintOptionFactory(LiteApi::IApplication *app, QObject *parent); virtual QStringList mimeTypes() const; virtual LiteApi::IOption *create(const QString &mimeType); protected: LiteApi::IApplication *m_liteApp; }; #endif // GOLANGLINTOPTIONFACTORY_H
1,536
C++
.h
35
42.314286
82
0.706079
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
21,796
golanglintplugin.h
visualfc_liteide/liteidex/src/plugins/golanglint/golanglintplugin.h
/************************************************************************** ** This file is part of LiteIDE ** ** Copyright (c) 2011-2014 LiteIDE. All rights reserved. ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library 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 ** Lesser General Public License for more details. ** ** In addition, as a special exception, that plugins developed for LiteIDE, ** are allowed to remain closed sourced and can be distributed under any license . ** These rights are included in the file LGPL_EXCEPTION.txt in this package. ** **************************************************************************/ // Module: golanglint.cpp // Creator: Hai Thanh Nguyen <phaikawl@gmail.com> #ifndef GOLANGLINTPLUGIN_H #define GOLANGLINTPLUGIN_H #include "golanglint_global.h" #include "liteapi/liteapi.h" #include <QtPlugin> class GolangLint; class QToolButton; class GolangLintPlugin : public LiteApi::IPlugin { Q_OBJECT public: GolangLintPlugin(); virtual bool load(LiteApi::IApplication *app); virtual QStringList dependPluginList() const; protected slots: void editorCreated(LiteApi::IEditor*); void appLoaded(); void goplayLint(); protected: LiteApi::IApplication *m_liteApp; QAction *m_golintAct; QAction *m_goplayAct; LiteApi::IEditor *m_playEditor; QToolButton *m_lintBtn; GolangLint *m_lint; }; class PluginFactory : public LiteApi::PluginFactoryT<GolangLintPlugin> { Q_OBJECT Q_INTERFACES(LiteApi::IPluginFactory) #if QT_VERSION >= 0x050000 Q_PLUGIN_METADATA(IID "liteidex.GolangLintPlugin") #endif public: PluginFactory() { m_info->setId("plugin/golanglint"); m_info->setName("GolangLint"); m_info->setAuthor("Hai Thanh Nguyen"); m_info->setVer("0.1"); m_info->setInfo("Golang Golint Util"); } }; #endif // GOLANGLINTPLUGIN_H
2,251
C++
.h
65
31.815385
82
0.692661
visualfc/liteide
7,563
970
395
LGPL-2.1
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false