Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37918038
en ru br
Репозитории ALT
S:0.4.2-alt1.svn20120503
www.altlinux.org/Changes

Группа :: Графические оболочки/GNUstep
Пакет: gnustep-Etoile-DevDoc

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

pax_global_header00006660000000000000000000000064123055344260014516gustar00rootroot0000000000000052 comment=a4a783176bf2e02a8d54d4033647af1f91283b2a
gnustep-Etoile-DevDoc-0.4.2/000075500000000000000000000000001230553442600155655ustar00rootroot00000000000000gnustep-Etoile-DevDoc-0.4.2/.gear/000075500000000000000000000000001230553442600165615ustar00rootroot00000000000000gnustep-Etoile-DevDoc-0.4.2/.gear/DevDoc.spec000064400000000000000000000013761230553442600206100ustar00rootroot00000000000000%set_verify_elf_method unresolved=strict

Name: gnustep-Etoile-DevDoc
Version: 0.4.2
Release: alt1.svn20120503
Summary: Developer documentation helper for Etoile
License: BSD
Group: Graphical desktop/GNUstep
Url: http://etoileos.com/
Packager: Eugeny A. Rostovtsev (REAL) <real at altlinux.org>

# svn://svn.gna.org/svn/etoile/trunk/Etoile/Developer/Documentation/
Source: %name-%version.tar
BuildArch: noarch

%description
Developer documentation helper for Etoile.

%prep
%setup

%install
install -d %buildroot%_datadir/GNUstep/DevDoc
install -m755 *.sh %buildroot%_datadir/GNUstep/DevDoc/

%files
%doc Guides/*
%_datadir/GNUstep

%changelog
* Wed Mar 05 2014 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 0.4.2-alt1.svn20120503
- Initial build for Sisyphus

gnustep-Etoile-DevDoc-0.4.2/.gear/rules000064400000000000000000000001131230553442600176310ustar00rootroot00000000000000spec: .gear/DevDoc.spec
tar: . name=@name@-@version@ base=@name@-@version@
gnustep-Etoile-DevDoc-0.4.2/GNUmakefile000064400000000000000000000005751230553442600176460ustar00rootroot00000000000000include $(GNUSTEP_MAKEFILES)/common.make

after-all::
@echo ""; \
echo " Generating Documentation main page in Developer/Documentation"; \
echo ""; \
./create-project-doc-index.sh > index.html;

after-distclean::
@echo ""; \
echo " Removing Documentation main page in Developer/Documentation"; \
echo ""; \
rm -f ./index.html

include $(GNUSTEP_MAKEFILES)/aggregate.make
gnustep-Etoile-DevDoc-0.4.2/Guides/000075500000000000000000000000001230553442600170055ustar00rootroot00000000000000gnustep-Etoile-DevDoc-0.4.2/Guides/EtoileUIQuickStartGuide.txt000064400000000000000000000110011230553442600242070ustar00rootroot00000000000000EtoileUI Quick Start Guide
==========================

How to write an Objective-C or Smalltalk skeleton application?
--------------------------------------------------------------

This chapter explains how the launch code is structured in an EtoileUI application. You might want to skip it and start directly with the Hello World! example, and later come back to this chapter if needed.

### Objective-C

You need a basic main.m that invokes `ETApplicationMain()` instead of `NSApplicationMain()` as the AppKit does.

int main(int argc, char *argv[])
{
return ETApplicationMain(argc, (const char **) argv);
}

Then you can specify the class of the first object to be instantiated with the key `ETPrincipalControllerClass` in the Info plist file to be packaged in the application bundle.
For instance, *MyExampleInfo.plist* could be as simple as:

{
ETPrincipalControllerClass = "MyExampleController";
}

In this case, EtoileUI will set up basic UI elements such as the menu bar at launch time.

The principal controller once instantiated is automatically registered as the application's delegate. The usual way to receive the control once the launch is finished is to implement the delegate method:

- (void) applicationDidFinishLaunching: (NSNotification *)notif
{
// Do something
}

An alternative is to use a main Nib file that provides a menu bar and a main controller. You just need to set the controller as the application's delegate in the Nib file and implement `-applicationDidFinishLaunching:` as above in your controller class.

See also ETApplication documentation which covers the launch topic in a more detailed way.

For AppKit users, take note that the EtoileUI application object is `+[ETApplication sharedApplication]` and not an NSApplication instance. For conveniency, an `ETApp` macro is also available to get the application object.

### Smalltalk

You can write a similar code skeleton in Smalltalk. In that case, you usually fit it into a single file. This example doesn't use `ETPrincipalControllerClass` to instantiate a main controller but reuses the object that implements the `-run` method, that gets instantiated by *edlc*, as the main controller.

"The main controller"
NSObject subclass: SmalltalkTool [

"edlc looks for this -run method to start the program"
run [
ETApplication sharedApplication setDelegate: self.
ETApplication sharedApplication run.
]

applicationDidFinishLaunching: notif [
"Do something"
]
]

If you decide to specify a `ETPrincipalControllerClass` key in the plist, the code would look like:

"Here the SmalltalkTool class is equivalent to the main() an Objective-C application"
NSObject subclass: SmalltalkTool [

run [
ETApplication sharedApplication run.
]
]

NSObject subclass: MainController [

applicationDidFinishLaunching: notif [
"Do something"
]
]

Alternatively you can use a main Nib file to instantiate a main controller as explained in the previous Objective-C section.

To run these Smalltalk examples supposing the code is put in a file named *MyExample.st*, just do:

edlc -l EtoileUI -f MyExample.st


Hello World
-----------

As a first example, let's see how to create a Hello World application. The application will consist of a single text label whose value will be *Hello World!* and enclosed in a window.

TODO: Write more about ETLayoutItem and ETLayoutItemFactory

### Objective-C

@interface MainController : NSObject
@end

@implementation MainController

- (void) applicationDidFinishLaunching: (NSNotification *)notif
{
ETLayoutItemFactory *itemFactory = [ETLayoutItemFactory factory];
ETLayoutItem *helloItem = [itemFactory labelWithTitle: @"Hello World!"];

[[itemFactory windowGroup] addItem: helloItem];
}

@end


int main(int argc, char *argv[])

{
return ETApplicationMain(argc, (const char **) argv);
}

See the concrete example to know to organize, compile and run this code (either with gnustep-make or Xcode).

#### Smalltalk

Here is the same example now in Smalltalk and in a single file.

NSObject subclass: SmalltalkTool [

run [
ETApplication sharedApplication setDelegate: self.
ETApplication sharedApplication run.
]

applicationDidFinishLaunching: notif [ | itemFactory helloItem |
itemFactory := ETLayoutItemFactory factory.
helloItem := itemFactory itemWithValue: 'Hello World!'.
itemFactory windowGroup addItem: helloItem.
]
]

If the file is named *HelloWorld.st*, you can run it with:

edlc -l EtoileUI -f HelloWorld.st


Temperature Converter
---------------------

gnustep-Etoile-DevDoc-0.4.2/create-project-doc-index.sh000075500000000000000000000007171230553442600227100ustar00rootroot00000000000000#!/bin/sh

echo "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">"
echo "<html>"
echo "<head>"
echo "<title>&Eacute;toil&eacute; API References</title>"
echo "</head>"
echo "<body>"

echo "<h1>&Eacute;toil&eacute; API References</h1>"

for file in *; do
if [ -d $file ]; then

echo "<ul>"
echo "<li><a href=\"./${file}/index.html\">${file}</a></li>"
echo "</ul>"

fi
done

echo "</body>"
echo "</html>"

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin