Renamed moreUTF8.h to utf8_functions.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17239 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3691c680c4
commit
93820f1ea7
@ -1,5 +1,9 @@
|
||||
#ifndef __MOREUTF8
|
||||
#define __MOREUTF8
|
||||
/*
|
||||
* Copyright 2004-2006, Haiku, Inc.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _UTF8_FUNCTIONS_H
|
||||
#define _UTF8_FUNCTIONS_H
|
||||
|
||||
|
||||
#include <SupportDefs.h>
|
||||
@ -205,4 +209,4 @@ UTF8ToLength(const char *bytes)
|
||||
return length;
|
||||
}
|
||||
|
||||
#endif // __MOREUTF8
|
||||
#endif // _UTF8_FUNCTIONS_H
|
@ -1,46 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// Copyright (c) 2003, OpenBeOS
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// File Name: UndoBuffer.cpp
|
||||
// Author: Stefano Ceccherini (burton666@libero.it)
|
||||
// Description: _BUndoBuffer_ and its subclasses
|
||||
// handle different types of Undo operations.
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
* Copyright 2003-2006, Haiku, Inc.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Stefano Ceccherini (burton666@libero.it)
|
||||
*/
|
||||
|
||||
// Standard Includes -----------------------------------------------------------
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
//! _BUndoBuffer_ and its subclasses handle different types of Undo operations.
|
||||
|
||||
|
||||
#include "UndoBuffer.h"
|
||||
#include "utf8_functions.h"
|
||||
|
||||
// System Includes -------------------------------------------------------------
|
||||
#include <Clipboard.h>
|
||||
|
||||
// Local Includes --------------------------------------------------------------
|
||||
#include "moreUTF8.h"
|
||||
#include "UndoBuffer.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
// TODO: document properly this file
|
||||
// TODO: properly document this file
|
||||
|
||||
|
||||
// #pragma mark - _BUndoBuffer_
|
||||
|
||||
|
||||
// ******** _BUndoBuffer_ *******
|
||||
_BUndoBuffer_::_BUndoBuffer_(BTextView *textView, undo_state state)
|
||||
:
|
||||
fTextView(textView),
|
||||
@ -101,10 +85,11 @@ _BUndoBuffer_::RedoSelf(BClipboard *clipboard)
|
||||
}
|
||||
|
||||
|
||||
// ******** _BCutUndoBuffer_ *******
|
||||
// #pragma mark - _BCutUndoBuffer_
|
||||
|
||||
|
||||
_BCutUndoBuffer_::_BCutUndoBuffer_(BTextView *textView)
|
||||
:
|
||||
_BUndoBuffer_(textView, B_UNDO_CUT)
|
||||
: _BUndoBuffer_(textView, B_UNDO_CUT)
|
||||
{
|
||||
}
|
||||
|
||||
@ -135,11 +120,12 @@ _BCutUndoBuffer_::RedoSelf(BClipboard *clipboard)
|
||||
}
|
||||
|
||||
|
||||
// ******** _BPasteUndoBuffer_ *******
|
||||
// #pragma mark - _BPasteUndoBuffer_
|
||||
|
||||
|
||||
_BPasteUndoBuffer_::_BPasteUndoBuffer_(BTextView *textView, const char *text,
|
||||
int32 textLen, text_run_array *runArray, int32 runArrayLen)
|
||||
:
|
||||
_BUndoBuffer_(textView, B_UNDO_PASTE),
|
||||
int32 textLen, text_run_array *runArray, int32 runArrayLen)
|
||||
: _BUndoBuffer_(textView, B_UNDO_PASTE),
|
||||
fPasteText(NULL),
|
||||
fPasteTextLength(textLen),
|
||||
fPasteRunArray(NULL),
|
||||
@ -183,10 +169,11 @@ _BPasteUndoBuffer_::RedoSelf(BClipboard *clipboard)
|
||||
}
|
||||
|
||||
|
||||
// ******** _BClearUndoBuffer_ *******
|
||||
// #pragma mark - _BClearUndoBuffer_
|
||||
|
||||
|
||||
_BClearUndoBuffer_::_BClearUndoBuffer_(BTextView *textView)
|
||||
:
|
||||
_BUndoBuffer_(textView, B_UNDO_CLEAR)
|
||||
: _BUndoBuffer_(textView, B_UNDO_CLEAR)
|
||||
{
|
||||
}
|
||||
|
||||
@ -204,12 +191,13 @@ _BClearUndoBuffer_::RedoSelf(BClipboard *clipboard)
|
||||
}
|
||||
|
||||
|
||||
// ******** _BDropUndoBuffer_ ********
|
||||
_BDropUndoBuffer_::_BDropUndoBuffer_(BTextView *textView, char const *text, int32 textLen,
|
||||
text_run_array *runArray, int32 runArrayLen, int32 location,
|
||||
bool internalDrop)
|
||||
:
|
||||
_BUndoBuffer_(textView, B_UNDO_DROP),
|
||||
// #pragma mark - _BDropUndoBuffer_
|
||||
|
||||
|
||||
_BDropUndoBuffer_::_BDropUndoBuffer_(BTextView *textView, char const *text,
|
||||
int32 textLen, text_run_array *runArray, int32 runArrayLen,
|
||||
int32 location, bool internalDrop)
|
||||
: _BUndoBuffer_(textView, B_UNDO_DROP),
|
||||
fDropText(NULL),
|
||||
fDropTextLength(textLen),
|
||||
fDropRunArray(NULL)
|
||||
@ -264,10 +252,11 @@ _BDropUndoBuffer_::RedoSelf(BClipboard *)
|
||||
}
|
||||
|
||||
|
||||
// ******** _BTypingUndoBuffer_ ********
|
||||
// #pragma mark - _BTypingUndoBuffer_
|
||||
|
||||
|
||||
_BTypingUndoBuffer_::_BTypingUndoBuffer_(BTextView *textView)
|
||||
:
|
||||
_BUndoBuffer_(textView, B_UNDO_TYPING),
|
||||
: _BUndoBuffer_(textView, B_UNDO_TYPING),
|
||||
fTypedText(NULL),
|
||||
fTypedStart(fStart),
|
||||
fTypedEnd(fEnd),
|
||||
|
@ -1,47 +1,34 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2004 Haiku, Inc.
|
||||
*
|
||||
* 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.
|
||||
* Copyright 2003-2006, Haiku, Inc.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* File: WidthBuffer.cpp
|
||||
* Author: Stefano Ceccherini (burton666@libero.it)
|
||||
* Description: Caches string widths in a hash table, to avoid a trip to
|
||||
* the app server.
|
||||
* Authors:
|
||||
* Stefano Ceccherini (burton666@libero.it)
|
||||
*/
|
||||
#include <Debug.h>
|
||||
#include <Font.h>
|
||||
|
||||
#include "moreUTF8.h"
|
||||
//! Caches string widths in a hash table, to avoid a trip to the app server.
|
||||
|
||||
|
||||
#include "utf8_functions.h"
|
||||
#include "TextGapBuffer.h"
|
||||
#include "WidthBuffer.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <Debug.h>
|
||||
#include <Font.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
const static uint32 kTableCount = 128;
|
||||
const static uint32 kInvalidCode = 0xFFFFFFFF;
|
||||
|
||||
|
||||
struct hashed_escapement
|
||||
{
|
||||
struct hashed_escapement {
|
||||
uint32 code;
|
||||
float escapement;
|
||||
hashed_escapement() {
|
||||
|
||||
hashed_escapement()
|
||||
{
|
||||
code = kInvalidCode;
|
||||
escapement = 0;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2001-2005, Haiku, Inc.
|
||||
* Copyright 2001-2006, Haiku, Inc.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
@ -9,10 +9,12 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <new>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <AppServerLink.h>
|
||||
#include <FontPrivate.h>
|
||||
#include <ObjectList.h>
|
||||
#include <ServerProtocol.h>
|
||||
#include <truncate_string.h>
|
||||
#include <utf8_functions.h>
|
||||
|
||||
#include <Autolock.h>
|
||||
#include <Font.h>
|
||||
@ -20,15 +22,12 @@
|
||||
#include <Message.h>
|
||||
#include <PortLink.h>
|
||||
#include <Rect.h>
|
||||
#include <ServerProtocol.h>
|
||||
#include <Shape.h>
|
||||
#include <String.h>
|
||||
|
||||
#include <AppServerLink.h>
|
||||
#include <moreUTF8.h>
|
||||
#include <truncate_string.h>
|
||||
#include <FontPrivate.h>
|
||||
#include <ObjectList.h>
|
||||
#include <new>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -10,8 +10,8 @@
|
||||
|
||||
/** Global functions and variables for the Interface Kit */
|
||||
|
||||
#include "moreUTF8.h"
|
||||
#include "truncate_string.h"
|
||||
#include "utf8_functions.h"
|
||||
|
||||
#include <ApplicationPrivate.h>
|
||||
#include <AppServerLink.h>
|
||||
|
@ -9,20 +9,20 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <Shape.h>
|
||||
#include <String.h>
|
||||
#include <UTF8.h>
|
||||
#include "ServerFont.h"
|
||||
|
||||
#include "Angle.h"
|
||||
#include "FontManager.h"
|
||||
#include "moreUTF8.h"
|
||||
#include "truncate_string.h"
|
||||
#include "utf8_functions.h"
|
||||
|
||||
#include FT_FREETYPE_H
|
||||
#include FT_GLYPH_H
|
||||
#include FT_OUTLINE_H
|
||||
|
||||
#include "ServerFont.h"
|
||||
#include <Shape.h>
|
||||
#include <String.h>
|
||||
#include <UTF8.h>
|
||||
|
||||
|
||||
// functions needed to convert a freetype vector graphics to a BShape
|
||||
|
@ -7,8 +7,8 @@
|
||||
#include "AGGTextRenderer.h"
|
||||
|
||||
#include "FontManager.h"
|
||||
#include "moreUTF8.h"
|
||||
#include "ServerFont.h"
|
||||
#include "utf8_functions.h"
|
||||
|
||||
#include <agg_basics.h>
|
||||
#include <agg_bounding_rect.h>
|
||||
|
Loading…
Reference in New Issue
Block a user