Ticket #199: 199-3.patch

File 199-3.patch, 19.6 KB (added by Niels.Reedijk@…, 18 years ago)

Final (?) patch

  • src/apps/terminal/TermWindow.cpp

     
    2727#include "CodeConv.h"
    2828#include "ColorWindow.h"
    2929#include "MenuUtil.h"
     30#include "FindDlg.h"
    3031#include "PrefDlg.h"
    3132#include "PrefView.h"
    3233#include "PrefHandler.h"
     
    173174    fTermParse->InitTermParse(fTermView, fCodeConv);
    174175
    175176    // Set Coding.
     177   
     178    // Init find parameters
     179    fMatchCase = false;
     180    fMatchWord = false;
    176181
    177182    // Initialize MessageRunner.
    178183    fWindowUpdate = new BMessageRunner(BMessenger(this),
     
    219224    fEditmenu->AddSeparatorItem ();
    220225    fEditmenu->AddItem (new BMenuItem ("Select All", new BMessage (B_SELECT_ALL), 'A'));
    221226    fEditmenu->AddItem (new BMenuItem ("Clear All", new BMessage (MENU_CLEAR_ALL), 'L'));
     227    fEditmenu->AddSeparatorItem ();
     228    fEditmenu->AddItem (new BMenuItem ("Find", new BMessage (MENU_FIND_STRING),'F'));
     229    fFindBackwardMenuItem = new BMenuItem ("Find Backward", new BMessage (MENU_FIND_BACKWARD), '[');
     230    fEditmenu->AddItem (fFindBackwardMenuItem);
     231    fFindBackwardMenuItem->SetEnabled(false);
     232    fFindForwardMenuItem = new BMenuItem ("Find Forward", new BMessage (MENU_FIND_FORWARD), ']');
     233    fEditmenu->AddItem (fFindForwardMenuItem);
     234    fFindForwardMenuItem->SetEnabled(false);
     235   
    222236
    223 /*
    224   // TODO: Implement Finding
    225   fEditmenu->AddSeparatorItem ();
    226   fEditmenu->AddItem (new BMenuItem ("Find", new BMessage (MENU_FIND_STRING),'F'));
    227   fEditmenu->AddItem (new BMenuItem ("Find Again", new BMessage (MENU_FIND_AGAIN), ']'));
    228 */
    229237    fMenubar->AddItem (fEditmenu);
    230238 
    231239    // Make Help Menu.
     
    277285  BRect r;
    278286  BFont halfFont;
    279287  BFont fullFont;
     288  bool findselection, forwardsearch, findresult;
    280289 
    281290    switch (message->what) {
    282291        case MENU_SWITCH_TERM: {
     
    303312            fPrefWindow = NULL;
    304313            break;
    305314        }
     315        case MENU_FIND_STRING: {
     316            if (!fFindPanel) {
     317                BRect r = Frame();
     318                r.left += 20;
     319                r.top += 20;
     320                r.right = r.left + 260;
     321                r.bottom = r.top + 190;
     322                fFindPanel = new FindDlg(r, this);
     323            }
     324            else
     325                fFindPanel->Activate();
     326            break;
     327        }
     328        case MSG_FIND: {
     329            fFindPanel->PostMessage(B_QUIT_REQUESTED);
     330            message->FindBool("findselection", &findselection);
     331            if (!findselection)
     332                message->FindString("findstring", &fFindString);
     333            else
     334                fTermView->GetSelection(fFindString);
     335
     336            if (fFindString.Length() == 0) {
     337                BAlert *alert = new BAlert("find failed", "No search string.", "Okay", NULL,
     338                    NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
     339                alert->Go();
     340                fFindBackwardMenuItem->SetEnabled(false);
     341                fFindForwardMenuItem->SetEnabled(false);
     342                break;
     343            }
     344
     345            message->FindBool("forwardsearch", &forwardsearch);
     346            message->FindBool("matchcase", &fMatchCase);
     347            message->FindBool("matchword", &fMatchWord);
     348            findresult = fTermView->Find(fFindString, forwardsearch, fMatchCase, fMatchWord);
     349               
     350            if (!findresult) {
     351                BAlert *alert = new BAlert("find failed", "Not Found.", "Okay", NULL,
     352                    NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
     353                alert->Go();
     354                fFindBackwardMenuItem->SetEnabled(false);
     355                fFindForwardMenuItem->SetEnabled(false);
     356                break;
     357            }
     358           
     359            //Enable the menu items Find Forward and Find Backward
     360            fFindBackwardMenuItem->SetEnabled(true);
     361            fFindForwardMenuItem->SetEnabled(true);
     362            break;
     363        }
     364        case MENU_FIND_FORWARD: {
     365            findresult = fTermView->Find(fFindString, true, fMatchCase, fMatchWord);
     366            if (!findresult) {
     367                BAlert *alert = new BAlert("find failed", "Not Found.", "Okay", NULL,
     368                    NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
     369                alert->Go();
     370            }
     371            break;
     372        }
     373        case MENU_FIND_BACKWARD: {
     374            findresult = fTermView->Find(fFindString, false, fMatchCase, fMatchWord);
     375            if (!findresult) {
     376                BAlert *alert = new BAlert("find failed", "Not Found.", "Okay", NULL,
     377                    NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
     378                alert->Go();
     379            }
     380            break;
     381        }
     382        case MSG_FIND_CLOSED: {
     383            fFindPanel = NULL;
     384            break;
     385        }
    306386        case MENU_FILE_QUIT: {
    307387            be_app->PostMessage(B_QUIT_REQUESTED);
    308388            break;
     
    522602{
    523603    delete fTermParse;
    524604    delete fCodeConv;
    525     if(fPrefWindow) fPrefWindow->PostMessage (B_QUIT_REQUESTED);
    526         be_app->PostMessage (B_QUIT_REQUESTED, be_app);
     605    if (fPrefWindow) fPrefWindow->PostMessage (B_QUIT_REQUESTED);
     606    if (fFindPanel) fFindPanel->PostMessage(B_QUIT_REQUESTED);
     607   
     608    be_app->PostMessage (B_QUIT_REQUESTED, be_app);
    527609    BWindow::Quit ();
    528610}
    529611
  • src/apps/terminal/TermBuffer.cpp

     
    103103    mRowSize = rows;
    104104
    105105    mRowOffset = 0;
     106   
     107    mSelStart.Set(-1,-1);
     108    mSelEnd.Set(-1,-1);
    106109
    107110    buffer_size = gTermPref->getInt32(PREF_HISTORY_SIZE);
    108111    if (buffer_size < 1000)
     
    544547    }
    545548}
    546549
     550//Returns the complete internal buffer as a BString
     551void
     552TermBuffer::ToString(BString &str)
     553{
     554    for (int y = 0; y < mRowSize; y++) {
     555        for (int x = 0; x < mNowColSize; x++) {
     556            GetCharFromRegion(x, y, str);
     557        }
     558    }
     559    AvoidWaste(str);
     560}
     561 No newline at end of file
  • src/apps/terminal/TermView.cpp

     
    2222
    2323#include <string.h>
    2424#include <stdlib.h>
     25#include <ctype.h>
    2526
    2627#include "TermView.h"
    2728#include "TermWindow.h"
     
    22482249     *height = fFontHeight;
    22492250}
    22502251
     2252// Find a string, and select it if found
     2253bool
     2254TermView::Find (const BString &str, bool forwardSearch, bool matchCase, bool matchWord)
     2255{
     2256    BString buffer;
     2257    CurPos selectionstart, selectionend;
     2258    int offset = 0;
     2259    int initialresult = -1;
     2260    int result = B_ERROR;
     2261
     2262    //Get the buffer contents
     2263    fTextBuffer->ToString(buffer);
     2264
     2265    selectionstart = fTextBuffer->GetSelectionStart();
     2266    selectionend = fTextBuffer->GetSelectionEnd();
     2267
     2268    if (selectionstart.x >= 0 || selectionstart.y >= 0) {
     2269        if (forwardSearch)
     2270            //Set the offset to the end of the selection
     2271            offset = (selectionend.y) * fTermColumns + selectionend.x;
     2272        else
     2273            offset = (selectionstart.y) * fTermColumns + selectionstart.x;
     2274    }
     2275
     2276restart:       
     2277    //Actual search
     2278    if (forwardSearch) {
     2279        if (matchCase) {
     2280            result = buffer.FindFirst(str, offset);
     2281        } else {
     2282            result = buffer.IFindFirst(str, offset);
     2283        }
     2284    } else {
     2285        if (matchCase) {
     2286            result = buffer.FindLast(str, offset);
     2287        } else {
     2288            result = buffer.IFindLast(str, offset);
     2289        }
     2290    }
     2291    if (result == B_ERROR) { //Wrap search like Be's Terminal
     2292        if (forwardSearch) {
     2293            if (matchCase) {
     2294                result = buffer.FindFirst(str, 0);
     2295            } else {
     2296                result = buffer.IFindFirst(str, 0);
     2297            }
     2298        } else {
     2299            if (matchCase) {
     2300                result = buffer.FindLast(str, buffer.Length());
     2301            } else {
     2302                result = buffer.IFindLast(str, buffer.Length());
     2303            }
     2304        }
     2305    }
     2306   
     2307    if (result < 0)
     2308        return false;
     2309   
     2310    if (matchWord) {
     2311        if (isalnum(buffer.ByteAt(result - 1)) || isalnum(buffer.ByteAt(result + str.Length()))) {
     2312            if (initialresult == -1) //Set the initial offset to the first result to aid word matching
     2313                initialresult = result;
     2314            else if (initialresult == result) //We went round the buffer, nothing found
     2315                return false;
     2316            if (forwardSearch)
     2317                offset = result + str.Length();
     2318            else
     2319                offset = result;
     2320            goto restart;
     2321        }
     2322    }
     2323   
     2324    //Select the found text
     2325    selectionstart.y = result / fTermColumns;
     2326    selectionstart.x = result % fTermColumns;
     2327    //Length -1 since it seems to count the \0 as well
     2328    selectionend.y = (result + str.Length() - 1) / fTermColumns;
     2329    selectionend.x = (result + str.Length() - 1) % fTermColumns;
     2330    //Update the contents of the view
     2331    DeSelect();
     2332    Select(selectionstart, selectionend);
     2333 
     2334    return true;
     2335}
     2336
     2337//! Get the selected text and copy to str
     2338void
     2339TermView::GetSelection(BString &str)
     2340{
     2341    str.SetTo("");
     2342    fTextBuffer->GetStringFromRegion(str);
     2343}
     2344
    22512345// Send DrawRect data to Draw Engine thread.
    22522346inline void
    22532347TermView::SendDataToDrawEngine(int x1, int y1, int x2, int y2)
  • src/apps/terminal/Changelog

     
    1313Terminal window supports scrolling
    1414
    1515TODO:
    16 Make a Jamfile
    17 Make Find work
    1816Fix titling (-t works already, its the Terminal 1, 2, 3, etc...)
    1917Fix the Colour menu
    2018Move Fonts and font sizes to the "Right Place"
    2119Kill the Preferences Panel
    22 Move to .rdef source resources
  • src/apps/terminal/FindDlg.h

     
    3333#include <Window.h>
    3434#include <TextView.h>
    3535
    36 #include "CurPos.h"
    37 
     36const ulong MSG_FIND = 'msgf';
    3837const ulong MSG_FIND_START = 'msac';
     38const ulong MSG_FIND_CLOSED = 'mfcl';
    3939
    4040class BRect;
    4141class BBitmap;
    4242class BMessage;
    4343class TermWindow;
     44class BTextControl;
     45class BRadioButton;
     46class BCheckBox;
    4447
    4548class FindDlg : public BWindow
    4649{
    4750public:
    48   FindDlg(BRect frame, TermWindow *win);
    49   ~FindDlg ();
     51    FindDlg (BRect frame, TermWindow *win);
     52    ~FindDlg ();
    5053
    51   void      Find (CurPos *start, CurPos *end);
     54private:
     55    virtual void    Quit (void);
     56    void            MessageReceived (BMessage *msg);
    5257
    53  private:
    54   virtual void  Quit (void);
    55  
    56   BString   *fFindString;
    57   TermWindow    *fWindow;
     58    void            SendFindMessage (void);
    5859
     60    BView           *fFindView;
     61    BTextControl    *fFindLabel;
     62    BRadioButton    *fTextRadio;
     63    BRadioButton    *fSelectionRadio;
     64    BBox            *fSeparator;
     65    BCheckBox       *fForwardSearchBox;
     66    BCheckBox       *fMatchCaseBox;
     67    BCheckBox       *fMatchWordBox;
     68    BButton         *fFindButton;
     69
     70    BString *fFindString;
     71    TermWindow  *fWindow;
    5972};
    6073
    6174
  • src/apps/terminal/Jamfile

     
    33SetSubDirSupportedPlatformsBeOSCompatible ;
    44AddSubDirSupportedPlatforms libbe_test ;
    55
     6UseHeaders [ FDirName $(HAIKU_TOP) src kits tracker ] ;
     7
    68Application Terminal :
    79    AppearPrefView.cpp
    810    CodeConv.cpp
    911    CurPos.cpp
     12    FindDlg.cpp
    1013    MenuUtil.cpp
    1114    Terminal.cpp
    1215    PrefDlg.cpp
  • src/apps/terminal/TermWindow.h

     
    8787  BMenuItem *item;
    8888  BRect     fSavedFrame;
    8989  window_look   fSavedLook;
     90  //Saved search parameters
     91  BString   fFindString;
     92  BMenuItem *fFindForwardMenuItem;
     93  BMenuItem *fFindBackwardMenuItem;
     94  bool      fMatchCase;
     95  bool      fMatchWord;
    9096};
    9197
    9298#endif // TERMWIN_H
  • src/apps/terminal/TermBuffer.h

     
    9595  //
    9696  void  ClearAll (void);
    9797
    98   // Set / Unset Selection
     98  //
     99  // Selection Methods
     100  //
    99101  void  Select (const CurPos &start, const CurPos &end);
    100102  void  DeSelect (void);
     103 
     104  const CurPos &GetSelectionStart (void) { return mSelStart; };
     105  const CurPos &GetSelectionEnd (void)   { return mSelEnd; };
    101106
    102107  int   CheckSelectedRegion (const CurPos &pos);
     108 
     109  //
     110  // Other methods
     111  //
    103112  bool  FindWord (const CurPos &pos, CurPos *start, CurPos *end);
    104113
    105114  void  GetCharFromRegion (int x, int y, BString &str);
    106115  void  AvoidWaste (BString &str);
     116 
     117  void  ToString (BString &str);
    107118
    108119  int32 GetArraySize (void);
    109120 
  • src/apps/terminal/FindDlg.cpp

     
    3131#include <Window.h>
    3232#include <Rect.h>
    3333#include <TextControl.h>
     34#include <Box.h>
     35#include <CheckBox.h>
    3436#include <Button.h>
     37#include <RadioButton.h>
    3538#include <Message.h>
    3639#include <stdio.h>
    3740#include <File.h>
    3841#include <String.h>
    3942
     43#include "TermWindow.h"
    4044#include "FindDlg.h"
    4145#include "TermApp.h"
    4246#include "MenuUtil.h"
     
    4448
    4549// message define
    4650
    47 const uint32 FPANEL_HIDE = 'Fhid';
     51const uint32 MSG_FIND_HIDE = 'Fhid';
    4852
    4953//////////////////////////////////////////////////////////////////////////////
    5054// FindDlg
    5155//  Constructer
    5256//////////////////////////////////////////////////////////////////////////////
    5357FindDlg::FindDlg (BRect frame, TermWindow *win)
    54   : BWindow(frame, "Find",
    55         B_FLOATING_WINDOW, B_NOT_RESIZABLE|B_NOT_ZOOMABLE)
     58    : BWindow(frame, "Find",
     59        B_FLOATING_WINDOW, B_NOT_RESIZABLE|B_NOT_ZOOMABLE)
    5660{
    57   PrefHandler title;
    58   LoadLocaleFile (&title);
     61    fWindow = win;
     62    SetTitle("Find");
    5963
    60   fWindow = win;
    61   this->SetTitle (title.getString ("Find"));
     64    AddShortcut ((ulong)'W', (ulong)B_COMMAND_KEY, new BMessage (MSG_FIND_HIDE));
    6265
    63   AddShortcut ((ulong)'Q', (ulong)B_COMMAND_KEY, new BMessage (FPANEL_HIDE));
    64   AddShortcut ((ulong)'W', (ulong)B_COMMAND_KEY, new BMessage (FPANEL_HIDE));
     66    //Build up view
     67    fFindView = new BView(Bounds(), "FindView", B_FOLLOW_ALL, B_WILL_DRAW);
     68    fFindView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
     69    AddChild(fFindView);
    6570
    66   BRect r (10, 10, 120, 20);
    67  
    68   BTextControl *text_ctl = new BTextControl (r, "text", NULL, NULL, NULL);
    69   AddChild (text_ctl);
     71    font_height height;
     72    fFindView->GetFontHeight(&height);
     73    float lineHeight = height.ascent + height.descent + height.leading;
    7074
    71   r.Set (100, 40, 130, 60);
    72   BButton *button = new BButton (r, NULL, "Find", new BMessage (MSG_FIND_START));
    73   AddChild (button);
    74  
     75    //These labels are from the bottom up
     76    float buttonsTop = frame.Height() - 19 - lineHeight;
     77    float matchwordBottom = buttonsTop - 4;
     78    float matchwordTop = matchwordBottom - lineHeight - 8;
     79    float matchcaseBottom = matchwordTop - 4;
     80    float matchcaseTop = matchcaseBottom - lineHeight - 8;
     81    float forwardsearchBottom = matchcaseTop - 4;
     82    float forwardsearchTop = forwardsearchBottom - lineHeight - 8;
     83
     84    //These things are calculated from the top
     85    float textRadioTop = 12;
     86    float textRadioBottom = textRadioTop + 2 + lineHeight + 2 + 1;
     87    float textRadioRight = fFindView->StringWidth("Use Text: ") + 30;
     88    float selectionRadioTop = textRadioBottom + 4;
     89    float selectionRadioBottom = selectionRadioTop + lineHeight + 8;
     90
     91    //Divider
     92    float dividerHeight = (selectionRadioBottom + forwardsearchTop) / 2;
     93   
     94    //Button Coordinates
     95    float searchbuttonLeft = (frame.Width() - fFindView->StringWidth("Find") - 60) / 2;
     96    float searchbuttonRight = searchbuttonLeft + fFindView->StringWidth("Find") + 60;
     97   
     98    //Build the Views
     99    fTextRadio = new BRadioButton(BRect(14, textRadioTop, textRadioRight, textRadioBottom),
     100        "fTextRadio", "Use Text: ", NULL);
     101    fFindView->AddChild(fTextRadio);
     102    fTextRadio->SetValue(1);    //enable first option
     103   
     104    fFindLabel = new BTextControl(BRect(textRadioRight + 4, textRadioTop, frame.Width() - 14, textRadioBottom),
     105        "fFindLabel", "", "", NULL);
     106    fFindLabel->SetDivider(0);
     107    fFindView->AddChild(fFindLabel);
     108    fFindLabel->MakeFocus(true);
     109
     110    fSelectionRadio = new BRadioButton(BRect(14, selectionRadioTop, frame.Width() - 14, selectionRadioBottom),
     111        "fSelectionRadio", "Use Selection", NULL);
     112    fFindView->AddChild(fSelectionRadio);
     113
     114    fSeparator = new BBox(BRect(6, dividerHeight, frame.Width() - 6, dividerHeight + 1));
     115    fFindView->AddChild(fSeparator);
     116   
     117    fForwardSearchBox = new BCheckBox(BRect(14, forwardsearchTop, frame.Width() - 14, forwardsearchBottom),
     118        "fForwardSearchBox", "Search Forward", NULL);
     119    fFindView->AddChild(fForwardSearchBox);
     120   
     121    fMatchCaseBox = new BCheckBox(BRect(14, matchcaseTop, frame.Width() - 14, matchcaseBottom),
     122        "fMatchCaseBox", "Match Case", NULL);
     123    fFindView->AddChild(fMatchCaseBox);
     124   
     125    fMatchWordBox = new BCheckBox(BRect(14, matchwordTop, frame.Width() - 14, matchwordBottom),
     126        "fMatchWordBox", "Match Word", NULL);
     127    fFindView->AddChild(fMatchWordBox);
     128   
     129    fFindButton = new BButton(BRect(searchbuttonLeft, buttonsTop, searchbuttonRight, frame.Height() - 14),
     130        "fFindButton", "Find", new BMessage(MSG_FIND));
     131    fFindButton->MakeDefault(true);
     132    fFindView->AddChild(fFindButton);
     133   
     134    Show();
    75135}
    76136
    77137FindDlg::~FindDlg (void)
     
    80140}
    81141
    82142void
     143FindDlg::MessageReceived (BMessage *msg)
     144{
     145    switch (msg->what) {
     146        case B_QUIT_REQUESTED:
     147            Quit();
     148            break;
     149        case MSG_FIND:
     150            SendFindMessage();
     151            break;
     152        case MSG_FIND_HIDE:
     153            Quit();
     154            break;
     155        default:
     156            BWindow::MessageReceived(msg);
     157            break;
     158    }
     159}
     160
     161void
    83162FindDlg::Quit (void)
    84163{
    85   BWindow::Quit ();
     164    fWindow->PostMessage(MSG_FIND_CLOSED);
     165    BWindow::Quit ();
    86166}
    87167
     168void
     169FindDlg::SendFindMessage (void)
     170{
     171    BMessage message(MSG_FIND);
     172
     173    if (fTextRadio->Value() == B_CONTROL_ON) {
     174        message.AddString("findstring", fFindLabel->Text());
     175        message.AddBool("findselection", false);
     176    } else
     177        message.AddBool("findselection", true);
     178   
     179    //Add the other parameters
     180    message.AddBool("usetext", fTextRadio->Value() == B_CONTROL_ON);
     181    message.AddBool("forwardsearch", fForwardSearchBox->Value() == B_CONTROL_ON);
     182    message.AddBool("matchcase", fMatchCaseBox->Value() == B_CONTROL_ON);
     183    message.AddBool("matchword", fMatchWordBox->Value() == B_CONTROL_ON);
     184   
     185    fWindow->PostMessage(&message);
     186}
  • src/apps/terminal/TermView.h

     
    184184  void  ScrollScreenDraw (void);
    185185  void  GetFrameSize (float *width, float *height);
    186186  void  GetFontInfo (int *, int*);
     187  bool  Find (const BString &str, bool forwardSearch, bool matchCase, bool matchWord);
     188  void  GetSelection (BString &str);
     189 
    187190
    188191  /*
    189192   *    PRIVATE MEMBER.
  • src/apps/terminal/Constants.h

     
    1 /*Terminal: constants*/
    2 #ifndef CONSTANTS_H
    3 #define CONSTANTS_H
    4 
    5 #include <GraphicsDefs.h>
    6 #include <SupportDefs.h>
    7 
    8 #define APP_SIGNATURE  "application/x-vnd.obos.terminal"
    9 
    10 const float TEXT_INSET = 3.0;
    11 
    12 // Application messages
    13 
    14 const uint32 OPEN_TERMINAL              ='OTRM';
    15 
    16 // Messages for menu commands
    17 
    18 // Terminal
    19 const uint32 TERMINAL_SWITCH_TERMINAL   ='TSWT';
    20 const uint32 TERMINAL_START_NEW_TERMINAL='TSNT';
    21 const uint32 TERMINAL_LOG_TO_FILE       ='TLTF';
    22 // Edit
    23 const uint32 EDIT_WRITE_SELECTION       ='EWSL';
    24 const uint32 EDIT_CLEAR_ALL             ='ECLA';
    25 const uint32 EDIT_FIND                  ='EFND';
    26 const uint32 EDIT_FIND_BACKWARD         ='EFBK';
    27 const uint32 EDIT_FIND_FORWARD          ='EFFD';
    28 // Settings
    29 const uint32 SETTINGS_WINDOW_SIZE       ='SWSZ';
    30 const uint32 SETTINGS_FONT              ='SFNT';
    31 const uint32 SETTINGS_FONT_SIZE         ='SFSZ';
    32 const uint32 SETTINGS_FONT_ENCODING     ='SFEN';
    33 const uint32 SETTINGS_TAB_WIDTH         ='STBW';
    34 const uint32 SETTINGS_COLOR             ='SCLR';
    35 const uint32 SETTINGS_SAVE_AS_DEFAULT   ='SSAD';
    36 const uint32 SETTINGS_SAVE_AS_SETTINGS  ='SSAS';
    37 
    38 // Edit menu toggle
    39 const uint32 ENABLE_ITEMS               ='EDON';
    40 const uint32 DISABLE_ITEMS              ='EDOF';
    41 
    42 #endif // CONSTANTS_H
  • src/apps/terminal/TermConst.h

     
    6363const uint32 MENU_PAGE_SETUP    = 'Mpst';
    6464const uint32 MENU_PRINT         = 'Mpnt';
    6565const uint32 MENU_FIND_STRING   = 'Mfnd';
    66 const uint32 MENU_FIND_AGAIN    = 'Mfag';
     66const uint32 MENU_FIND_FORWARD  = 'Mffw';
     67const uint32 MENU_FIND_BACKWARD = 'Mfbw';
    6768const uint32 MENU_SHOW_COLOR    = 'Mcol';
    6869
    6970const uint32 M_GET_DEVICE_NUM   = 'Mgdn';